From 19aed1070b4c9d86a37caecb8d012f6e8c612381 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Thu, 6 Sep 2007 22:49:05 +0000 Subject: [PATCH] - format hdd images with raw format - improve error checking svn path=/trunk/; revision=28910 --- reactos/tools/sysreg/rosboot_test.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/reactos/tools/sysreg/rosboot_test.cpp b/reactos/tools/sysreg/rosboot_test.cpp index 5100ca3e763..329cf1a0c83 100644 --- a/reactos/tools/sysreg/rosboot_test.cpp +++ b/reactos/tools/sysreg/rosboot_test.cpp @@ -187,25 +187,28 @@ namespace Sysreg_ cerr << "Error: ROS_EMU_PATH must contain the path to qemu and qemu-img " << qemuimgdir << endl; return false; } + _tremove(image.c_str ()); - TCHAR * options[] = { NULL, - _T("create"), - NULL, - _T("100M"), - NULL + 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; } //----------------------------------------------------------------------------------------