mirror of
https://github.com/reactos/reactos.git
synced 2024-09-15 15:19:37 +00:00
- in theory arguments start at argv[1] - so this needs to be passed to qemu-img
svn path=/trunk/; revision=28661
This commit is contained in:
parent
0dd03527da
commit
4adb5cb9a7
|
@ -42,7 +42,7 @@ namespace System_
|
||||||
|
|
||||||
if (procargsnum)
|
if (procargsnum)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < procargsnum; i++)
|
for (int i = 1; i < procargsnum; i++)
|
||||||
{
|
{
|
||||||
length += _tcslen(procargs[i]);
|
length += _tcslen(procargs[i]);
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ namespace System_
|
||||||
length += procargsnum;
|
length += procargsnum;
|
||||||
szBuffer = (TCHAR*)malloc(length * sizeof(TCHAR));
|
szBuffer = (TCHAR*)malloc(length * sizeof(TCHAR));
|
||||||
length = 0;
|
length = 0;
|
||||||
for (int i = 0; i < procargsnum; i++)
|
for (int i = 1; i < procargsnum; i++)
|
||||||
{
|
{
|
||||||
_tcscpy(&szBuffer[length], procargs[i]);
|
_tcscpy(&szBuffer[length], procargs[i]);
|
||||||
length += _tcslen(procargs[i]);
|
length += _tcslen(procargs[i]);
|
||||||
|
|
|
@ -148,22 +148,23 @@ namespace Sysreg_
|
||||||
qemuimgdir += _T("\\qemu-img.exe");
|
qemuimgdir += _T("\\qemu-img.exe");
|
||||||
#endif
|
#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"),
|
_T("create"),
|
||||||
NULL,
|
NULL,
|
||||||
_T("100M"),
|
_T("100M"),
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!isFileExisting(qemuimgdir))
|
|
||||||
{
|
|
||||||
cerr << "Error: ROS_EMU_PATH must contain the path to qemu and qemu-img" << endl;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
getDefaultHDDImage(output);
|
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;
|
cerr << "Creating HDD Image ..." << output << endl;
|
||||||
if (OsSupport::createProcess ((TCHAR*)qemuimgdir.c_str(), 3, options, true))
|
if (OsSupport::createProcess ((TCHAR*)qemuimgdir.c_str(), 3, options, true))
|
||||||
|
|
Loading…
Reference in a new issue