[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] Patch for setting USB mass storage device (-usbdevice dis

From: Wicher
Subject: [Qemu-discuss] Patch for setting USB mass storage device (-usbdevice disk) VID, PID serial etc.
Date: Tue, 25 Aug 2015 08:30:50 +0200


Recently I needed to sandbox some software, running it inside Qemu off
of a disk image of the USB stick it came on.
However, Qemu's USB mass storage device emulation (-usbdevice disk)
shows up as a "QEMU USB HARDDRIVE" with VID:PID of 46f4:0001.
The sandboxed software didn't like that at all, and refused to run. So
I patched Qemu to take VID, PID, serial etc. from the command line
arguments, like so:

I'm posting the patch here for other people to find, should they
develop the same VID-faking needs.
I've read http://wiki.qemu.org/Contribute/SubmitAPatch and decided
to not post the patch to -dev as this is a one-off single-purpose
hack, not a proper solution. For instance, with this patch, adding more than one
'-usbdevice disk' type device will lead to spectacular failures. Beware!

Cheers, Wicher Minnaard

Attachment: qemu-2.3.0-usbmass.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]