diff options
author | David 'Digit' Turner <digit@android.com> | 2011-02-10 16:03:28 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2011-02-10 16:03:28 +0100 |
commit | 42074e5e184aed78dee0efb14d7376325516c070 (patch) | |
tree | b432eed193a5708c0f054188ff08193f8c02f708 /android/main.c | |
parent | 1a412ceb19deb8622b0be8aabdc6950220597059 (diff) | |
download | external_qemu-42074e5e184aed78dee0efb14d7376325516c070.zip external_qemu-42074e5e184aed78dee0efb14d7376325516c070.tar.gz external_qemu-42074e5e184aed78dee0efb14d7376325516c070.tar.bz2 |
Write the core hardware configuration file to AVD's content directory.
Do not write the core's hardware configuration file to a temporary file.
Instead, stored it under the AVD's content directory with the name
qemu-hardware.ini. For platform builds, use $ANDROID_PRODUCT_OUT/qemu-hardware.ini
The purpose of this auto-generated file is to contain all hardware configuration
required to properly launch a core from the UI. Further patches will get rid of
special core command-line options (e.g. -android-gui) and rely on the content of
this file, by adding new hw properties.
Change-Id: Id761151c8c8990f1cfa7380779b720080f49469f
Diffstat (limited to 'android/main.c')
-rw-r--r-- | android/main.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/android/main.c b/android/main.c index 919810b..14e1ced 100644 --- a/android/main.c +++ b/android/main.c @@ -1259,21 +1259,15 @@ int main(int argc, char **argv) * launch the core with the -android-hw <file> option. */ { - TempFile* tempHw = tempfile_create(); - if (tempHw == NULL) { - derror("Could not create temporary hardware.ini: %s", strerror(errno)); - exit(2); - } - - const char* tempHwPath = tempfile_path(tempHw); - IniFile* hwIni = iniFile_newFromMemory("", NULL); + const char* coreHwIniPath = avdInfo_getCoreHwIniPath(avd); + IniFile* hwIni = iniFile_newFromMemory("", NULL); androidHwConfig_write(hw, hwIni); - if (iniFile_saveToFile(hwIni, tempHwPath) < 0) { - derror("Could not write temporary hardware.ini: %s", tempHwPath); + if (iniFile_saveToFile(hwIni, coreHwIniPath) < 0) { + derror("Could not write hardware.ini to %s: %s", coreHwIniPath, strerror(errno)); exit(2); } args[n++] = "-android-hw"; - args[n++] = strdup(tempHwPath); + args[n++] = strdup(coreHwIniPath); } if(VERBOSE_CHECK(init)) { |