From 7f230f4ac2a1b544b47ded0584c22822b9bd65d7 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Tue, 12 Oct 2010 15:58:30 +0200 Subject: Imported Upstream version 3.2.10-dfsg --- src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp') diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp index c8a57fe48..e043e8288 100644 --- a/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp +++ b/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp @@ -1,6 +1,6 @@ /* $Id: VBoxManageDisk.cpp $ */ /** @file - * VBoxManage - The disk delated commands. + * VBoxManage - The disk related commands. */ /* @@ -254,7 +254,7 @@ int handleCreateHardDisk(HandlerArg *a) } /* check the outcome */ - if ( !filename + if ( filename.isEmpty() || sizeMB == 0) return errorSyntax(USAGE_CREATEHD, "Parameters --filename and --size are required"); @@ -778,7 +778,8 @@ int handleConvertFromRaw(int argc, char *argv[]) if (!srcfilename) { srcfilename = ValueUnion.psz; -#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) +// If you change the OS list here don't forget to update VBoxManageHelp.cpp. +#ifndef RT_OS_WINDOWS fReadFromStdIn = !strcmp(srcfilename, "stdin"); #endif } @@ -1013,7 +1014,7 @@ int handleAddiSCSIDisk(HandlerArg *a) } /* check for required options */ - if (!server || !target) + if (server.isEmpty() || target.isEmpty()) return errorSyntax(USAGE_ADDISCSIDISK, "Parameters --server and --target are required"); do @@ -1203,7 +1204,7 @@ int handleShowHardDiskInfo(HandlerArg *a) Bstr description; hardDisk->COMGETTER(Description)(description.asOutParam()); - if (description) + if (!description.isEmpty()) { RTPrintf("Description: %lS\n", description.raw()); } -- cgit v1.2.3