mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
vbox: remove extra spaces from assignments
This commit is contained in:
parent
ebe24c84d4
commit
b31e4d00ec
@ -227,7 +227,7 @@ static char *vboxGenerateMediumName(PRUint32 storageBus,
|
|||||||
|
|
||||||
maxPortPerInst = aMaxPortPerInst[storageBus];
|
maxPortPerInst = aMaxPortPerInst[storageBus];
|
||||||
maxSlotPerPort = aMaxSlotPerPort[storageBus];
|
maxSlotPerPort = aMaxSlotPerPort[storageBus];
|
||||||
total = (deviceInst * maxPortPerInst * maxSlotPerPort)
|
total = (deviceInst * maxPortPerInst * maxSlotPerPort)
|
||||||
+ (devicePort * maxSlotPerPort)
|
+ (devicePort * maxSlotPerPort)
|
||||||
+ deviceSlot;
|
+ deviceSlot;
|
||||||
|
|
||||||
@ -3071,7 +3071,7 @@ vboxHostDeviceGetXMLDesc(vboxGlobalData *data, virDomainDefPtr def, IMachine *ma
|
|||||||
ignore_value(virStrToLong_ui(vendorIdUtf8, &endptr, 16, &vendorId));
|
ignore_value(virStrToLong_ui(vendorIdUtf8, &endptr, 16, &vendorId));
|
||||||
ignore_value(virStrToLong_ui(productIdUtf8, &endptr, 16, &productId));
|
ignore_value(virStrToLong_ui(productIdUtf8, &endptr, 16, &productId));
|
||||||
|
|
||||||
def->hostdevs[USBFilterCount]->source.subsys.u.usb.vendor = vendorId;
|
def->hostdevs[USBFilterCount]->source.subsys.u.usb.vendor = vendorId;
|
||||||
def->hostdevs[USBFilterCount]->source.subsys.u.usb.product = productId;
|
def->hostdevs[USBFilterCount]->source.subsys.u.usb.product = productId;
|
||||||
|
|
||||||
VBOX_UTF16_FREE(vendorIdUtf16);
|
VBOX_UTF16_FREE(vendorIdUtf16);
|
||||||
@ -4996,7 +4996,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
gVBoxAPI.UIID.vboxIIDToUtf8(data, &iid, &uuid);
|
gVBoxAPI.UIID.vboxIIDToUtf8(data, &iid, &uuid);
|
||||||
disk->uuid = uuid;
|
disk->uuid = uuid;
|
||||||
vboxIIDUnalloc(&iid);
|
vboxIIDUnalloc(&iid);
|
||||||
|
|
||||||
rc = gVBoxAPI.UIMedium.GetParent(medium, &parentDisk);
|
rc = gVBoxAPI.UIMedium.GetParent(medium, &parentDisk);
|
||||||
@ -5115,7 +5115,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
|
|||||||
|
|
||||||
IProgress *progress = NULL;
|
IProgress *progress = NULL;
|
||||||
PRUint32 tab[1];
|
PRUint32 tab[1];
|
||||||
tab[0] = MediumVariant_Diff;
|
tab[0] = MediumVariant_Diff;
|
||||||
gVBoxAPI.UIMedium.CreateDiffStorage(medium, newMedium, 1, tab, &progress);
|
gVBoxAPI.UIMedium.CreateDiffStorage(medium, newMedium, 1, tab, &progress);
|
||||||
|
|
||||||
gVBoxAPI.UIProgress.WaitForCompletion(progress, -1);
|
gVBoxAPI.UIProgress.WaitForCompletion(progress, -1);
|
||||||
@ -6878,7 +6878,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
|
|||||||
VBOX_UTF16_FREE(newLocation);
|
VBOX_UTF16_FREE(newLocation);
|
||||||
|
|
||||||
PRUint32 tab[1];
|
PRUint32 tab[1];
|
||||||
tab[0] = MediumVariant_Diff;
|
tab[0] = MediumVariant_Diff;
|
||||||
gVBoxAPI.UIMedium.CreateDiffStorage(medium, newMedium, 1, tab, &progress);
|
gVBoxAPI.UIMedium.CreateDiffStorage(medium, newMedium, 1, tab, &progress);
|
||||||
|
|
||||||
gVBoxAPI.UIProgress.WaitForCompletion(progress, -1);
|
gVBoxAPI.UIProgress.WaitForCompletion(progress, -1);
|
||||||
|
@ -228,18 +228,18 @@ static void nsIDtoChar(unsigned char *uuid, const nsID *iid)
|
|||||||
memcpy(uuidinterim, iid, VIR_UUID_BUFLEN);
|
memcpy(uuidinterim, iid, VIR_UUID_BUFLEN);
|
||||||
virUUIDFormat(uuidinterim, uuidstrsrc);
|
virUUIDFormat(uuidinterim, uuidstrsrc);
|
||||||
|
|
||||||
uuidstrdst[0] = uuidstrsrc[6];
|
uuidstrdst[0] = uuidstrsrc[6];
|
||||||
uuidstrdst[1] = uuidstrsrc[7];
|
uuidstrdst[1] = uuidstrsrc[7];
|
||||||
uuidstrdst[2] = uuidstrsrc[4];
|
uuidstrdst[2] = uuidstrsrc[4];
|
||||||
uuidstrdst[3] = uuidstrsrc[5];
|
uuidstrdst[3] = uuidstrsrc[5];
|
||||||
uuidstrdst[4] = uuidstrsrc[2];
|
uuidstrdst[4] = uuidstrsrc[2];
|
||||||
uuidstrdst[5] = uuidstrsrc[3];
|
uuidstrdst[5] = uuidstrsrc[3];
|
||||||
uuidstrdst[6] = uuidstrsrc[0];
|
uuidstrdst[6] = uuidstrsrc[0];
|
||||||
uuidstrdst[7] = uuidstrsrc[1];
|
uuidstrdst[7] = uuidstrsrc[1];
|
||||||
|
|
||||||
uuidstrdst[8] = uuidstrsrc[8];
|
uuidstrdst[8] = uuidstrsrc[8];
|
||||||
|
|
||||||
uuidstrdst[9] = uuidstrsrc[11];
|
uuidstrdst[9] = uuidstrsrc[11];
|
||||||
uuidstrdst[10] = uuidstrsrc[12];
|
uuidstrdst[10] = uuidstrsrc[12];
|
||||||
uuidstrdst[11] = uuidstrsrc[9];
|
uuidstrdst[11] = uuidstrsrc[9];
|
||||||
uuidstrdst[12] = uuidstrsrc[10];
|
uuidstrdst[12] = uuidstrsrc[10];
|
||||||
@ -267,18 +267,18 @@ static void nsIDFromChar(nsID *iid, const unsigned char *uuid)
|
|||||||
|
|
||||||
virUUIDFormat(uuid, uuidstrsrc);
|
virUUIDFormat(uuid, uuidstrsrc);
|
||||||
|
|
||||||
uuidstrdst[0] = uuidstrsrc[6];
|
uuidstrdst[0] = uuidstrsrc[6];
|
||||||
uuidstrdst[1] = uuidstrsrc[7];
|
uuidstrdst[1] = uuidstrsrc[7];
|
||||||
uuidstrdst[2] = uuidstrsrc[4];
|
uuidstrdst[2] = uuidstrsrc[4];
|
||||||
uuidstrdst[3] = uuidstrsrc[5];
|
uuidstrdst[3] = uuidstrsrc[5];
|
||||||
uuidstrdst[4] = uuidstrsrc[2];
|
uuidstrdst[4] = uuidstrsrc[2];
|
||||||
uuidstrdst[5] = uuidstrsrc[3];
|
uuidstrdst[5] = uuidstrsrc[3];
|
||||||
uuidstrdst[6] = uuidstrsrc[0];
|
uuidstrdst[6] = uuidstrsrc[0];
|
||||||
uuidstrdst[7] = uuidstrsrc[1];
|
uuidstrdst[7] = uuidstrsrc[1];
|
||||||
|
|
||||||
uuidstrdst[8] = uuidstrsrc[8];
|
uuidstrdst[8] = uuidstrsrc[8];
|
||||||
|
|
||||||
uuidstrdst[9] = uuidstrsrc[11];
|
uuidstrdst[9] = uuidstrsrc[11];
|
||||||
uuidstrdst[10] = uuidstrsrc[12];
|
uuidstrdst[10] = uuidstrsrc[12];
|
||||||
uuidstrdst[11] = uuidstrsrc[9];
|
uuidstrdst[11] = uuidstrsrc[9];
|
||||||
uuidstrdst[12] = uuidstrsrc[10];
|
uuidstrdst[12] = uuidstrsrc[10];
|
||||||
@ -940,13 +940,13 @@ _vboxAttachDrivesOld(virDomainDefPtr def, vboxGlobalData *data, IMachine *machin
|
|||||||
|
|
||||||
if (STREQ(def->disks[i]->dst, "hda")) {
|
if (STREQ(def->disks[i]->dst, "hda")) {
|
||||||
channel = 0;
|
channel = 0;
|
||||||
device = 0;
|
device = 0;
|
||||||
} else if (STREQ(def->disks[i]->dst, "hdb")) {
|
} else if (STREQ(def->disks[i]->dst, "hdb")) {
|
||||||
channel = 0;
|
channel = 0;
|
||||||
device = 1;
|
device = 1;
|
||||||
} else if (STREQ(def->disks[i]->dst, "hdd")) {
|
} else if (STREQ(def->disks[i]->dst, "hdd")) {
|
||||||
channel = 1;
|
channel = 1;
|
||||||
device = 1;
|
device = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = machine->vtbl->AttachHardDisk(machine,
|
rc = machine->vtbl->AttachHardDisk(machine,
|
||||||
@ -1425,31 +1425,31 @@ vboxCallbackOnMachineStateChange(IVirtualBoxCallback *pThis ATTRIBUTE_UNUSED,
|
|||||||
virObjectEventPtr ev;
|
virObjectEventPtr ev;
|
||||||
|
|
||||||
if (state == MachineState_Starting) {
|
if (state == MachineState_Starting) {
|
||||||
event = VIR_DOMAIN_EVENT_STARTED;
|
event = VIR_DOMAIN_EVENT_STARTED;
|
||||||
detail = VIR_DOMAIN_EVENT_STARTED_BOOTED;
|
detail = VIR_DOMAIN_EVENT_STARTED_BOOTED;
|
||||||
} else if (state == MachineState_Restoring) {
|
} else if (state == MachineState_Restoring) {
|
||||||
event = VIR_DOMAIN_EVENT_STARTED;
|
event = VIR_DOMAIN_EVENT_STARTED;
|
||||||
detail = VIR_DOMAIN_EVENT_STARTED_RESTORED;
|
detail = VIR_DOMAIN_EVENT_STARTED_RESTORED;
|
||||||
} else if (state == MachineState_Paused) {
|
} else if (state == MachineState_Paused) {
|
||||||
event = VIR_DOMAIN_EVENT_SUSPENDED;
|
event = VIR_DOMAIN_EVENT_SUSPENDED;
|
||||||
detail = VIR_DOMAIN_EVENT_SUSPENDED_PAUSED;
|
detail = VIR_DOMAIN_EVENT_SUSPENDED_PAUSED;
|
||||||
} else if (state == MachineState_Running) {
|
} else if (state == MachineState_Running) {
|
||||||
event = VIR_DOMAIN_EVENT_RESUMED;
|
event = VIR_DOMAIN_EVENT_RESUMED;
|
||||||
detail = VIR_DOMAIN_EVENT_RESUMED_UNPAUSED;
|
detail = VIR_DOMAIN_EVENT_RESUMED_UNPAUSED;
|
||||||
} else if (state == MachineState_PoweredOff) {
|
} else if (state == MachineState_PoweredOff) {
|
||||||
event = VIR_DOMAIN_EVENT_STOPPED;
|
event = VIR_DOMAIN_EVENT_STOPPED;
|
||||||
detail = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN;
|
detail = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN;
|
||||||
} else if (state == MachineState_Stopping) {
|
} else if (state == MachineState_Stopping) {
|
||||||
event = VIR_DOMAIN_EVENT_STOPPED;
|
event = VIR_DOMAIN_EVENT_STOPPED;
|
||||||
detail = VIR_DOMAIN_EVENT_STOPPED_DESTROYED;
|
detail = VIR_DOMAIN_EVENT_STOPPED_DESTROYED;
|
||||||
} else if (state == MachineState_Aborted) {
|
} else if (state == MachineState_Aborted) {
|
||||||
event = VIR_DOMAIN_EVENT_STOPPED;
|
event = VIR_DOMAIN_EVENT_STOPPED;
|
||||||
detail = VIR_DOMAIN_EVENT_STOPPED_CRASHED;
|
detail = VIR_DOMAIN_EVENT_STOPPED_CRASHED;
|
||||||
} else if (state == MachineState_Saving) {
|
} else if (state == MachineState_Saving) {
|
||||||
event = VIR_DOMAIN_EVENT_STOPPED;
|
event = VIR_DOMAIN_EVENT_STOPPED;
|
||||||
detail = VIR_DOMAIN_EVENT_STOPPED_SAVED;
|
detail = VIR_DOMAIN_EVENT_STOPPED_SAVED;
|
||||||
} else {
|
} else {
|
||||||
event = VIR_DOMAIN_EVENT_STOPPED;
|
event = VIR_DOMAIN_EVENT_STOPPED;
|
||||||
detail = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN;
|
detail = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1550,10 +1550,10 @@ vboxCallbackOnMachineRegistered(IVirtualBoxCallback *pThis ATTRIBUTE_UNUSED,
|
|||||||
* to show the VIR_DOMAIN_EVENT_UNDEFINED event
|
* to show the VIR_DOMAIN_EVENT_UNDEFINED event
|
||||||
*/
|
*/
|
||||||
if (registered) {
|
if (registered) {
|
||||||
event = VIR_DOMAIN_EVENT_DEFINED;
|
event = VIR_DOMAIN_EVENT_DEFINED;
|
||||||
detail = VIR_DOMAIN_EVENT_DEFINED_ADDED;
|
detail = VIR_DOMAIN_EVENT_DEFINED_ADDED;
|
||||||
} else {
|
} else {
|
||||||
event = VIR_DOMAIN_EVENT_UNDEFINED;
|
event = VIR_DOMAIN_EVENT_UNDEFINED;
|
||||||
detail = VIR_DOMAIN_EVENT_UNDEFINED_REMOVED;
|
detail = VIR_DOMAIN_EVENT_UNDEFINED_REMOVED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user