Author: janderwald
Date: Fri Sep 7 02:49:05 2007
New Revision: 28910
URL:
http://svn.reactos.org/svn/reactos?rev=28910&view=rev
Log:
- format hdd images with raw format
- improve error checking
Modified:
trunk/reactos/tools/sysreg/rosboot_test.cpp
Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.…
==============================================================================
--- trunk/reactos/tools/sysreg/rosboot_test.cpp (original)
+++ trunk/reactos/tools/sysreg/rosboot_test.cpp Fri Sep 7 02:49:05 2007
@@ -187,25 +187,28 @@
cerr << "Error: ROS_EMU_PATH must contain the path to qemu and
qemu-img " << qemuimgdir << endl;
return false;
}
-
- TCHAR * options[] = { NULL,
- _T("create"),
- NULL,
- _T("100M"),
- NULL
+ _tremove(image.c_str ());
+
+ TCHAR * options[] = {NULL,
+ _T("create"),
+ _T("-f"),
+ _T("raw"),
+ NULL,
+ _T("100M"),
+ NULL
};
options[0] = (TCHAR*)qemuimgdir.c_str();
- options[2] = (TCHAR*)image.c_str();
+ options[4] = (TCHAR*)image.c_str();
cerr << "Creating HDD Image ..." << image << endl;
- if (OsSupport::createProcess ((TCHAR*)qemuimgdir.c_str(), 4, options, true))
+ OsSupport::createProcess ((TCHAR*)qemuimgdir.c_str(), 6, options, true);
+ if (isFileExisting(image))
{
m_HDDImage = image;
return true;
}
-
return false;
}
//----------------------------------------------------------------------------------------