VirtualBox

Changeset 23934 in vbox


Ignore:
Timestamp:
Oct 21, 2009 1:52:11 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53746
Message:

VBoxManage: removed spaces after function names

Location:
trunk/src/VBox/Frontends/VBoxManage
Files:
3 edited

Legend:

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

    r23902 r23934  
    575575    if (!Guid(uuid).isEmpty())
    576576    {
    577         CHECK_ERROR (a->virtualBox, GetMachine (uuid, machine.asOutParam()));
     577        CHECK_ERROR(a->virtualBox, GetMachine(uuid, machine.asOutParam()));
    578578    }
    579579    else
    580580    {
    581         CHECK_ERROR (a->virtualBox, FindMachine (uuid, machine.asOutParam()));
     581        CHECK_ERROR(a->virtualBox, FindMachine(uuid, machine.asOutParam()));
    582582        if (SUCCEEDED (rc))
    583             machine->COMGETTER(Id) (uuid.asOutParam());
     583            machine->COMGETTER(Id)(uuid.asOutParam());
    584584    }
    585585    if (FAILED (rc))
     
    587587
    588588    /* open a session for the VM */
    589     CHECK_ERROR_RET (a->virtualBox, OpenExistingSession (a->session, uuid), 1);
     589    CHECK_ERROR_RET(a->virtualBox, OpenExistingSession(a->session, uuid), 1);
    590590
    591591    do
     
    593593        /* get the associated console */
    594594        ComPtr<IConsole> console;
    595         CHECK_ERROR_BREAK (a->session, COMGETTER(Console)(console.asOutParam()));
     595        CHECK_ERROR_BREAK(a->session, COMGETTER(Console)(console.asOutParam()));
    596596        /* ... and session machine */
    597597        ComPtr<IMachine> sessionMachine;
    598         CHECK_ERROR_BREAK (a->session, COMGETTER(Machine)(sessionMachine.asOutParam()));
     598        CHECK_ERROR_BREAK(a->session, COMGETTER(Machine)(sessionMachine.asOutParam()));
    599599
    600600        /* which command? */
    601601        if (!strcmp(a->argv[1], "pause"))
    602602        {
    603             CHECK_ERROR_BREAK (console, Pause());
     603            CHECK_ERROR_BREAK(console, Pause());
    604604        }
    605605        else if (!strcmp(a->argv[1], "resume"))
    606606        {
    607             CHECK_ERROR_BREAK (console, Resume());
     607            CHECK_ERROR_BREAK(console, Resume());
    608608        }
    609609        else if (!strcmp(a->argv[1], "reset"))
    610610        {
    611             CHECK_ERROR_BREAK (console, Reset());
     611            CHECK_ERROR_BREAK(console, Reset());
    612612        }
    613613        else if (!strcmp(a->argv[1], "poweroff"))
    614614        {
    615615            ComPtr<IProgress> progress;
    616             CHECK_ERROR_BREAK (console, PowerDown(progress.asOutParam()));
     616            CHECK_ERROR_BREAK(console, PowerDown(progress.asOutParam()));
    617617
    618618            showProgress(progress);
     
    636636        {
    637637            ComPtr<IProgress> progress;
    638             CHECK_ERROR_BREAK (console, SaveState(progress.asOutParam()));
     638            CHECK_ERROR_BREAK(console, SaveState(progress.asOutParam()));
    639639
    640640            showProgress(progress);
     
    657657        else if (!strcmp(a->argv[1], "acpipowerbutton"))
    658658        {
    659             CHECK_ERROR_BREAK (console, PowerButton());
     659            CHECK_ERROR_BREAK(console, PowerButton());
    660660        }
    661661        else if (!strcmp(a->argv[1], "acpisleepbutton"))
    662662        {
    663             CHECK_ERROR_BREAK (console, SleepButton());
     663            CHECK_ERROR_BREAK(console, SleepButton());
    664664        }
    665665        else if (!strcmp(a->argv[1], "injectnmi"))
     
    738738            ULONG NetworkAdapterCount = 0;
    739739            ComPtr <ISystemProperties> info;
    740             CHECK_ERROR_BREAK (a->virtualBox, COMGETTER(SystemProperties) (info.asOutParam()));
    741             CHECK_ERROR_BREAK (info, COMGETTER(NetworkAdapterCount) (&NetworkAdapterCount));
     740            CHECK_ERROR_BREAK(a->virtualBox, COMGETTER(SystemProperties)(info.asOutParam()));
     741            CHECK_ERROR_BREAK(info, COMGETTER(NetworkAdapterCount)(&NetworkAdapterCount));
    742742
    743743            unsigned n = parseNum(&a->argv[1][12], NetworkAdapterCount, "NIC");
     
    755755            /* get the corresponding network adapter */
    756756            ComPtr<INetworkAdapter> adapter;
    757             CHECK_ERROR_BREAK (sessionMachine, GetNetworkAdapter(n - 1, adapter.asOutParam()));
     757            CHECK_ERROR_BREAK(sessionMachine, GetNetworkAdapter(n - 1, adapter.asOutParam()));
    758758            if (adapter)
    759759            {
    760760                if (!strcmp(a->argv[2], "on"))
    761761                {
    762                     CHECK_ERROR_BREAK (adapter, COMSETTER(CableConnected)(TRUE));
     762                    CHECK_ERROR_BREAK(adapter, COMSETTER(CableConnected)(TRUE));
    763763                }
    764764                else if (!strcmp(a->argv[2], "off"))
    765765                {
    766                     CHECK_ERROR_BREAK (adapter, COMSETTER(CableConnected)(FALSE));
     766                    CHECK_ERROR_BREAK(adapter, COMSETTER(CableConnected)(FALSE));
    767767                }
    768768                else
     
    785785            ULONG NetworkAdapterCount = 0;
    786786            ComPtr <ISystemProperties> info;
    787             CHECK_ERROR_BREAK (a->virtualBox, COMGETTER(SystemProperties) (info.asOutParam()));
    788             CHECK_ERROR_BREAK (info, COMGETTER(NetworkAdapterCount) (&NetworkAdapterCount));
     787            CHECK_ERROR_BREAK(a->virtualBox, COMGETTER(SystemProperties)(info.asOutParam()));
     788            CHECK_ERROR_BREAK(info, COMGETTER(NetworkAdapterCount)(&NetworkAdapterCount));
    789789
    790790            unsigned n = parseNum(&a->argv[1][12], NetworkAdapterCount, "NIC");
     
    803803            /* get the corresponding network adapter */
    804804            ComPtr<INetworkAdapter> adapter;
    805             CHECK_ERROR_BREAK (sessionMachine, GetNetworkAdapter(n - 1, adapter.asOutParam()));
     805            CHECK_ERROR_BREAK(sessionMachine, GetNetworkAdapter(n - 1, adapter.asOutParam()));
    806806            if (adapter)
    807807            {
     
    812812                    if (a->argv[2])
    813813                    {
    814                         CHECK_ERROR_RET(adapter, COMSETTER(TraceFile) (Bstr(a->argv[2])), 1);
     814                        CHECK_ERROR_RET(adapter, COMSETTER(TraceFile)(Bstr(a->argv[2])), 1);
    815815                    }
    816816                    else
     
    832832            ULONG NetworkAdapterCount = 0;
    833833            ComPtr <ISystemProperties> info;
    834             CHECK_ERROR_BREAK (a->virtualBox, COMGETTER(SystemProperties) (info.asOutParam()));
    835             CHECK_ERROR_BREAK (info, COMGETTER(NetworkAdapterCount) (&NetworkAdapterCount));
     834            CHECK_ERROR_BREAK(a->virtualBox, COMGETTER(SystemProperties)(info.asOutParam()));
     835            CHECK_ERROR_BREAK(info, COMGETTER(NetworkAdapterCount)(&NetworkAdapterCount));
    836836
    837837            unsigned n = parseNum(&a->argv[1][8], NetworkAdapterCount, "NIC");
     
    850850            /* get the corresponding network adapter */
    851851            ComPtr<INetworkAdapter> adapter;
    852             CHECK_ERROR_BREAK (sessionMachine, GetNetworkAdapter(n - 1, adapter.asOutParam()));
     852            CHECK_ERROR_BREAK(sessionMachine, GetNetworkAdapter(n - 1, adapter.asOutParam()));
    853853            if (adapter)
    854854            {
     
    883883            ULONG NetworkAdapterCount = 0;
    884884            ComPtr <ISystemProperties> info;
    885             CHECK_ERROR_BREAK (a->virtualBox, COMGETTER(SystemProperties) (info.asOutParam()));
    886             CHECK_ERROR_BREAK (info, COMGETTER(NetworkAdapterCount) (&NetworkAdapterCount));
     885            CHECK_ERROR_BREAK(a->virtualBox, COMGETTER(SystemProperties)(info.asOutParam()));
     886            CHECK_ERROR_BREAK(info, COMGETTER(NetworkAdapterCount)(&NetworkAdapterCount));
    887887
    888888            unsigned n = parseNum(&a->argv[1][3], NetworkAdapterCount, "NIC");
     
    901901            /* get the corresponding network adapter */
    902902            ComPtr<INetworkAdapter> adapter;
    903             CHECK_ERROR_BREAK (sessionMachine, GetNetworkAdapter(n - 1, adapter.asOutParam()));
     903            CHECK_ERROR_BREAK(sessionMachine, GetNetworkAdapter(n - 1, adapter.asOutParam()));
    904904            if (adapter)
    905905            {
     
    910910                    if (!strcmp(a->argv[2], "null"))
    911911                    {
    912                         CHECK_ERROR_RET(adapter, COMSETTER(Enabled) (TRUE), 1);
     912                        CHECK_ERROR_RET(adapter, COMSETTER(Enabled)(TRUE), 1);
    913913                        CHECK_ERROR_RET(adapter, Detach(), 1);
    914914                    }
    915915                    else if (!strcmp(a->argv[2], "nat"))
    916916                    {
    917                         CHECK_ERROR_RET(adapter, COMSETTER(Enabled) (TRUE), 1);
     917                        CHECK_ERROR_RET(adapter, COMSETTER(Enabled)(TRUE), 1);
    918918                        if (a->argc == 4)
    919919                            CHECK_ERROR_RET(adapter, COMSETTER(NATNetwork)(Bstr(a->argv[3])), 1);
     
    929929                            break;
    930930                        }
    931                         CHECK_ERROR_RET(adapter, COMSETTER(Enabled) (TRUE), 1);
     931                        CHECK_ERROR_RET(adapter, COMSETTER(Enabled)(TRUE), 1);
    932932                        CHECK_ERROR_RET(adapter, COMSETTER(HostInterface)(Bstr(a->argv[3])), 1);
    933933                        CHECK_ERROR_RET(adapter, AttachToBridgedInterface(), 1);
     
    941941                            break;
    942942                        }
    943                         CHECK_ERROR_RET(adapter, COMSETTER(Enabled) (TRUE), 1);
     943                        CHECK_ERROR_RET(adapter, COMSETTER(Enabled)(TRUE), 1);
    944944                        CHECK_ERROR_RET(adapter, COMSETTER(InternalNetwork)(Bstr(a->argv[3])), 1);
    945945                        CHECK_ERROR_RET(adapter, AttachToInternalNetwork(), 1);
     
    954954                            break;
    955955                        }
    956                         CHECK_ERROR_RET(adapter, COMSETTER(Enabled) (TRUE), 1);
     956                        CHECK_ERROR_RET(adapter, COMSETTER(Enabled)(TRUE), 1);
    957957                        CHECK_ERROR_RET(adapter, COMSETTER(HostInterface)(Bstr(a->argv[3])), 1);
    958958                        CHECK_ERROR_RET(adapter, AttachToHostOnlyInterface(), 1);
     
    990990                if (!strcmp(a->argv[2], "on"))
    991991                {
    992                     CHECK_ERROR_BREAK (vrdpServer, COMSETTER(Enabled)(TRUE));
     992                    CHECK_ERROR_BREAK(vrdpServer, COMSETTER(Enabled)(TRUE));
    993993                }
    994994                else if (!strcmp(a->argv[2], "off"))
    995995                {
    996                     CHECK_ERROR_BREAK (vrdpServer, COMSETTER(Enabled)(FALSE));
     996                    CHECK_ERROR_BREAK(vrdpServer, COMSETTER(Enabled)(FALSE));
    997997                }
    998998                else
     
    10291029        }
    10301030#endif /* VBOX_WITH_VRDP */
    1031         else if (   !strcmp (a->argv[1], "usbattach")
    1032                  || !strcmp (a->argv[1], "usbdetach"))
     1031        else if (   !strcmp(a->argv[1], "usbattach")
     1032                 || !strcmp(a->argv[1], "usbdetach"))
    10331033        {
    10341034            if (a->argc < 3)
     
    10481048                {
    10491049                    ComPtr <IHost> host;
    1050                     CHECK_ERROR_BREAK (a->virtualBox, COMGETTER(Host) (host.asOutParam()));
     1050                    CHECK_ERROR_BREAK(a->virtualBox, COMGETTER(Host)(host.asOutParam()));
    10511051                    SafeIfaceArray <IHostUSBDevice> coll;
    1052                     CHECK_ERROR_BREAK (host, COMGETTER(USBDevices) (ComSafeArrayAsOutParam(coll)));
     1052                    CHECK_ERROR_BREAK(host, COMGETTER(USBDevices)(ComSafeArrayAsOutParam(coll)));
    10531053                    ComPtr <IHostUSBDevice> dev;
    1054                     CHECK_ERROR_BREAK (host, FindUSBDeviceByAddress (Bstr (a->argv [2]), dev.asOutParam()));
    1055                     CHECK_ERROR_BREAK (dev, COMGETTER(Id) (usbId.asOutParam()));
     1054                    CHECK_ERROR_BREAK(host, FindUSBDeviceByAddress(Bstr(a->argv [2]), dev.asOutParam()));
     1055                    CHECK_ERROR_BREAK(dev, COMGETTER(Id)(usbId.asOutParam()));
    10561056                }
    10571057                else
    10581058                {
    10591059                    SafeIfaceArray <IUSBDevice> coll;
    1060                     CHECK_ERROR_BREAK (console, COMGETTER(USBDevices)(ComSafeArrayAsOutParam(coll)));
     1060                    CHECK_ERROR_BREAK(console, COMGETTER(USBDevices)(ComSafeArrayAsOutParam(coll)));
    10611061                    ComPtr <IUSBDevice> dev;
    1062                     CHECK_ERROR_BREAK (console, FindUSBDeviceByAddress (Bstr (a->argv [2]),
     1062                    CHECK_ERROR_BREAK(console, FindUSBDeviceByAddress(Bstr(a->argv [2]),
    10631063                                                       dev.asOutParam()));
    1064                     CHECK_ERROR_BREAK (dev, COMGETTER(Id) (usbId.asOutParam()));
     1064                    CHECK_ERROR_BREAK(dev, COMGETTER(Id)(usbId.asOutParam()));
    10651065                }
    10661066            }
    10671067
    10681068            if (attach)
    1069                 CHECK_ERROR_BREAK (console, AttachUSBDevice (usbId));
     1069                CHECK_ERROR_BREAK(console, AttachUSBDevice(usbId));
    10701070            else
    10711071            {
    10721072                ComPtr <IUSBDevice> dev;
    1073                 CHECK_ERROR_BREAK (console, DetachUSBDevice (usbId, dev.asOutParam()));
     1073                CHECK_ERROR_BREAK(console, DetachUSBDevice(usbId, dev.asOutParam()));
    10741074            }
    10751075        }
     
    13431343            rc = E_FAIL;
    13441344        }
    1345     }
    1346     while (0);
     1345    } while (0);
    13471346
    13481347    a->session->Close();
    13491348
    1350     return SUCCEEDED (rc) ? 0 : 1;
     1349    return SUCCEEDED(rc) ? 0 : 1;
    13511350}
    13521351
     
    13791378                CHECK_ERROR_BREAK(a->session, COMGETTER(Console)(console.asOutParam()));
    13801379                CHECK_ERROR_BREAK(console, ForgetSavedState(true));
    1381             }
    1382             while (0);
     1380            } while (0);
    13831381            CHECK_ERROR_BREAK(a->session, Close());
    1384         }
    1385         while (0);
     1382        } while (0);
    13861383    }
    13871384
     
    14161413                ComPtr<IConsole> console;
    14171414                CHECK_ERROR_BREAK(a->session, COMGETTER(Console)(console.asOutParam()));
    1418                 CHECK_ERROR_BREAK(console, AdoptSavedState (Bstr (a->argv[1])));
    1419             }
    1420             while (0);
     1415                CHECK_ERROR_BREAK(console, AdoptSavedState(Bstr(a->argv[1])));
     1416            } while (0);
    14211417            CHECK_ERROR_BREAK(a->session, Close());
    1422         }
    1423         while (0);
     1418        } while (0);
    14241419    }
    14251420
     
    16051600}
    16061601
    1607 static int handleSharedFolder (HandlerArg *a)
     1602static int handleSharedFolder(HandlerArg *a)
    16081603{
    16091604    HRESULT rc;
     
    16831678
    16841679            /* open an existing session for the VM */
    1685             CHECK_ERROR_RET(a->virtualBox, OpenExistingSession (a->session, uuid), 1);
     1680            CHECK_ERROR_RET(a->virtualBox, OpenExistingSession(a->session, uuid), 1);
    16861681            /* get the session machine */
    16871682            CHECK_ERROR_RET(a->session, COMGETTER(Machine)(machine.asOutParam()), 1);
     
    16971692        {
    16981693            /* open a session for the VM */
    1699             CHECK_ERROR_RET (a->virtualBox, OpenSession(a->session, uuid), 1);
     1694            CHECK_ERROR_RET(a->virtualBox, OpenSession(a->session, uuid), 1);
    17001695
    17011696            /* get the mutable session machine */
     
    17471742
    17481743            /* open an existing session for the VM */
    1749             CHECK_ERROR_RET(a->virtualBox, OpenExistingSession (a->session, uuid), 1);
     1744            CHECK_ERROR_RET(a->virtualBox, OpenExistingSession(a->session, uuid), 1);
    17501745            /* get the session machine */
    17511746            CHECK_ERROR_RET(a->session, COMGETTER(Machine)(machine.asOutParam()), 1);
     
    17611756        {
    17621757            /* open a session for the VM */
    1763             CHECK_ERROR_RET (a->virtualBox, OpenSession(a->session, uuid), 1);
     1758            CHECK_ERROR_RET(a->virtualBox, OpenSession(a->session, uuid), 1);
    17641759
    17651760            /* get the mutable session machine */
     
    20812076    // end "all-stuff" scope
    20822077    ////////////////////////////////////////////////////////////////////////////
    2083     }
    2084     while (0);
     2078    } while (0);
    20852079
    20862080    com::Shutdown();
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r23928 r23934  
    223223    {
    224224        ComPtr <ISystemProperties> info;
    225         CHECK_ERROR_RET (a->virtualBox, COMGETTER(SystemProperties) (info.asOutParam()), 1);
    226         CHECK_ERROR_RET (info, COMGETTER(NetworkAdapterCount) (&NetworkAdapterCount), 1);
     225        CHECK_ERROR_RET(a->virtualBox, COMGETTER(SystemProperties)(info.asOutParam()), 1);
     226        CHECK_ERROR_RET(info, COMGETTER(NetworkAdapterCount)(&NetworkAdapterCount), 1);
    227227    }
    228228    ULONG SerialPortCount = 0;
    229229    {
    230230        ComPtr <ISystemProperties> info;
    231         CHECK_ERROR_RET (a->virtualBox, COMGETTER(SystemProperties) (info.asOutParam()), 1);
    232         CHECK_ERROR_RET (info, COMGETTER(SerialPortCount) (&SerialPortCount), 1);
     231        CHECK_ERROR_RET(a->virtualBox, COMGETTER(SystemProperties)(info.asOutParam()), 1);
     232        CHECK_ERROR_RET(info, COMGETTER(SerialPortCount)(&SerialPortCount), 1);
    233233    }
    234234
     
    236236    if (!Guid(machineuuid).isEmpty())
    237237    {
    238         CHECK_ERROR_RET (a->virtualBox, GetMachine (machineuuid, machine.asOutParam()), 1);
     238        CHECK_ERROR_RET(a->virtualBox, GetMachine(machineuuid, machine.asOutParam()), 1);
    239239    }
    240240    else
    241241    {
    242         CHECK_ERROR_RET (a->virtualBox, FindMachine(Bstr(a->argv[0]), machine.asOutParam()), 1);
     242        CHECK_ERROR_RET(a->virtualBox, FindMachine(Bstr(a->argv[0]), machine.asOutParam()), 1);
    243243        machine->COMGETTER(Id)(machineuuid.asOutParam());
    244244    }
    245245
    246246    /* open a session for the VM */
    247     CHECK_ERROR_RET (a->virtualBox, OpenSession(a->session, machineuuid), 1);
     247    CHECK_ERROR_RET(a->virtualBox, OpenSession(a->session, machineuuid), 1);
    248248
    249249    /* get the mutable session machine */
     
    251251    machine->COMGETTER(BIOSSettings)(biosSettings.asOutParam());
    252252
    253     RTGetOptInit (&GetOptState, a->argc, a->argv, g_aModifyVMOptions,
    254                   RT_ELEMENTS(g_aModifyVMOptions), 1, 0 /* fFlags */);
     253    RTGetOptInit(&GetOptState, a->argc, a->argv, g_aModifyVMOptions,
     254                 RT_ELEMENTS(g_aModifyVMOptions), 1, 0 /* fFlags */);
    255255
    256256    while (   SUCCEEDED (rc)
     
    262262            {
    263263                if (ValueUnion.psz)
    264                     CHECK_ERROR (machine, COMSETTER(Name)(Bstr(ValueUnion.psz)));
     264                    CHECK_ERROR(machine, COMSETTER(Name)(Bstr(ValueUnion.psz)));
    265265                break;
    266266            }
     
    270270                {
    271271                    ComPtr<IGuestOSType> guestOSType;
    272                     CHECK_ERROR (a->virtualBox, GetGuestOSType(Bstr(ValueUnion.psz), guestOSType.asOutParam()));
     272                    CHECK_ERROR(a->virtualBox, GetGuestOSType(Bstr(ValueUnion.psz), guestOSType.asOutParam()));
    273273                    if (SUCCEEDED(rc) && guestOSType)
    274274                    {
    275                         CHECK_ERROR (machine, COMSETTER(OSTypeId)(Bstr(ValueUnion.psz)));
     275                        CHECK_ERROR(machine, COMSETTER(OSTypeId)(Bstr(ValueUnion.psz)));
    276276                    }
    277277                    else
     
    287287            {
    288288                if (ValueUnion.u32 > 0)
    289                     CHECK_ERROR (machine, COMSETTER(MemorySize)(ValueUnion.u32));
     289                    CHECK_ERROR(machine, COMSETTER(MemorySize)(ValueUnion.u32));
    290290                break;
    291291            }
     
    294294            {
    295295                if (ValueUnion.u32 > 0)
    296                     CHECK_ERROR (machine, COMSETTER(VRAMSize)(ValueUnion.u32));
     296                    CHECK_ERROR(machine, COMSETTER(VRAMSize)(ValueUnion.u32));
    297297                break;
    298298            }
     
    304304                    if (!strcmp(ValueUnion.psz, "efi"))
    305305                    {
    306                         CHECK_ERROR (machine, COMSETTER(FirmwareType)(FirmwareType_EFI));
     306                        CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFI));
    307307                    }
    308308                    else if (!strcmp(ValueUnion.psz, "bios"))
    309309                    {
    310                         CHECK_ERROR (machine, COMSETTER(FirmwareType)(FirmwareType_BIOS));
     310                        CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_BIOS));
    311311                    }
    312312                    else
     
    325325                    if (!strcmp(ValueUnion.psz, "on"))
    326326                    {
    327                         CHECK_ERROR (biosSettings, COMSETTER(ACPIEnabled)(true));
     327                        CHECK_ERROR(biosSettings, COMSETTER(ACPIEnabled)(true));
    328328                    }
    329329                    else if (!strcmp(ValueUnion.psz, "off"))
    330330                    {
    331                         CHECK_ERROR (biosSettings, COMSETTER(ACPIEnabled)(false));
     331                        CHECK_ERROR(biosSettings, COMSETTER(ACPIEnabled)(false));
    332332                    }
    333333                    else
     
    346346                    if (!strcmp(ValueUnion.psz, "on"))
    347347                    {
    348                         CHECK_ERROR (biosSettings, COMSETTER(IOAPICEnabled)(true));
     348                        CHECK_ERROR(biosSettings, COMSETTER(IOAPICEnabled)(true));
    349349                    }
    350350                    else if (!strcmp(ValueUnion.psz, "off"))
    351351                    {
    352                         CHECK_ERROR (biosSettings, COMSETTER(IOAPICEnabled)(false));
     352                        CHECK_ERROR(biosSettings, COMSETTER(IOAPICEnabled)(false));
    353353                    }
    354354                    else
     
    367367                    if (!strcmp(ValueUnion.psz, "on"))
    368368                    {
    369                         CHECK_ERROR (machine, SetCpuProperty(CpuPropertyType_PAE, true));
     369                        CHECK_ERROR(machine, SetCpuProperty(CpuPropertyType_PAE, true));
    370370                    }
    371371                    else if (!strcmp(ValueUnion.psz, "off"))
    372372                    {
    373                         CHECK_ERROR (machine, SetCpuProperty(CpuPropertyType_PAE, false));
     373                        CHECK_ERROR(machine, SetCpuProperty(CpuPropertyType_PAE, false));
    374374                    }
    375375                    else
     
    388388                    if (!strcmp(ValueUnion.psz, "on"))
    389389                    {
    390                         CHECK_ERROR (machine, SetCpuProperty(CpuPropertyType_Synthetic, true));
     390                        CHECK_ERROR(machine, SetCpuProperty(CpuPropertyType_Synthetic, true));
    391391                    }
    392392                    else if (!strcmp(ValueUnion.psz, "off"))
    393393                    {
    394                         CHECK_ERROR (machine, SetCpuProperty(CpuPropertyType_Synthetic, false));
     394                        CHECK_ERROR(machine, SetCpuProperty(CpuPropertyType_Synthetic, false));
    395395                    }
    396396                    else
     
    409409                    if (!strcmp(ValueUnion.psz, "on"))
    410410                    {
    411                         CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_Enabled, TRUE));
     411                        CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_Enabled, TRUE));
    412412                    }
    413413                    else if (!strcmp(ValueUnion.psz, "off"))
    414414                    {
    415                         CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_Enabled, FALSE));
     415                        CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_Enabled, FALSE));
    416416                    }
    417417                    else
     
    430430                    if (!strcmp(ValueUnion.psz, "on"))
    431431                    {
    432                         CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_Exclusive, TRUE));
     432                        CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_Exclusive, TRUE));
    433433                    }
    434434                    else if (!strcmp(ValueUnion.psz, "off"))
    435435                    {
    436                         CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_Exclusive, FALSE));
     436                        CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_Exclusive, FALSE));
    437437                    }
    438438                    else
     
    451451                    if (!strcmp(ValueUnion.psz, "on"))
    452452                    {
    453                         CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, TRUE));
     453                        CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, TRUE));
    454454                    }
    455455                    else if (!strcmp(ValueUnion.psz, "off"))
    456456                    {
    457                         CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, FALSE));
     457                        CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, FALSE));
    458458                    }
    459459                    else
     
    472472                    if (!strcmp(ValueUnion.psz, "on"))
    473473                    {
    474                         CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_VPID, TRUE));
     474                        CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_VPID, TRUE));
    475475                    }
    476476                    else if (!strcmp(ValueUnion.psz, "off"))
    477477                    {
    478                         CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_VPID, FALSE));
     478                        CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_VPID, FALSE));
    479479                    }
    480480                    else
     
    490490            {
    491491                if (ValueUnion.u32 > 0)
    492                     CHECK_ERROR (machine, COMSETTER(CPUCount)(ValueUnion.u32));
     492                    CHECK_ERROR(machine, COMSETTER(CPUCount)(ValueUnion.u32));
    493493                break;
    494494            }
     
    497497            {
    498498                if (ValueUnion.u32 > 0)
    499                     CHECK_ERROR (machine, COMSETTER(MonitorCount)(ValueUnion.u32));
     499                    CHECK_ERROR(machine, COMSETTER(MonitorCount)(ValueUnion.u32));
    500500                break;
    501501            }
     
    507507                    if (!strcmp(ValueUnion.psz, "on"))
    508508                    {
    509                         CHECK_ERROR (machine, COMSETTER(Accelerate3DEnabled)(true));
     509                        CHECK_ERROR(machine, COMSETTER(Accelerate3DEnabled)(true));
    510510                    }
    511511                    else if (!strcmp(ValueUnion.psz, "off"))
    512512                    {
    513                         CHECK_ERROR (machine, COMSETTER(Accelerate3DEnabled)(false));
     513                        CHECK_ERROR(machine, COMSETTER(Accelerate3DEnabled)(false));
    514514                    }
    515515                    else
     
    529529                    if (!strcmp(ValueUnion.psz, "on"))
    530530                    {
    531                         CHECK_ERROR (machine, COMSETTER(Accelerate2DVideoEnabled)(true));
     531                        CHECK_ERROR(machine, COMSETTER(Accelerate2DVideoEnabled)(true));
    532532                    }
    533533                    else if (!strcmp(ValueUnion.psz, "off"))
    534534                    {
    535                         CHECK_ERROR (machine, COMSETTER(Accelerate2DVideoEnabled)(false));
     535                        CHECK_ERROR(machine, COMSETTER(Accelerate2DVideoEnabled)(false));
    536536                    }
    537537                    else
     
    551551                    if (!strcmp(ValueUnion.psz, "on"))
    552552                    {
    553                         CHECK_ERROR (biosSettings, COMSETTER(LogoFadeIn)(true));
     553                        CHECK_ERROR(biosSettings, COMSETTER(LogoFadeIn)(true));
    554554                    }
    555555                    else if (!strcmp(ValueUnion.psz, "off"))
    556556                    {
    557                         CHECK_ERROR (biosSettings, COMSETTER(LogoFadeIn)(false));
     557                        CHECK_ERROR(biosSettings, COMSETTER(LogoFadeIn)(false));
    558558                    }
    559559                    else
     
    572572                    if (!strcmp(ValueUnion.psz, "on"))
    573573                    {
    574                         CHECK_ERROR (biosSettings, COMSETTER(LogoFadeOut)(true));
     574                        CHECK_ERROR(biosSettings, COMSETTER(LogoFadeOut)(true));
    575575                    }
    576576                    else if (!strcmp(ValueUnion.psz, "off"))
    577577                    {
    578                         CHECK_ERROR (biosSettings, COMSETTER(LogoFadeOut)(false));
     578                        CHECK_ERROR(biosSettings, COMSETTER(LogoFadeOut)(false));
    579579                    }
    580580                    else
     
    591591            {
    592592                if (ValueUnion.u64 > 0)
    593                     CHECK_ERROR (biosSettings, COMSETTER(LogoDisplayTime)(ValueUnion.u64));
     593                    CHECK_ERROR(biosSettings, COMSETTER(LogoDisplayTime)(ValueUnion.u64));
    594594                break;
    595595            }
     
    598598            {
    599599                if (ValueUnion.psz)
    600                     CHECK_ERROR (biosSettings, COMSETTER(LogoImagePath)(Bstr(ValueUnion.psz)));
     600                    CHECK_ERROR(biosSettings, COMSETTER(LogoImagePath)(Bstr(ValueUnion.psz)));
    601601                break;
    602602            }
     
    607607                {
    608608                    if (!strcmp(ValueUnion.psz, "disabled"))
    609                         CHECK_ERROR (biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_Disabled));
     609                        CHECK_ERROR(biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_Disabled));
    610610                    else if (!strcmp(ValueUnion.psz, "menuonly"))
    611                         CHECK_ERROR (biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_MenuOnly));
     611                        CHECK_ERROR(biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_MenuOnly));
    612612                    else if (!strcmp(ValueUnion.psz, "messageandmenu"))
    613                         CHECK_ERROR (biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_MessageAndMenu));
     613                        CHECK_ERROR(biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_MessageAndMenu));
    614614                    else
    615615                    {
     
    624624            {
    625625                if (ValueUnion.u64 > 0)
    626                     CHECK_ERROR (biosSettings, COMSETTER(TimeOffset)(ValueUnion.u64));
     626                    CHECK_ERROR(biosSettings, COMSETTER(TimeOffset)(ValueUnion.u64));
    627627                break;
    628628            }
     
    634634                    if (!strcmp(ValueUnion.psz, "on"))
    635635                    {
    636                         CHECK_ERROR (biosSettings, COMSETTER(PXEDebugEnabled)(true));
     636                        CHECK_ERROR(biosSettings, COMSETTER(PXEDebugEnabled)(true));
    637637                    }
    638638                    else if (!strcmp(ValueUnion.psz, "off"))
    639639                    {
    640                         CHECK_ERROR (biosSettings, COMSETTER(PXEDebugEnabled)(false));
     640                        CHECK_ERROR(biosSettings, COMSETTER(PXEDebugEnabled)(false));
    641641                    }
    642642                    else
     
    658658                if (!strcmp(ValueUnion.psz, "none"))
    659659                {
    660                     CHECK_ERROR (machine, SetBootOrder (GetOptState.uIndex, DeviceType_Null));
     660                    CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_Null));
    661661                }
    662662                else if (!strcmp(ValueUnion.psz, "floppy"))
    663663                {
    664                     CHECK_ERROR (machine, SetBootOrder (GetOptState.uIndex, DeviceType_Floppy));
     664                    CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_Floppy));
    665665                }
    666666                else if (!strcmp(ValueUnion.psz, "dvd"))
    667667                {
    668                     CHECK_ERROR (machine, SetBootOrder (GetOptState.uIndex, DeviceType_DVD));
     668                    CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_DVD));
    669669                }
    670670                else if (!strcmp(ValueUnion.psz, "disk"))
    671671                {
    672                     CHECK_ERROR (machine, SetBootOrder (GetOptState.uIndex, DeviceType_HardDisk));
     672                    CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_HardDisk));
    673673                }
    674674                else if (!strcmp(ValueUnion.psz, "net"))
    675675                {
    676                     CHECK_ERROR (machine, SetBootOrder (GetOptState.uIndex, DeviceType_Network));
     676                    CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_Network));
    677677                }
    678678                else
     
    701701                        {
    702702                            /* open the new hard disk object */
    703                             CHECK_ERROR (a->virtualBox,
     703                            CHECK_ERROR(a->virtualBox,
    704704                                         OpenHardDisk(Bstr(ValueUnion.psz),
    705705                                                      AccessMode_ReadWrite, false, Bstr(""),
     
    710710                    {
    711711                        hardDisk->COMGETTER(Id)(uuid.asOutParam());
    712                         CHECK_ERROR (machine, AttachDevice(Bstr("IDE Controller"), 0, 0, DeviceType_HardDisk, uuid));
     712                        CHECK_ERROR(machine, AttachDevice(Bstr("IDE Controller"), 0, 0, DeviceType_HardDisk, uuid));
    713713                    }
    714714                    else
     
    737737                        {
    738738                            /* open the new hard disk object */
    739                             CHECK_ERROR (a->virtualBox,
     739                            CHECK_ERROR(a->virtualBox,
    740740                                         OpenHardDisk(Bstr(ValueUnion.psz),
    741741                                                      AccessMode_ReadWrite, false, Bstr(""),
     
    746746                    {
    747747                        hardDisk->COMGETTER(Id)(uuid.asOutParam());
    748                         CHECK_ERROR (machine, AttachDevice(Bstr("IDE Controller"), 0, 1, DeviceType_HardDisk, uuid));
     748                        CHECK_ERROR(machine, AttachDevice(Bstr("IDE Controller"), 0, 1, DeviceType_HardDisk, uuid));
    749749                    }
    750750                    else
     
    773773                        {
    774774                            /* open the new hard disk object */
    775                             CHECK_ERROR (a->virtualBox,
     775                            CHECK_ERROR(a->virtualBox,
    776776                                         OpenHardDisk(Bstr(ValueUnion.psz),
    777777                                                      AccessMode_ReadWrite, false, Bstr(""),
     
    782782                    {
    783783                        hardDisk->COMGETTER(Id)(uuid.asOutParam());
    784                         CHECK_ERROR (machine, AttachDevice(Bstr("IDE Controller"), 1, 1, DeviceType_HardDisk, uuid));
     784                        CHECK_ERROR(machine, AttachDevice(Bstr("IDE Controller"), 1, 1, DeviceType_HardDisk, uuid));
    785785                    }
    786786                    else
     
    793793            {
    794794                ComPtr<IStorageController> storageController;
    795                 CHECK_ERROR (machine, GetStorageControllerByName(Bstr("IDE Controller"),
     795                CHECK_ERROR(machine, GetStorageControllerByName(Bstr("IDE Controller"),
    796796                                                                 storageController.asOutParam()));
    797797
     
    819819            {
    820820                ComPtr<IStorageController> SataCtl;
    821                 CHECK_ERROR (machine, GetStorageControllerByName(Bstr("SATA"), SataCtl.asOutParam()));
     821                CHECK_ERROR(machine, GetStorageControllerByName(Bstr("SATA"), SataCtl.asOutParam()));
    822822
    823823                if ((GetOptState.uIndex < 1) && (GetOptState.uIndex > 4))
     
    840840            {
    841841                ComPtr<IStorageController> SataCtl;
    842                 CHECK_ERROR (machine, GetStorageControllerByName(Bstr("SATA"), SataCtl.asOutParam()));
     842                CHECK_ERROR(machine, GetStorageControllerByName(Bstr("SATA"), SataCtl.asOutParam()));
    843843
    844844                if (SUCCEEDED(rc) && ValueUnion.u32 > 0)
     
    872872                        {
    873873                            /* open the new hard disk object */
    874                             CHECK_ERROR (a->virtualBox,
     874                            CHECK_ERROR(a->virtualBox,
    875875                                         OpenHardDisk(Bstr(ValueUnion.psz), AccessMode_ReadWrite,
    876876                                                      false, Bstr(""), false,
     
    881881                    {
    882882                        hardDisk->COMGETTER(Id)(uuid.asOutParam());
    883                         CHECK_ERROR (machine,
     883                        CHECK_ERROR(machine,
    884884                                     AttachDevice(Bstr("SATA"), GetOptState.uIndex,
    885885                                                  0, DeviceType_HardDisk, uuid));
     
    896896                {
    897897                    ComPtr<IStorageController> ctl;
    898                     CHECK_ERROR (machine, AddStorageController(Bstr("SATA"), StorageBus_SATA, ctl.asOutParam()));
    899                     CHECK_ERROR (ctl, COMSETTER(ControllerType)(StorageControllerType_IntelAhci));
     898                    CHECK_ERROR(machine, AddStorageController(Bstr("SATA"), StorageBus_SATA, ctl.asOutParam()));
     899                    CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_IntelAhci));
    900900                }
    901901                else if (!strcmp(ValueUnion.psz, "off") || !strcmp(ValueUnion.psz, "disable"))
    902                     CHECK_ERROR (machine, RemoveStorageController(Bstr("SATA")));
     902                    CHECK_ERROR(machine, RemoveStorageController(Bstr("SATA")));
    903903                else
    904904                    return errorArgument("Invalid --usb argument '%s'", ValueUnion.psz);
     
    932932                        {
    933933                            /* open the new hard disk object */
    934                             CHECK_ERROR (a->virtualBox,
     934                            CHECK_ERROR(a->virtualBox,
    935935                                         OpenHardDisk(Bstr(ValueUnion.psz),
    936936                                                           AccessMode_ReadWrite, false, Bstr(""),
     
    943943                        rc = machine->AttachDevice(Bstr("LsiLogic"), GetOptState.uIndex, 0, DeviceType_HardDisk, uuid);
    944944                        if (FAILED(rc))
    945                             CHECK_ERROR (machine,
     945                            CHECK_ERROR(machine,
    946946                                         AttachDevice(Bstr("BusLogic"),
    947947                                                      GetOptState.uIndex, 0,
     
    962962                    rc = machine->RemoveStorageController(Bstr("BusLogic"));
    963963                    if (FAILED(rc))
    964                         CHECK_ERROR (machine, RemoveStorageController(Bstr("LsiLogic")));
    965 
    966                     CHECK_ERROR (machine,
     964                        CHECK_ERROR(machine, RemoveStorageController(Bstr("LsiLogic")));
     965
     966                    CHECK_ERROR(machine,
    967967                                 AddStorageController(Bstr("LsiLogic"),
    968968                                                      StorageBus_SCSI,
     
    970970
    971971                    if (SUCCEEDED(rc))
    972                         CHECK_ERROR (ctl, COMSETTER(ControllerType)(StorageControllerType_LsiLogic));
     972                        CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_LsiLogic));
    973973                }
    974974                else if (!RTStrICmp(ValueUnion.psz, "BusLogic"))
     
    976976                    rc = machine->RemoveStorageController(Bstr("LsiLogic"));
    977977                    if (FAILED(rc))
    978                         CHECK_ERROR (machine, RemoveStorageController(Bstr("BusLogic")));
    979 
    980                     CHECK_ERROR (machine,
     978                        CHECK_ERROR(machine, RemoveStorageController(Bstr("BusLogic")));
     979
     980                    CHECK_ERROR(machine,
    981981                                 AddStorageController(Bstr("BusLogic"),
    982982                                                      StorageBus_SCSI,
     
    984984
    985985                    if (SUCCEEDED(rc))
    986                         CHECK_ERROR (ctl, COMSETTER(ControllerType)(StorageControllerType_BusLogic));
     986                        CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_BusLogic));
    987987                }
    988988                else
     
    997997                    ComPtr<IStorageController> ctl;
    998998
    999                     CHECK_ERROR (machine, AddStorageController(Bstr("BusLogic"), StorageBus_SCSI, ctl.asOutParam()));
     999                    CHECK_ERROR(machine, AddStorageController(Bstr("BusLogic"), StorageBus_SCSI, ctl.asOutParam()));
    10001000                    if (SUCCEEDED(rc))
    1001                         CHECK_ERROR (ctl, COMSETTER(ControllerType)(StorageControllerType_BusLogic));
     1001                        CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_BusLogic));
    10021002                }
    10031003                else if (!strcmp(ValueUnion.psz, "off") || !strcmp(ValueUnion.psz, "disable"))
     
    10051005                    rc = machine->RemoveStorageController(Bstr("BusLogic"));
    10061006                    if (FAILED(rc))
    1007                         CHECK_ERROR (machine, RemoveStorageController(Bstr("LsiLogic")));
     1007                        CHECK_ERROR(machine, RemoveStorageController(Bstr("LsiLogic")));
    10081008                }
    10091009                break;
     
    10121012            case MODIFYVM_DVDPASSTHROUGH: // deprecated
    10131013            {
    1014                 CHECK_ERROR (machine, PassthroughDevice(Bstr("IDE Controller"), 1, 0, !strcmp(ValueUnion.psz, "on")));
     1014                CHECK_ERROR(machine, PassthroughDevice(Bstr("IDE Controller"), 1, 0, !strcmp(ValueUnion.psz, "on")));
    10151015                break;
    10161016            }
     
    10301030                {
    10311031                    ComPtr<IHost> host;
    1032                     CHECK_ERROR (a->virtualBox, COMGETTER(Host)(host.asOutParam()));
     1032                    CHECK_ERROR(a->virtualBox, COMGETTER(Host)(host.asOutParam()));
    10331033                    rc = host->FindHostDVDDrive(Bstr(ValueUnion.psz + 5), dvdMedium.asOutParam());
    10341034                    if (!dvdMedium)
     
    10631063                        {
    10641064                            Bstr emptyUUID;
    1065                             CHECK_ERROR (a->virtualBox, OpenDVDImage(Bstr(ValueUnion.psz),
     1065                            CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(ValueUnion.psz),
    10661066                                         emptyUUID, dvdMedium.asOutParam()));
    10671067                        }
     
    10791079                if (dvdMedium)
    10801080                    dvdMedium->COMGETTER(Id)(uuid.asOutParam());
    1081                 CHECK_ERROR (machine, MountMedium(Bstr("IDE Controller"), 1, 0, uuid));
     1081                CHECK_ERROR(machine, MountMedium(Bstr("IDE Controller"), 1, 0, uuid));
    10821082                break;
    10831083            }
     
    11341134                            {
    11351135                                Bstr emptyUUID;
    1136                                 CHECK_ERROR (a->virtualBox,
     1136                                CHECK_ERROR(a->virtualBox,
    11371137                                             OpenFloppyImage(Bstr(ValueUnion.psz),
    11381138                                                             emptyUUID,
     
    11471147                    }
    11481148                    floppyMedium->COMGETTER(Id)(uuid.asOutParam());
    1149                     CHECK_ERROR (machine, MountMedium(Bstr("Floppy Controller"), 0, 0, uuid));
     1149                    CHECK_ERROR(machine, MountMedium(Bstr("Floppy Controller"), 0, 0, uuid));
    11501150                }
    11511151                break;
     
    11611161                                       GetOptState.pDef->pszLong);
    11621162
    1163                 CHECK_ERROR_BREAK (machine, GetNetworkAdapter (GetOptState.uIndex - 1, nic.asOutParam()));
     1163                CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
    11641164                ASSERT(nic);
    11651165
    1166                 CHECK_ERROR (nic, COMSETTER(TraceFile)(Bstr(ValueUnion.psz)));
     1166                CHECK_ERROR(nic, COMSETTER(TraceFile)(Bstr(ValueUnion.psz)));
    11671167                break;
    11681168            }
     
    11771177                                       GetOptState.pDef->pszLong);
    11781178
    1179                 CHECK_ERROR_BREAK (machine, GetNetworkAdapter (GetOptState.uIndex - 1, nic.asOutParam()));
     1179                CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
    11801180                ASSERT(nic);
    11811181
    11821182                if (!strcmp(ValueUnion.psz, "on"))
    11831183                {
    1184                     CHECK_ERROR (nic, COMSETTER(TraceEnabled)(TRUE));
     1184                    CHECK_ERROR(nic, COMSETTER(TraceEnabled)(TRUE));
    11851185                }
    11861186                else if (!strcmp(ValueUnion.psz, "off"))
    11871187                {
    1188                     CHECK_ERROR (nic, COMSETTER(TraceEnabled)(FALSE));
     1188                    CHECK_ERROR(nic, COMSETTER(TraceEnabled)(FALSE));
    11891189                }
    11901190                else
     
    12051205                                       GetOptState.pDef->pszLong);
    12061206
    1207                 CHECK_ERROR_BREAK (machine, GetNetworkAdapter (GetOptState.uIndex - 1, nic.asOutParam()));
     1207                CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
    12081208                ASSERT(nic);
    12091209
    12101210                if (!strcmp(ValueUnion.psz, "Am79C970A"))
    12111211                {
    1212                     CHECK_ERROR (nic, COMSETTER(AdapterType)(NetworkAdapterType_Am79C970A));
     1212                    CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_Am79C970A));
    12131213                }
    12141214                else if (!strcmp(ValueUnion.psz, "Am79C973"))
    12151215                {
    1216                     CHECK_ERROR (nic, COMSETTER(AdapterType)(NetworkAdapterType_Am79C973));
     1216                    CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_Am79C973));
    12171217                }
    12181218#ifdef VBOX_WITH_E1000
    12191219                else if (!strcmp(ValueUnion.psz, "82540EM"))
    12201220                {
    1221                     CHECK_ERROR (nic, COMSETTER(AdapterType)(NetworkAdapterType_I82540EM));
     1221                    CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82540EM));
    12221222                }
    12231223                else if (!strcmp(ValueUnion.psz, "82543GC"))
    12241224                {
    1225                     CHECK_ERROR (nic, COMSETTER(AdapterType)(NetworkAdapterType_I82543GC));
     1225                    CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82543GC));
    12261226                }
    12271227                else if (!strcmp(ValueUnion.psz, "82545EM"))
    12281228                {
    1229                     CHECK_ERROR (nic, COMSETTER(AdapterType)(NetworkAdapterType_I82545EM));
     1229                    CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82545EM));
    12301230                }
    12311231#endif
     
    12331233                else if (!strcmp(ValueUnion.psz, "virtio"))
    12341234                {
    1235                     CHECK_ERROR (nic, COMSETTER(AdapterType)(NetworkAdapterType_Virtio));
     1235                    CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_Virtio));
    12361236                }
    12371237#endif /* VBOX_WITH_VIRTIO */
     
    12601260                }
    12611261
    1262                 CHECK_ERROR_BREAK (machine, GetNetworkAdapter (GetOptState.uIndex - 1, nic.asOutParam()));
     1262                CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
    12631263                ASSERT(nic);
    12641264
    1265                 CHECK_ERROR (nic, COMSETTER(LineSpeed)(ValueUnion.u32));
     1265                CHECK_ERROR(nic, COMSETTER(LineSpeed)(ValueUnion.u32));
    12661266                break;
    12671267            }
     
    12761276                                       GetOptState.pDef->pszLong);
    12771277
    1278                 CHECK_ERROR_BREAK (machine, GetNetworkAdapter (GetOptState.uIndex - 1, nic.asOutParam()));
     1278                CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
    12791279                ASSERT(nic);
    12801280
    12811281                if (!strcmp(ValueUnion.psz, "none"))
    12821282                {
    1283                     CHECK_ERROR (nic, COMSETTER(Enabled) (FALSE));
     1283                    CHECK_ERROR(nic, COMSETTER(Enabled)(FALSE));
    12841284                }
    12851285                else if (!strcmp(ValueUnion.psz, "null"))
    12861286                {
    1287                     CHECK_ERROR (nic, COMSETTER(Enabled) (TRUE));
    1288                     CHECK_ERROR (nic, Detach());
     1287                    CHECK_ERROR(nic, COMSETTER(Enabled)(TRUE));
     1288                    CHECK_ERROR(nic, Detach());
    12891289                }
    12901290                else if (!strcmp(ValueUnion.psz, "nat"))
    12911291                {
    1292                     CHECK_ERROR (nic, COMSETTER(Enabled) (TRUE));
    1293                     CHECK_ERROR (nic, AttachToNAT());
     1292                    CHECK_ERROR(nic, COMSETTER(Enabled)(TRUE));
     1293                    CHECK_ERROR(nic, AttachToNAT());
    12941294                }
    12951295                else if (  !strcmp(ValueUnion.psz, "bridged")
    12961296                        || !strcmp(ValueUnion.psz, "hostif")) /* backward compatibility */
    12971297                {
    1298                     CHECK_ERROR (nic, COMSETTER(Enabled) (TRUE));
    1299                     CHECK_ERROR (nic, AttachToBridgedInterface());
     1298                    CHECK_ERROR(nic, COMSETTER(Enabled)(TRUE));
     1299                    CHECK_ERROR(nic, AttachToBridgedInterface());
    13001300                }
    13011301                else if (!strcmp(ValueUnion.psz, "intnet"))
    13021302                {
    1303                     CHECK_ERROR (nic, COMSETTER(Enabled) (TRUE));
    1304                     CHECK_ERROR (nic, AttachToInternalNetwork());
     1303                    CHECK_ERROR(nic, COMSETTER(Enabled)(TRUE));
     1304                    CHECK_ERROR(nic, AttachToInternalNetwork());
    13051305                }
    13061306#if defined(VBOX_WITH_NETFLT)
     
    13081308                {
    13091309
    1310                     CHECK_ERROR (nic, COMSETTER(Enabled) (TRUE));
    1311                     CHECK_ERROR (nic, AttachToHostOnlyInterface());
     1310                    CHECK_ERROR(nic, COMSETTER(Enabled)(TRUE));
     1311                    CHECK_ERROR(nic, AttachToHostOnlyInterface());
    13121312                }
    13131313#endif
     
    13291329                                       GetOptState.pDef->pszLong);
    13301330
    1331                 CHECK_ERROR_BREAK (machine, GetNetworkAdapter (GetOptState.uIndex - 1, nic.asOutParam()));
     1331                CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
    13321332                ASSERT(nic);
    13331333
    13341334                if (!strcmp(ValueUnion.psz, "on"))
    13351335                {
    1336                     CHECK_ERROR (nic, COMSETTER(CableConnected)(TRUE));
     1336                    CHECK_ERROR(nic, COMSETTER(CableConnected)(TRUE));
    13371337                }
    13381338                else if (!strcmp(ValueUnion.psz, "off"))
    13391339                {
    1340                     CHECK_ERROR (nic, COMSETTER(CableConnected)(FALSE));
     1340                    CHECK_ERROR(nic, COMSETTER(CableConnected)(FALSE));
    13411341                }
    13421342                else
     
    13581358                                       GetOptState.pDef->pszLong);
    13591359
    1360                 CHECK_ERROR_BREAK (machine, GetNetworkAdapter (GetOptState.uIndex - 1, nic.asOutParam()));
     1360                CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
    13611361                ASSERT(nic);
    13621362
     
    13641364                if (!strcmp(ValueUnion.psz, "none"))
    13651365                {
    1366                     CHECK_ERROR (nic, COMSETTER(HostInterface)(NULL));
     1366                    CHECK_ERROR(nic, COMSETTER(HostInterface)(NULL));
    13671367                }
    13681368                else
    13691369                {
    1370                     CHECK_ERROR (nic, COMSETTER(HostInterface)(Bstr(ValueUnion.psz)));
     1370                    CHECK_ERROR(nic, COMSETTER(HostInterface)(Bstr(ValueUnion.psz)));
    13711371                }
    13721372                break;
     
    13821382                                       GetOptState.pDef->pszLong);
    13831383
    1384                 CHECK_ERROR_BREAK (machine, GetNetworkAdapter (GetOptState.uIndex - 1, nic.asOutParam()));
     1384                CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
    13851385                ASSERT(nic);
    13861386
     
    13881388                if (!strcmp(ValueUnion.psz, "none"))
    13891389                {
    1390                     CHECK_ERROR (nic, COMSETTER(InternalNetwork)(NULL));
     1390                    CHECK_ERROR(nic, COMSETTER(InternalNetwork)(NULL));
    13911391                }
    13921392                else
    13931393                {
    1394                     CHECK_ERROR (nic, COMSETTER(InternalNetwork)(Bstr(ValueUnion.psz)));
     1394                    CHECK_ERROR(nic, COMSETTER(InternalNetwork)(Bstr(ValueUnion.psz)));
    13951395                }
    13961396                break;
     
    14061406                                       GetOptState.pDef->pszLong);
    14071407
    1408                 CHECK_ERROR_BREAK (machine, GetNetworkAdapter (GetOptState.uIndex - 1, nic.asOutParam()));
     1408                CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
    14091409                ASSERT(nic);
    14101410
    1411                 CHECK_ERROR (nic, COMSETTER(NATNetwork)(Bstr(ValueUnion.psz)));
     1411                CHECK_ERROR(nic, COMSETTER(NATNetwork)(Bstr(ValueUnion.psz)));
    14121412
    14131413                break;
     
    14231423                                       GetOptState.pDef->pszLong);
    14241424
    1425                 CHECK_ERROR_BREAK (machine, GetNetworkAdapter (GetOptState.uIndex - 1, nic.asOutParam()));
     1425                CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
    14261426                ASSERT(nic);
    14271427
     
    14291429                if (!strcmp(ValueUnion.psz, "auto"))
    14301430                {
    1431                     CHECK_ERROR (nic, COMSETTER(MACAddress)(NULL));
     1431                    CHECK_ERROR(nic, COMSETTER(MACAddress)(NULL));
    14321432                }
    14331433                else
    14341434                {
    1435                     CHECK_ERROR (nic, COMSETTER(MACAddress)(Bstr(ValueUnion.psz)));
     1435                    CHECK_ERROR(nic, COMSETTER(MACAddress)(Bstr(ValueUnion.psz)));
    14361436                }
    14371437                break;
     
    14481448                                       GetOptState.pDef->pszLong);
    14491449
    1450                 CHECK_ERROR_BREAK (machine, GetSerialPort (GetOptState.uIndex - 1, uart.asOutParam()));
     1450                CHECK_ERROR_BREAK(machine, GetSerialPort(GetOptState.uIndex - 1, uart.asOutParam()));
    14511451                ASSERT(uart);
    14521452
    14531453                if (!strcmp(ValueUnion.psz, "disconnected"))
    14541454                {
    1455                     CHECK_ERROR (uart, COMSETTER(HostMode) (PortMode_Disconnected));
     1455                    CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_Disconnected));
    14561456                }
    14571457                else if (   !strcmp(ValueUnion.psz, "server")
     
    14671467                                           GetOptState.pDef->pszLong);
    14681468
    1469                     CHECK_ERROR (uart, COMSETTER(Path) (Bstr(ValueUnion.psz)));
     1469                    CHECK_ERROR(uart, COMSETTER(Path)(Bstr(ValueUnion.psz)));
    14701470
    14711471                    if (!strcmp(pszMode, "server"))
    14721472                    {
    1473                         CHECK_ERROR (uart, COMSETTER(HostMode) (PortMode_HostPipe));
    1474                         CHECK_ERROR (uart, COMSETTER(Server) (TRUE));
     1473                        CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_HostPipe));
     1474                        CHECK_ERROR(uart, COMSETTER(Server)(TRUE));
    14751475                    }
    14761476                    else if (!strcmp(pszMode, "client"))
    14771477                    {
    1478                         CHECK_ERROR (uart, COMSETTER(HostMode) (PortMode_HostPipe));
    1479                         CHECK_ERROR (uart, COMSETTER(Server) (FALSE));
     1478                        CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_HostPipe));
     1479                        CHECK_ERROR(uart, COMSETTER(Server)(FALSE));
    14801480                    }
    14811481                    else if (!strcmp(pszMode, "file"))
    14821482                    {
    1483                         CHECK_ERROR (uart, COMSETTER(HostMode) (PortMode_RawFile));
     1483                        CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_RawFile));
    14841484                    }
    14851485                }
    14861486                else
    14871487                {
    1488                     CHECK_ERROR (uart, COMSETTER(Path) (Bstr(ValueUnion.psz)));
    1489                     CHECK_ERROR (uart, COMSETTER(HostMode) (PortMode_HostDevice));
     1488                    CHECK_ERROR(uart, COMSETTER(Path)(Bstr(ValueUnion.psz)));
     1489                    CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_HostDevice));
    14901490                }
    14911491                break;
     
    15011501                                       GetOptState.pDef->pszLong);
    15021502
    1503                 CHECK_ERROR_BREAK (machine, GetSerialPort (GetOptState.uIndex - 1, uart.asOutParam()));
     1503                CHECK_ERROR_BREAK(machine, GetSerialPort(GetOptState.uIndex - 1, uart.asOutParam()));
    15041504                ASSERT(uart);
    15051505
    15061506                if (!strcmp(ValueUnion.psz, "off") || !strcmp(ValueUnion.psz, "disable"))
    1507                     CHECK_ERROR (uart, COMSETTER(Enabled) (FALSE));
     1507                    CHECK_ERROR(uart, COMSETTER(Enabled)(FALSE));
    15081508                else
    15091509                {
     
    15171517                                           GetOptState.pDef->pszLong);
    15181518
    1519                     CHECK_ERROR (uart, COMSETTER(IRQ) (ValueUnion.u32));
     1519                    CHECK_ERROR(uart, COMSETTER(IRQ)(ValueUnion.u32));
    15201520
    15211521                    vrc = RTStrToUInt32Ex(pszIOBase, NULL, 0, &uVal);
    15221522                    if (vrc != VINF_SUCCESS || uVal == 0)
    15231523                        return errorArgument("Error parsing UART I/O base '%s'", pszIOBase);
    1524                     CHECK_ERROR (uart, COMSETTER(IOBase) (uVal));
    1525 
    1526                     CHECK_ERROR (uart, COMSETTER(Enabled) (TRUE));
     1524                    CHECK_ERROR(uart, COMSETTER(IOBase)(uVal));
     1525
     1526                    CHECK_ERROR(uart, COMSETTER(Enabled)(TRUE));
    15271527                }
    15281528                break;
     
    15321532            {
    15331533                if (ValueUnion.u32 > 0)
    1534                     CHECK_ERROR (machine, COMSETTER(StatisticsUpdateInterval)(ValueUnion.u32));
     1534                    CHECK_ERROR(machine, COMSETTER(StatisticsUpdateInterval)(ValueUnion.u32));
    15351535                break;
    15361536            }
     
    15401540            {
    15411541                if (ValueUnion.u32 > 0)
    1542                     CHECK_ERROR (machine, COMSETTER(MemoryBalloonSize)(ValueUnion.u32));
     1542                    CHECK_ERROR(machine, COMSETTER(MemoryBalloonSize)(ValueUnion.u32));
    15431543                break;
    15441544            }
     
    15541554
    15551555                    if (!strcmp(ValueUnion.psz, "sb16"))
    1556                         CHECK_ERROR (audioAdapter, COMSETTER(AudioController)(AudioControllerType_SB16));
     1556                        CHECK_ERROR(audioAdapter, COMSETTER(AudioController)(AudioControllerType_SB16));
    15571557                    else if (!strcmp(ValueUnion.psz, "ac97"))
    1558                         CHECK_ERROR (audioAdapter, COMSETTER(AudioController)(AudioControllerType_AC97));
     1558                        CHECK_ERROR(audioAdapter, COMSETTER(AudioController)(AudioControllerType_AC97));
    15591559                    else
    15601560                    {
     
    15771577                    if (!strcmp(ValueUnion.psz, "none"))
    15781578                    {
    1579                         CHECK_ERROR (audioAdapter, COMSETTER(Enabled)(false));
     1579                        CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(false));
    15801580                    }
    15811581                    else if (!strcmp(ValueUnion.psz, "null"))
    15821582                    {
    1583                         CHECK_ERROR (audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Null));
    1584                         CHECK_ERROR (audioAdapter, COMSETTER(Enabled)(true));
     1583                        CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Null));
     1584                        CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    15851585                    }
    15861586#ifdef RT_OS_WINDOWS
     
    15881588                    else if (!strcmp(ValueUnion.psz, "winmm"))
    15891589                    {
    1590                         CHECK_ERROR (audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_WinMM));
    1591                         CHECK_ERROR (audioAdapter, COMSETTER(Enabled)(true));
     1590                        CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_WinMM));
     1591                        CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    15921592                    }
    15931593#endif
    15941594                    else if (!strcmp(ValueUnion.psz, "dsound"))
    15951595                    {
    1596                         CHECK_ERROR (audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_DirectSound));
    1597                         CHECK_ERROR (audioAdapter, COMSETTER(Enabled)(true));
     1596                        CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_DirectSound));
     1597                        CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    15981598                    }
    15991599#endif /* RT_OS_WINDOWS */
     
    16011601                    else if (!strcmp(ValueUnion.psz, "oss"))
    16021602                    {
    1603                         CHECK_ERROR (audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS));
    1604                         CHECK_ERROR (audioAdapter, COMSETTER(Enabled)(true));
     1603                        CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS));
     1604                        CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    16051605                    }
    16061606# ifdef VBOX_WITH_ALSA
    16071607                    else if (!strcmp(ValueUnion.psz, "alsa"))
    16081608                    {
    1609                         CHECK_ERROR (audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_ALSA));
    1610                         CHECK_ERROR (audioAdapter, COMSETTER(Enabled)(true));
     1609                        CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_ALSA));
     1610                        CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    16111611                    }
    16121612# endif
     
    16141614                    else if (!strcmp(ValueUnion.psz, "pulse"))
    16151615                    {
    1616                         CHECK_ERROR (audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Pulse));
    1617                         CHECK_ERROR (audioAdapter, COMSETTER(Enabled)(true));
     1616                        CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Pulse));
     1617                        CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    16181618                    }
    16191619# endif
     
    16221622                    else if (!strcmp(ValueUnion.psz, "solaudio"))
    16231623                    {
    1624                         CHECK_ERROR (audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_SolAudio));
    1625                         CHECK_ERROR (audioAdapter, COMSETTER(Enabled)(true));
     1624                        CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_SolAudio));
     1625                        CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    16261626                    }
    16271627
     
    16291629                    else if (!strcmp(ValueUnion.psz, "oss"))
    16301630                    {
    1631                         CHECK_ERROR (audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS));
    1632                         CHECK_ERROR (audioAdapter, COMSETTER(Enabled)(true));
     1631                        CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS));
     1632                        CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    16331633                    }
    16341634# endif
     
    16381638                    else if (!strcmp(ValueUnion.psz, "coreaudio"))
    16391639                    {
    1640                         CHECK_ERROR (audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_CoreAudio));
    1641                         CHECK_ERROR (audioAdapter, COMSETTER(Enabled)(true));
     1640                        CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_CoreAudio));
     1641                        CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    16421642                    }
    16431643
     
    16581658                    if (!strcmp(ValueUnion.psz, "disabled"))
    16591659                    {
    1660                         CHECK_ERROR (machine, COMSETTER(ClipboardMode)(ClipboardMode_Disabled));
     1660                        CHECK_ERROR(machine, COMSETTER(ClipboardMode)(ClipboardMode_Disabled));
    16611661                    }
    16621662                    else if (!strcmp(ValueUnion.psz, "hosttoguest"))
    16631663                    {
    1664                         CHECK_ERROR (machine, COMSETTER(ClipboardMode)(ClipboardMode_HostToGuest));
     1664                        CHECK_ERROR(machine, COMSETTER(ClipboardMode)(ClipboardMode_HostToGuest));
    16651665                    }
    16661666                    else if (!strcmp(ValueUnion.psz, "guesttohost"))
    16671667                    {
    1668                         CHECK_ERROR (machine, COMSETTER(ClipboardMode)(ClipboardMode_GuestToHost));
     1668                        CHECK_ERROR(machine, COMSETTER(ClipboardMode)(ClipboardMode_GuestToHost));
    16691669                    }
    16701670                    else if (!strcmp(ValueUnion.psz, "bidirectional"))
    16711671                    {
    1672                         CHECK_ERROR (machine, COMSETTER(ClipboardMode)(ClipboardMode_Bidirectional));
     1672                        CHECK_ERROR(machine, COMSETTER(ClipboardMode)(ClipboardMode_Bidirectional));
    16731673                    }
    16741674                    else
     
    16911691
    16921692                    if (!strcmp(ValueUnion.psz, "default"))
    1693                         CHECK_ERROR (vrdpServer, COMSETTER(Ports)(Bstr("0")));
    1694                     else
    1695                         CHECK_ERROR (vrdpServer, COMSETTER(Ports)(Bstr(ValueUnion.psz)));
     1693                        CHECK_ERROR(vrdpServer, COMSETTER(Ports)(Bstr("0")));
     1694                    else
     1695                        CHECK_ERROR(vrdpServer, COMSETTER(Ports)(Bstr(ValueUnion.psz)));
    16961696                }
    16971697                break;
     
    17061706                    ASSERT(vrdpServer);
    17071707
    1708                     CHECK_ERROR (vrdpServer, COMSETTER(NetAddress)(Bstr(ValueUnion.psz)));
     1708                    CHECK_ERROR(vrdpServer, COMSETTER(NetAddress)(Bstr(ValueUnion.psz)));
    17091709                }
    17101710                break;
     
    17211721                    if (!strcmp(ValueUnion.psz, "null"))
    17221722                    {
    1723                         CHECK_ERROR (vrdpServer, COMSETTER(AuthType)(VRDPAuthType_Null));
     1723                        CHECK_ERROR(vrdpServer, COMSETTER(AuthType)(VRDPAuthType_Null));
    17241724                    }
    17251725                    else if (!strcmp(ValueUnion.psz, "external"))
    17261726                    {
    1727                         CHECK_ERROR (vrdpServer, COMSETTER(AuthType)(VRDPAuthType_External));
     1727                        CHECK_ERROR(vrdpServer, COMSETTER(AuthType)(VRDPAuthType_External));
    17281728                    }
    17291729                    else if (!strcmp(ValueUnion.psz, "guest"))
    17301730                    {
    1731                         CHECK_ERROR (vrdpServer, COMSETTER(AuthType)(VRDPAuthType_Guest));
     1731                        CHECK_ERROR(vrdpServer, COMSETTER(AuthType)(VRDPAuthType_Guest));
    17321732                    }
    17331733                    else
     
    17501750                    if (!strcmp(ValueUnion.psz, "on"))
    17511751                    {
    1752                         CHECK_ERROR (vrdpServer, COMSETTER(AllowMultiConnection)(true));
     1752                        CHECK_ERROR(vrdpServer, COMSETTER(AllowMultiConnection)(true));
    17531753                    }
    17541754                    else if (!strcmp(ValueUnion.psz, "off"))
    17551755                    {
    1756                         CHECK_ERROR (vrdpServer, COMSETTER(AllowMultiConnection)(false));
     1756                        CHECK_ERROR(vrdpServer, COMSETTER(AllowMultiConnection)(false));
    17571757                    }
    17581758                    else
     
    17751775                    if (!strcmp(ValueUnion.psz, "on"))
    17761776                    {
    1777                         CHECK_ERROR (vrdpServer, COMSETTER(ReuseSingleConnection)(true));
     1777                        CHECK_ERROR(vrdpServer, COMSETTER(ReuseSingleConnection)(true));
    17781778                    }
    17791779                    else if (!strcmp(ValueUnion.psz, "off"))
    17801780                    {
    1781                         CHECK_ERROR (vrdpServer, COMSETTER(ReuseSingleConnection)(false));
     1781                        CHECK_ERROR(vrdpServer, COMSETTER(ReuseSingleConnection)(false));
    17821782                    }
    17831783                    else
     
    18001800                    if (!strcmp(ValueUnion.psz, "on"))
    18011801                    {
    1802                         CHECK_ERROR (vrdpServer, COMSETTER(Enabled)(true));
     1802                        CHECK_ERROR(vrdpServer, COMSETTER(Enabled)(true));
    18031803                    }
    18041804                    else if (!strcmp(ValueUnion.psz, "off"))
    18051805                    {
    1806                         CHECK_ERROR (vrdpServer, COMSETTER(Enabled)(false));
     1806                        CHECK_ERROR(vrdpServer, COMSETTER(Enabled)(false));
    18071807                    }
    18081808                    else
     
    18211821                {
    18221822                    ComPtr<IUSBController> UsbCtl;
    1823                     CHECK_ERROR (machine, COMGETTER(USBController)(UsbCtl.asOutParam()));
     1823                    CHECK_ERROR(machine, COMGETTER(USBController)(UsbCtl.asOutParam()));
    18241824                    if (SUCCEEDED(rc))
    18251825                    {
    18261826                        if (!strcmp(ValueUnion.psz, "on") || !strcmp(ValueUnion.psz, "enable"))
    1827                             CHECK_ERROR (UsbCtl, COMSETTER(EnabledEhci)(true));
     1827                            CHECK_ERROR(UsbCtl, COMSETTER(EnabledEhci)(true));
    18281828                        else if (!strcmp(ValueUnion.psz, "off") || !strcmp(ValueUnion.psz, "disable"))
    1829                             CHECK_ERROR (UsbCtl, COMSETTER(EnabledEhci)(false));
     1829                            CHECK_ERROR(UsbCtl, COMSETTER(EnabledEhci)(false));
    18301830                        else
    18311831                            return errorArgument("Invalid --usbehci argument '%s'", ValueUnion.psz);
     
    18401840                {
    18411841                    ComPtr<IUSBController> UsbCtl;
    1842                     CHECK_ERROR (machine, COMGETTER(USBController)(UsbCtl.asOutParam()));
     1842                    CHECK_ERROR(machine, COMGETTER(USBController)(UsbCtl.asOutParam()));
    18431843                    if (SUCCEEDED(rc))
    18441844                    {
    18451845                        if (!strcmp(ValueUnion.psz, "on") || !strcmp(ValueUnion.psz, "enable"))
    1846                             CHECK_ERROR (UsbCtl, COMSETTER(Enabled)(true));
     1846                            CHECK_ERROR(UsbCtl, COMSETTER(Enabled)(true));
    18471847                        else if (!strcmp(ValueUnion.psz, "off") || !strcmp(ValueUnion.psz, "disable"))
    1848                             CHECK_ERROR (UsbCtl, COMSETTER(Enabled)(false));
     1848                            CHECK_ERROR(UsbCtl, COMSETTER(Enabled)(false));
    18491849                        else
    18501850                            return errorArgument("Invalid --usb argument '%s'", ValueUnion.psz);
     
    18591859                {
    18601860                    if (!strcmp(ValueUnion.psz, "default"))
    1861                         CHECK_ERROR (machine, COMSETTER(SnapshotFolder)(NULL));
    1862                     else
    1863                         CHECK_ERROR (machine, COMSETTER(SnapshotFolder)(Bstr(ValueUnion.psz)));
     1861                        CHECK_ERROR(machine, COMSETTER(SnapshotFolder)(NULL));
     1862                    else
     1863                        CHECK_ERROR(machine, COMSETTER(SnapshotFolder)(Bstr(ValueUnion.psz)));
    18641864                }
    18651865                break;
     
    18711871                {
    18721872                    if (!strcmp(ValueUnion.psz, "on"))
    1873                         CHECK_ERROR (machine, COMSETTER(TeleporterEnabled)(1));
     1873                        CHECK_ERROR(machine, COMSETTER(TeleporterEnabled)(1));
    18741874                    else if (!strcmp(ValueUnion.psz, "off"))
    1875                         CHECK_ERROR (machine, COMSETTER(TeleporterEnabled)(0));
     1875                        CHECK_ERROR(machine, COMSETTER(TeleporterEnabled)(0));
    18761876                    else
    18771877                        return errorArgument("Invalid --teleporterenabled value '%s'", ValueUnion.psz);
     
    19121912    /* commit changes */
    19131913    if (SUCCEEDED(rc))
    1914         CHECK_ERROR (machine, SaveSettings());
     1914        CHECK_ERROR(machine, SaveSettings());
    19151915
    19161916    /* it's important to always close sessions */
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp

    r23932 r23934  
    7979        return errorSyntax(USAGE_STORAGEATTACH, "Too many parameters");
    8080
    81     RTGetOptInit (&GetState, a->argc, a->argv, g_aStorageAttachOptions,
    82                   RT_ELEMENTS(g_aStorageAttachOptions), 1, 0 /* fFlags */);
     81    RTGetOptInit(&GetState, a->argc, a->argv, g_aStorageAttachOptions,
     82                 RT_ELEMENTS(g_aStorageAttachOptions), 1, 0 /* fFlags */);
    8383
    8484    while (   SUCCEEDED(rc)
     
    156156    if (!Guid(machineuuid).isEmpty())
    157157    {
    158         CHECK_ERROR_RET (a->virtualBox, GetMachine (machineuuid, machine.asOutParam()), 1);
     158        CHECK_ERROR_RET(a->virtualBox, GetMachine(machineuuid, machine.asOutParam()), 1);
    159159    }
    160160    else
    161161    {
    162         CHECK_ERROR_RET (a->virtualBox, FindMachine(Bstr(a->argv[0]), machine.asOutParam()), 1);
     162        CHECK_ERROR_RET(a->virtualBox, FindMachine(Bstr(a->argv[0]), machine.asOutParam()), 1);
    163163        machine->COMGETTER(Id)(machineuuid.asOutParam());
    164164    }
     
    169169    {
    170170        /* try to open an existing session for the VM */
    171         CHECK_ERROR_RET (a->virtualBox, OpenExistingSession (a->session, machineuuid), 1);
     171        CHECK_ERROR_RET(a->virtualBox, OpenExistingSession(a->session, machineuuid), 1);
    172172        fRunTime = true;
    173173    }
     
    201201    if (!RTStrICmp(pszMedium, "none"))
    202202    {
    203         CHECK_ERROR (machine, DetachDevice(Bstr(pszCtl), port, device));
     203        CHECK_ERROR(machine, DetachDevice(Bstr(pszCtl), port, device));
    204204    }
    205205    else if (!RTStrICmp(pszMedium, "emptydrive"))
     
    212212            {
    213213                DeviceType_T deviceType;
    214                 mediumAttachment->COMGETTER(Type) (&deviceType);
     214                mediumAttachment->COMGETTER(Type)(&deviceType);
    215215
    216216                if (   (deviceType == DeviceType_DVD)
     
    218218                {
    219219                    /* just unmount the floppy/dvd */
    220                     CHECK_ERROR (machine, MountMedium(Bstr(pszCtl), port, device, Bstr("")));
     220                    CHECK_ERROR(machine, MountMedium(Bstr(pszCtl), port, device, Bstr("")));
    221221                }
    222222                else
     
    240240            DeviceType_T deviceType = DeviceType_Null;
    241241
    242             CHECK_ERROR (storageCtl, COMGETTER(Bus)(&storageBus));
     242            CHECK_ERROR(storageCtl, COMGETTER(Bus)(&storageBus));
    243243
    244244            if (storageBus == StorageBus_Floppy)
     
    249249            /* attach a empty floppy/dvd drive after removing previous attachment */
    250250            machine->DetachDevice(Bstr(pszCtl), port, device);
    251             CHECK_ERROR (machine, AttachDevice(Bstr(pszCtl), port, device, deviceType, Bstr("")));
     251            CHECK_ERROR(machine, AttachDevice(Bstr(pszCtl), port, device, deviceType, Bstr("")));
    252252        }
    253253    }
     
    274274                {
    275275                    DeviceType_T deviceType;
    276                     mediumAttachement->COMGETTER(Type) (&deviceType);
     276                    mediumAttachement->COMGETTER(Type)(&deviceType);
    277277
    278278                    if (deviceType != DeviceType_DVD)
     
    295295                {
    296296                    ComPtr<IHost> host;
    297                     CHECK_ERROR (a->virtualBox, COMGETTER(Host)(host.asOutParam()));
     297                    CHECK_ERROR(a->virtualBox, COMGETTER(Host)(host.asOutParam()));
    298298                    rc = host->FindHostDVDDrive(Bstr(pszMedium + 5), dvdMedium.asOutParam());
    299299                    if (!dvdMedium)
     
    329329                        {
    330330                            Bstr emptyUUID;
    331                             CHECK_ERROR (a->virtualBox, OpenDVDImage(Bstr(pszMedium),
     331                            CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(pszMedium),
    332332                                         emptyUUID, dvdMedium.asOutParam()));
    333333                        }
     
    345345            {
    346346                dvdMedium->COMGETTER(Id)(uuid.asOutParam());
    347                 CHECK_ERROR (machine, MountMedium(Bstr(pszCtl), port, device, uuid));
     347                CHECK_ERROR(machine, MountMedium(Bstr(pszCtl), port, device, uuid));
    348348            }
    349349        }
     
    358358            {
    359359                DeviceType_T deviceType;
    360                 mediumAttachement->COMGETTER(Type) (&deviceType);
     360                mediumAttachement->COMGETTER(Type)(&deviceType);
    361361
    362362                if (deviceType != DeviceType_HardDisk)
     
    376376                {
    377377                    /* open the new hard disk object */
    378                     CHECK_ERROR (a->virtualBox,
     378                    CHECK_ERROR(a->virtualBox,
    379379                                 OpenHardDisk(Bstr(pszMedium),
    380380                                              AccessMode_ReadWrite, false, Bstr(""),
     
    386386            {
    387387                hardDisk->COMGETTER(Id)(uuid.asOutParam());
    388                 CHECK_ERROR (machine, AttachDevice(Bstr(pszCtl), port, device, DeviceType_HardDisk, uuid));
     388                CHECK_ERROR(machine, AttachDevice(Bstr(pszCtl), port, device, DeviceType_HardDisk, uuid));
    389389            }
    390390            else
     
    403403            if (   !fRunTime
    404404                && !floppyAttachment)
    405                 CHECK_ERROR (machine, AttachDevice(Bstr(pszCtl), port, device, DeviceType_Floppy, Bstr("")));
     405                CHECK_ERROR(machine, AttachDevice(Bstr(pszCtl), port, device, DeviceType_Floppy, Bstr("")));
    406406
    407407            /* host drive? */
     
    410410                ComPtr<IHost> host;
    411411
    412                 CHECK_ERROR (a->virtualBox, COMGETTER(Host)(host.asOutParam()));
     412                CHECK_ERROR(a->virtualBox, COMGETTER(Host)(host.asOutParam()));
    413413                rc = host->FindHostFloppyDrive(Bstr(pszMedium + 5), floppyMedium.asOutParam());
    414414                if (!floppyMedium)
     
    431431                    {
    432432                        Bstr emptyUUID;
    433                         CHECK_ERROR (a->virtualBox,
     433                        CHECK_ERROR(a->virtualBox,
    434434                                     OpenFloppyImage(Bstr(pszMedium),
    435435                                                     emptyUUID,
     
    448448            {
    449449                floppyMedium->COMGETTER(Id)(uuid.asOutParam());
    450                 CHECK_ERROR (machine, MountMedium(Bstr(pszCtl), port, device, uuid));
     450                CHECK_ERROR(machine, MountMedium(Bstr(pszCtl), port, device, uuid));
    451451            }
    452452        }
     
    463463        ComPtr<IMediumAttachment> mattach;
    464464
    465         CHECK_ERROR (machine, GetMediumAttachment(Bstr(pszCtl), port, device, mattach.asOutParam()));
     465        CHECK_ERROR(machine, GetMediumAttachment(Bstr(pszCtl), port, device, mattach.asOutParam()));
    466466
    467467        if (SUCCEEDED(rc))
     
    469469            if (!RTStrICmp(pszPassThrough, "on"))
    470470            {
    471                 CHECK_ERROR (machine, PassthroughDevice(Bstr(pszCtl), port, device, TRUE));
     471                CHECK_ERROR(machine, PassthroughDevice(Bstr(pszCtl), port, device, TRUE));
    472472            }
    473473            else if (!RTStrICmp(pszPassThrough, "off"))
    474474            {
    475                 CHECK_ERROR (machine, PassthroughDevice(Bstr(pszCtl), port, device, FALSE));
     475                CHECK_ERROR(machine, PassthroughDevice(Bstr(pszCtl), port, device, FALSE));
    476476            }
    477477            else
     
    490490    /* commit changes */
    491491    if (SUCCEEDED(rc))
    492         CHECK_ERROR (machine, SaveSettings());
     492        CHECK_ERROR(machine, SaveSettings());
    493493
    494494leave:
     
    608608    if (!Guid(machineuuid).isEmpty())
    609609    {
    610         CHECK_ERROR_RET (a->virtualBox, GetMachine (machineuuid, machine.asOutParam()), 1);
     610        CHECK_ERROR_RET(a->virtualBox, GetMachine (machineuuid, machine.asOutParam()), 1);
    611611    }
    612612    else
    613613    {
    614         CHECK_ERROR_RET (a->virtualBox, FindMachine(Bstr(a->argv[0]), machine.asOutParam()), 1);
     614        CHECK_ERROR_RET(a->virtualBox, FindMachine(Bstr(a->argv[0]), machine.asOutParam()), 1);
    615615        machine->COMGETTER(Id)(machineuuid.asOutParam());
    616616    }
    617617
    618618    /* open a session for the VM */
    619     CHECK_ERROR_RET (a->virtualBox, OpenSession (a->session, machineuuid), 1);
     619    CHECK_ERROR_RET(a->virtualBox, OpenSession (a->session, machineuuid), 1);
    620620
    621621    /* get the mutable session machine */
     
    634634        com::SafeIfaceArray<IMediumAttachment> mediumAttachments;
    635635
    636         CHECK_ERROR (machine,
     636        CHECK_ERROR(machine,
    637637                     GetMediumAttachmentsOfController(Bstr(pszCtl),
    638638                                                      ComSafeArrayAsOutParam(mediumAttachments)));
     
    643643            LONG device = 0;
    644644
    645             CHECK_ERROR (mediumAttach, COMGETTER(Port)(&port));
    646             CHECK_ERROR (mediumAttach, COMGETTER(Device)(&device));
    647             CHECK_ERROR (machine, DetachDevice(Bstr(pszCtl), port, device));
     645            CHECK_ERROR(mediumAttach, COMGETTER(Port)(&port));
     646            CHECK_ERROR(mediumAttach, COMGETTER(Device)(&device));
     647            CHECK_ERROR(machine, DetachDevice(Bstr(pszCtl), port, device));
    648648        }
    649649
    650650        if (SUCCEEDED(rc))
    651             CHECK_ERROR (machine, RemoveStorageController(Bstr(pszCtl)));
     651            CHECK_ERROR(machine, RemoveStorageController(Bstr(pszCtl)));
    652652        else
    653653            errorArgument("Can't detach the devices connected to '%s' Controller\n"
     
    662662            if (!RTStrICmp(pszBusType, "ide"))
    663663            {
    664                 CHECK_ERROR (machine, AddStorageController(Bstr(pszCtl), StorageBus_IDE, ctl.asOutParam()));
     664                CHECK_ERROR(machine, AddStorageController(Bstr(pszCtl), StorageBus_IDE, ctl.asOutParam()));
    665665            }
    666666            else if (!RTStrICmp(pszBusType, "sata"))
    667667            {
    668                 CHECK_ERROR (machine, AddStorageController(Bstr(pszCtl), StorageBus_SATA, ctl.asOutParam()));
     668                CHECK_ERROR(machine, AddStorageController(Bstr(pszCtl), StorageBus_SATA, ctl.asOutParam()));
    669669            }
    670670            else if (!RTStrICmp(pszBusType, "scsi"))
    671671            {
    672                 CHECK_ERROR (machine, AddStorageController(Bstr(pszCtl), StorageBus_SCSI, ctl.asOutParam()));
     672                CHECK_ERROR(machine, AddStorageController(Bstr(pszCtl), StorageBus_SCSI, ctl.asOutParam()));
    673673            }
    674674            else if (!RTStrICmp(pszBusType, "floppy"))
    675675            {
    676                 CHECK_ERROR (machine, AddStorageController(Bstr(pszCtl), StorageBus_Floppy, ctl.asOutParam()));
     676                CHECK_ERROR(machine, AddStorageController(Bstr(pszCtl), StorageBus_Floppy, ctl.asOutParam()));
    677677            }
    678678            else
     
    688688            ComPtr<IStorageController> ctl;
    689689
    690             CHECK_ERROR (machine, GetStorageControllerByName(Bstr(pszCtl), ctl.asOutParam()));
     690            CHECK_ERROR(machine, GetStorageControllerByName(Bstr(pszCtl), ctl.asOutParam()));
    691691
    692692            if (SUCCEEDED(rc))
     
    694694                if (!RTStrICmp(pszCtlType, "lsilogic"))
    695695                {
    696                     CHECK_ERROR (ctl, COMSETTER(ControllerType)(StorageControllerType_LsiLogic));
     696                    CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_LsiLogic));
    697697                }
    698698                else if (!RTStrICmp(pszCtlType, "buslogic"))
    699699                {
    700                     CHECK_ERROR (ctl, COMSETTER(ControllerType)(StorageControllerType_BusLogic));
     700                    CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_BusLogic));
    701701                }
    702702                else if (!RTStrICmp(pszCtlType, "intelahci"))
    703703                {
    704                     CHECK_ERROR (ctl, COMSETTER(ControllerType)(StorageControllerType_IntelAhci));
     704                    CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_IntelAhci));
    705705                }
    706706                else if (!RTStrICmp(pszCtlType, "piix3"))
    707707                {
    708                     CHECK_ERROR (ctl, COMSETTER(ControllerType)(StorageControllerType_PIIX3));
     708                    CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_PIIX3));
    709709                }
    710710                else if (!RTStrICmp(pszCtlType, "piix4"))
    711711                {
    712                     CHECK_ERROR (ctl, COMSETTER(ControllerType)(StorageControllerType_PIIX4));
     712                    CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_PIIX4));
    713713                }
    714714                else if (!RTStrICmp(pszCtlType, "ich6"))
    715715                {
    716                     CHECK_ERROR (ctl, COMSETTER(ControllerType)(StorageControllerType_ICH6));
     716                    CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_ICH6));
    717717                }
    718718                else if (!RTStrICmp(pszCtlType, "i82078"))
    719719                {
    720                     CHECK_ERROR (ctl, COMSETTER(ControllerType)(StorageControllerType_I82078));
     720                    CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_I82078));
    721721                }
    722722                else
     
    738738            ComPtr<IStorageController> ctl;
    739739
    740             CHECK_ERROR (machine, GetStorageControllerByName(Bstr(pszCtl), ctl.asOutParam()));
     740            CHECK_ERROR(machine, GetStorageControllerByName(Bstr(pszCtl), ctl.asOutParam()));
    741741
    742742            if (SUCCEEDED(rc))
    743743            {
    744                 CHECK_ERROR (ctl, COMSETTER(PortCount)(sataportcount));
     744                CHECK_ERROR(ctl, COMSETTER(PortCount)(sataportcount));
    745745            }
    746746            else
     
    757757            ComPtr<IStorageController> ctl;
    758758
    759             CHECK_ERROR (machine, GetStorageControllerByName(Bstr(pszCtl), ctl.asOutParam()));
     759            CHECK_ERROR(machine, GetStorageControllerByName(Bstr(pszCtl), ctl.asOutParam()));
    760760
    761761            if (SUCCEEDED(rc))
    762762            {
    763                 CHECK_ERROR (ctl, SetIDEEmulationPort(satabootdev, sataidedev));
     763                CHECK_ERROR(ctl, SetIDEEmulationPort(satabootdev, sataidedev));
    764764            }
    765765            else
     
    773773    /* commit changes */
    774774    if (SUCCEEDED(rc))
    775         CHECK_ERROR (machine, SaveSettings());
     775        CHECK_ERROR(machine, SaveSettings());
    776776
    777777    /* it's important to always close sessions */
Note: See TracChangeset for help on using the changeset viewer.

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