VirtualBox

Changeset 30125 in vbox for trunk


Ignore:
Timestamp:
Jun 9, 2010 2:45:10 PM (15 years ago)
Author:
vboxsync
Message:

VBoxManage: fixed storageattach error handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp

    r29480 r30125  
    148148        }
    149149    }
    150 
    151     if (   FAILED(rc)
    152         || !pszCtl
    153         || port == ~0U
    154         || device == ~0U)
    155     {
    156         errorGetOpt(USAGE_STORAGEATTACH, c, &ValueUnion);
     150   
     151    if (FAILED(rc))
    157152        return 1;
    158     }
     153
     154    if (!pszCtl)
     155        return errorSyntax(USAGE_STORAGEATTACH, "Storage controller name not specified");
     156    if (port == ~0U)
     157        return errorSyntax(USAGE_STORAGEATTACH, "Port not specified");
     158    if (device == ~0U)
     159        return errorSyntax(USAGE_STORAGEATTACH, "Device not specified");
    159160
    160161    /* get the virtualbox system properties */
     
    769770        /* it's important to always close sessions */
    770771        a->session->Close();
    771         errorSyntax(USAGE_STORAGECONTROLLER, "Storage Controller Name not specified\n");
     772        errorSyntax(USAGE_STORAGECONTROLLER, "Storage controller name not specified\n");
    772773        return 1;
    773774    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette