VirtualBox

Changeset 18836 in vbox


Ignore:
Timestamp:
Apr 7, 2009 4:35:48 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
45842
Message:

VBoxManage/addiscsidisk: beautify the location string a bit when no LUN or a LUN of 0 is specified.

File:
1 edited

Legend:

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

    r18814 r18836  
    926926         * not use slashes to separate the parts, as otherwise only the last
    927927         * element comtaining information will be shown. */
    928         CHECK_ERROR_BREAK (a->virtualBox,
    929             CreateHardDisk(Bstr ("iSCSI"),
    930                            BstrFmt ("%ls|%ls|%ls", server.raw(), target.raw(), lun.raw()),
    931                            hardDisk.asOutParam()));
     928        if (lun.isEmpty() || lun == "0" || lun == "enc0")
     929        {
     930            CHECK_ERROR_BREAK (a->virtualBox,
     931                CreateHardDisk(Bstr ("iSCSI"),
     932                               BstrFmt ("%ls|%ls", server.raw(), target.raw()),
     933                               hardDisk.asOutParam()));
     934        }
     935        else
     936        {
     937            CHECK_ERROR_BREAK (a->virtualBox,
     938                CreateHardDisk(Bstr ("iSCSI"),
     939                               BstrFmt ("%ls|%ls|%ls", server.raw(), target.raw(), lun.raw()),
     940                               hardDisk.asOutParam()));
     941        }
    932942        CheckComRCBreakRC (rc);
    933943
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