qemu: test CAPS_HDA_MICRO

This commit is contained in:
Marc-André Lureau 2012-05-16 00:55:08 +02:00 committed by Eric Blake
parent 9c484e3dc5
commit 0aaebd7abc
3 changed files with 8 additions and 1 deletions

View File

@ -162,6 +162,9 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
"scsi-cd", "scsi-cd",
"ide-cd", "ide-cd",
"no-user-config", "no-user-config",
"hda-micro", /* 95 */
); );
struct qemu_feature_flags { struct qemu_feature_flags {
@ -1397,6 +1400,8 @@ qemuCapsParseDeviceStr(const char *str, virBitmapPtr flags)
/* Which devices exist. */ /* Which devices exist. */
if (strstr(str, "name \"hda-duplex\"")) if (strstr(str, "name \"hda-duplex\""))
qemuCapsSet(flags, QEMU_CAPS_HDA_DUPLEX); qemuCapsSet(flags, QEMU_CAPS_HDA_DUPLEX);
if (strstr(str, "name \"hda-micro\""))
qemuCapsSet(flags, QEMU_CAPS_HDA_MICRO);
if (strstr(str, "name \"ccid-card-emulated\"")) if (strstr(str, "name \"ccid-card-emulated\""))
qemuCapsSet(flags, QEMU_CAPS_CCID_EMULATED); qemuCapsSet(flags, QEMU_CAPS_CCID_EMULATED);
if (strstr(str, "name \"ccid-card-passthru\"")) if (strstr(str, "name \"ccid-card-passthru\""))

View File

@ -130,6 +130,7 @@ enum qemuCapsFlags {
QEMU_CAPS_SCSI_CD = 92, /* -device scsi-cd */ QEMU_CAPS_SCSI_CD = 92, /* -device scsi-cd */
QEMU_CAPS_IDE_CD = 93, /* -device ide-cd */ QEMU_CAPS_IDE_CD = 93, /* -device ide-cd */
QEMU_CAPS_NO_USER_CONFIG = 94, /* -no-user-config */ QEMU_CAPS_NO_USER_CONFIG = 94, /* -no-user-config */
QEMU_CAPS_HDA_MICRO = 95, /* -device hda-micro */
QEMU_CAPS_LAST, /* this must always be the last item */ QEMU_CAPS_LAST, /* this must always be the last item */
}; };

View File

@ -752,7 +752,8 @@ mymain(void)
QEMU_CAPS_SCSI_BLOCK, QEMU_CAPS_SCSI_BLOCK,
QEMU_CAPS_SCSI_CD, QEMU_CAPS_SCSI_CD,
QEMU_CAPS_IDE_CD, QEMU_CAPS_IDE_CD,
QEMU_CAPS_NO_USER_CONFIG); QEMU_CAPS_NO_USER_CONFIG,
QEMU_CAPS_HDA_MICRO);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
} }