mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-05 04:41:20 +00:00
qemu: Add caps to indentify if setting wwn is supported by qemu
This assumes ide-drive.wwn, ide-hd.wwn, ide-cd.wwn were supported at the same time, similar for scsi-disk.wwn, scsi-hd.wwn, and scsi-cd.wwn. So only two new caps (QEMU_CAPS_IDE_DRIVE_WWN, and QEMU_CAPS_SCSI_DISK_WWN) are introduced.
This commit is contained in:
parent
facc1c0057
commit
331934b296
@ -177,6 +177,8 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
|
|||||||
|
|
||||||
"disable-s4", /* 105 */
|
"disable-s4", /* 105 */
|
||||||
"usb-redir.filter",
|
"usb-redir.filter",
|
||||||
|
"ide-drive.wwn",
|
||||||
|
"scsi-disk.wwn",
|
||||||
);
|
);
|
||||||
|
|
||||||
struct _qemuCaps {
|
struct _qemuCaps {
|
||||||
@ -1466,6 +1468,7 @@ qemuCapsExtractDeviceStr(const char *qemu,
|
|||||||
"-device", "scsi-disk,?",
|
"-device", "scsi-disk,?",
|
||||||
"-device", "PIIX4_PM,?",
|
"-device", "PIIX4_PM,?",
|
||||||
"-device", "usb-redir,?",
|
"-device", "usb-redir,?",
|
||||||
|
"-device", "ide-drive,?",
|
||||||
NULL);
|
NULL);
|
||||||
/* qemu -help goes to stdout, but qemu -device ? goes to stderr. */
|
/* qemu -help goes to stdout, but qemu -device ? goes to stderr. */
|
||||||
virCommandSetErrorBuffer(cmd, &output);
|
virCommandSetErrorBuffer(cmd, &output);
|
||||||
@ -1558,12 +1561,17 @@ qemuCapsParseDeviceStr(const char *str, qemuCapsPtr caps)
|
|||||||
qemuCapsSet(caps, QEMU_CAPS_VIRTIO_BLK_SCSI);
|
qemuCapsSet(caps, QEMU_CAPS_VIRTIO_BLK_SCSI);
|
||||||
if (strstr(str, "scsi-disk.channel"))
|
if (strstr(str, "scsi-disk.channel"))
|
||||||
qemuCapsSet(caps, QEMU_CAPS_SCSI_DISK_CHANNEL);
|
qemuCapsSet(caps, QEMU_CAPS_SCSI_DISK_CHANNEL);
|
||||||
|
if (strstr(str, "scsi-disk.wwn"))
|
||||||
|
qemuCapsSet(caps, QEMU_CAPS_SCSI_DISK_WWN);
|
||||||
if (strstr(str, "scsi-block"))
|
if (strstr(str, "scsi-block"))
|
||||||
qemuCapsSet(caps, QEMU_CAPS_SCSI_BLOCK);
|
qemuCapsSet(caps, QEMU_CAPS_SCSI_BLOCK);
|
||||||
if (strstr(str, "scsi-cd"))
|
if (strstr(str, "scsi-cd"))
|
||||||
qemuCapsSet(caps, QEMU_CAPS_SCSI_CD);
|
qemuCapsSet(caps, QEMU_CAPS_SCSI_CD);
|
||||||
if (strstr(str, "ide-cd"))
|
if (strstr(str, "ide-cd"))
|
||||||
qemuCapsSet(caps, QEMU_CAPS_IDE_CD);
|
qemuCapsSet(caps, QEMU_CAPS_IDE_CD);
|
||||||
|
if (strstr(str, "ide-drive.wwn"))
|
||||||
|
qemuCapsSet(caps, QEMU_CAPS_IDE_DRIVE_WWN);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* the iolimit detection is not really straight forward:
|
* the iolimit detection is not really straight forward:
|
||||||
* in qemu this is a capability of the block layer, if
|
* in qemu this is a capability of the block layer, if
|
||||||
|
@ -142,6 +142,8 @@ enum qemuCapsFlags {
|
|||||||
QEMU_CAPS_DISABLE_S3 = 104, /* S3 BIOS Advertisement on/off */
|
QEMU_CAPS_DISABLE_S3 = 104, /* S3 BIOS Advertisement on/off */
|
||||||
QEMU_CAPS_DISABLE_S4 = 105, /* S4 BIOS Advertisement on/off */
|
QEMU_CAPS_DISABLE_S4 = 105, /* S4 BIOS Advertisement on/off */
|
||||||
QEMU_CAPS_USB_REDIR_FILTER = 106, /* usb-redir.filter */
|
QEMU_CAPS_USB_REDIR_FILTER = 106, /* usb-redir.filter */
|
||||||
|
QEMU_CAPS_IDE_DRIVE_WWN = 107, /* Is ide-drive.wwn available? */
|
||||||
|
QEMU_CAPS_SCSI_DISK_WWN = 108, /* Is scsi-disk.wwn available? */
|
||||||
|
|
||||||
QEMU_CAPS_LAST, /* this must always be the last item */
|
QEMU_CAPS_LAST, /* this must always be the last item */
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user