return devnum;
desc->devnum = devnum;
desc->part_type = PART_TYPE_UNKNOWN;
- /*
- * virtio mmio transport supplies string identification for us,
- * while pci trnasport uses a 2-byte subvendor value.
- */
- if (uc_priv->vendor >> 16)
- sprintf(desc->vendor, "%s", (char *)&uc_priv->vendor);
+
+ if (uc_priv->vendor == VIRTIO_VENDOR_QEMU)
+ strcpy(desc->vendor, "QEMU");
else
- sprintf(desc->vendor, "%04x", uc_priv->vendor);
+ sprintf(desc->vendor, "%08x", uc_priv->vendor);
desc->bdev = dev;
/* Indicate what driver features we support */
#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/typecheck.h>
+
+#define VIRTIO_VENDOR_QEMU 0x554d4551
+
#define VIRTIO_ID_NET 1 /* virtio net */
#define VIRTIO_ID_BLOCK 2 /* virtio block */
#define VIRTIO_ID_RNG 4 /* virtio rng */