aboutsummaryrefslogtreecommitdiffstats
path: root/android/avd
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2011-02-28 23:23:05 +0100
committerDavid 'Digit' Turner <digit@android.com>2011-03-01 15:31:11 +0100
commit5f64b873605baa5519211b0d47a53c93df9d4868 (patch)
tree23ea128d213d62715a38705678b8502f5ddd7e7d /android/avd
parent48a3c66361158678f476fc7c2eca2bef025eae62 (diff)
downloadexternal_qemu-5f64b873605baa5519211b0d47a53c93df9d4868.zip
external_qemu-5f64b873605baa5519211b0d47a53c93df9d4868.tar.gz
external_qemu-5f64b873605baa5519211b0d47a53c93df9d4868.tar.bz2
Move snapshot storage initialization to the core.
Change-Id: I2c2b782fe4711cc8c323433e7976222b878cf679
Diffstat (limited to 'android/avd')
-rw-r--r--android/avd/hardware-properties.ini9
-rw-r--r--android/avd/hw-config-defs.h8
-rw-r--r--android/avd/info.c24
-rw-r--r--android/avd/info.h1
4 files changed, 16 insertions, 26 deletions
diff --git a/android/avd/hardware-properties.ini b/android/avd/hardware-properties.ini
index 8dca7fe..69abdaa 100644
--- a/android/avd/hardware-properties.ini
+++ b/android/avd/hardware-properties.ini
@@ -262,11 +262,10 @@ name = disk.dataPartition.size
type = diskSize
default = 0
abstract = Ideal size of data partition
-description = ideal size of data partition. Ignored if smaller than the size of .path (or .initPath). Otherwise, gives the maximum size the partition is allowed to grow dynamically.
-# Path to the snapshots partition.
-name = disk.snapshots.path
+# Path to the snapshots storage file.
+name = disk.snapStorage.path
type = string
default =
-abstract = Path to snapshots
-description = Path to a 'snapshot storage' file, where all snapshots are stored, including the default snapshot.
+abstract = Path to snapshot storage
+description = Path to a 'snapshot storage' file, where all snapshots are stored.
diff --git a/android/avd/hw-config-defs.h b/android/avd/hw-config-defs.h
index 3d3ba5e..6c8ccae 100644
--- a/android/avd/hw-config-defs.h
+++ b/android/avd/hw-config-defs.h
@@ -263,11 +263,11 @@ HWCFG_DISKSIZE(
"ideal size of data partition. Ignored if smaller than the size of .path (or .initPath). Otherwise, gives the maximum size the partition is allowed to grow dynamically.")
HWCFG_STRING(
- disk_snapshots_path,
- "disk.snapshots.path",
+ disk_snapStorage_path,
+ "disk.snapStorage.path",
"",
- "Path to snapshots",
- "Path to a 'snapshot storage' file, where all snapshots are stored, including the default snapshot.")
+ "Path to snapshot storage",
+ "Path to a 'snapshot storage' file, where all snapshots are stored.")
#undef HWCFG_INT
#undef HWCFG_BOOL
diff --git a/android/avd/info.c b/android/avd/info.c
index 61142ba..ca4f0cf 100644
--- a/android/avd/info.c
+++ b/android/avd/info.c
@@ -1130,7 +1130,6 @@ static int
_avdInfo_getImagePaths(AvdInfo* i, AvdInfoParams* params )
{
int wipeData = (params->flags & AVDINFO_WIPE_DATA) != 0;
- int noSnapshots = (params->flags & AVDINFO_NO_SNAPSHOTS) != 0;
ImageLoader l[1];
@@ -1183,14 +1182,6 @@ _avdInfo_getImagePaths(AvdInfo* i, AvdInfoParams* params )
imageLoader_lock( l, 0 );
}
- /* the state snapshot image. Mounting behaviour identical to
- * SD card.
- */
- if (!noSnapshots) {
- imageLoader_loadOptional(l, AVD_IMAGE_SNAPSHOTS,
- params->forcePaths[AVD_IMAGE_SNAPSHOTS]);
- }
-
return 0;
}
@@ -1284,7 +1275,6 @@ static int
_avdInfo_getBuildImagePaths( AvdInfo* i, AvdInfoParams* params )
{
int wipeData = (params->flags & AVDINFO_WIPE_DATA) != 0;
- int noSnapshots = (params->flags & AVDINFO_NO_SNAPSHOTS) != 0;
char temp[PATH_MAX];
char* srcData;
@@ -1354,13 +1344,6 @@ _avdInfo_getBuildImagePaths( AvdInfo* i, AvdInfoParams* params )
/* force the system image to read-only status */
l->pState[0] = IMAGE_STATE_READONLY;
- /** State snapshots image
- **/
- if (!noSnapshots) {
- imageLoader_set (l, AVD_IMAGE_SNAPSHOTS);
- imageLoader_load(l, IMAGE_OPTIONAL | IMAGE_IGNORE_IF_LOCKED);
- }
-
return 0;
}
@@ -1532,6 +1515,13 @@ char* avdInfo_getSdCardPath( AvdInfo* i )
}
char*
+avdInfo_getSnapStoragePath( AvdInfo* i )
+{
+ const char* imageName = _imageFileNames[ AVD_IMAGE_SNAPSHOTS ];
+ return _avdInfo_getContentFilePath(i, imageName);
+}
+
+char*
avdInfo_getSystemInitImagePath( AvdInfo* i )
{
const char* imageName = _imageFileNames[ AVD_IMAGE_INITSYSTEM ];
diff --git a/android/avd/info.h b/android/avd/info.h
index 38f8a9f..afc71fb 100644
--- a/android/avd/info.h
+++ b/android/avd/info.h
@@ -137,6 +137,7 @@ const char* avdInfo_getName( AvdInfo* i );
char* avdInfo_getKernelPath( AvdInfo* i );
char* avdInfo_getRamdiskPath( AvdInfo* i );
char* avdInfo_getSdCardPath( AvdInfo* i );
+char* avdInfo_getSnapStoragePath( AvdInfo* i );
/* This function returns NULL if the cache image file cannot be found.
* Use avdInfo_getDefaultCachePath() to retrieve the default path