diff options
author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2012-01-19 11:28:17 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-01-19 11:28:17 -0800 |
commit | ac7c3b18f8d3c472badd3f588565569eae53f2da (patch) | |
tree | a6567b2e4da7cb5680b0dd6c6c3d34615a427f80 /android | |
parent | 045b33e25f3c990054ec0960f1f3f2d99eb157ba (diff) | |
parent | 237ade6beb817b5c73d496c69747ac02757cf897 (diff) | |
download | external_qemu-ac7c3b18f8d3c472badd3f588565569eae53f2da.zip external_qemu-ac7c3b18f8d3c472badd3f588565569eae53f2da.tar.gz external_qemu-ac7c3b18f8d3c472badd3f588565569eae53f2da.tar.bz2 |
Merge "Check for data partition init path on snapshot load."
Diffstat (limited to 'android')
-rw-r--r-- | android/snaphost-android.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/android/snaphost-android.c b/android/snaphost-android.c index 205531c..4e3d1c4 100644 --- a/android/snaphost-android.c +++ b/android/snaphost-android.c @@ -167,6 +167,14 @@ snaphost_save_config(const char* name) } androidHwConfig_write(android_hw, hwcfg_bkp); + /* Invalidate data partition initialization path in the backup copy of HW + * config. The reason we need to do this is that we want the system loading + * from the snapshot to be in sync with the data partition the snapshot was + * saved for. For that we must disalow overwritting it on snapshot load. In + * other words, we should allow snapshot loading only on condition + * that disk.dataPartition.initPath is empty. */ + iniFile_setValue(hwcfg_bkp, "disk.dataPartition.initPath", ""); + /* Save backup file. */ if (!iniFile_saveToFileClean(hwcfg_bkp, bkp_path)) { D("HW config has been backed up to '%s'", bkp_path); |