Author: janderwald
Date: Thu Aug 30 02:27:30 2007
New Revision: 28661
URL:
http://svn.reactos.org/svn/reactos?rev=28661&view=rev
Log:
- in theory arguments start at argv[1] - so this needs to be passed to qemu-img
Modified:
trunk/reactos/tools/sysreg/os_support.cpp
trunk/reactos/tools/sysreg/rosboot_test.cpp
Modified: trunk/reactos/tools/sysreg/os_support.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/os_support.cp…
==============================================================================
--- trunk/reactos/tools/sysreg/os_support.cpp (original)
+++ trunk/reactos/tools/sysreg/os_support.cpp Thu Aug 30 02:27:30 2007
@@ -42,7 +42,7 @@
if (procargsnum)
{
- for (int i = 0; i < procargsnum; i++)
+ for (int i = 1; i < procargsnum; i++)
{
length += _tcslen(procargs[i]);
}
@@ -50,7 +50,7 @@
length += procargsnum;
szBuffer = (TCHAR*)malloc(length * sizeof(TCHAR));
length = 0;
- for (int i = 0; i < procargsnum; i++)
+ for (int i = 1; i < procargsnum; i++)
{
_tcscpy(&szBuffer[length], procargs[i]);
length += _tcslen(procargs[i]);
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 Thu Aug 30 02:27:30 2007
@@ -148,22 +148,23 @@
qemuimgdir += _T("\\qemu-img.exe");
#endif
- TCHAR * options[] = {
+ if (!isFileExisting(qemuimgdir))
+ {
+ cerr << "Error: ROS_EMU_PATH must contain the path to qemu and
qemu-img" << endl;
+ return false;
+ }
+
+ TCHAR * options[] = { NULL,
_T("create"),
NULL,
_T("100M"),
NULL
};
- if (!isFileExisting(qemuimgdir))
- {
- cerr << "Error: ROS_EMU_PATH must contain the path to qemu and
qemu-img" << endl;
- return false;
- }
-
getDefaultHDDImage(output);
- options[1] = (TCHAR*)output.c_str();
+ options[0] = (TCHAR*)qemuimgdir.c_str();
+ options[2] = (TCHAR*)output.c_str();
cerr << "Creating HDD Image ..." << output << endl;
if (OsSupport::createProcess ((TCHAR*)qemuimgdir.c_str(), 3, options, true))