On Tue, Oct 09, 2012 at 02:13:24PM +0200, Jiri Denemark wrote: > All USB device lookup functions emit an error when they cannot find the > requested device. With this patch, their caller can choose if a missing > device is an error or normal condition. > --- > src/conf/domain_conf.h | 1 + > src/qemu/qemu_hostdev.c | 57 ++++++++++++++++---------- > src/qemu/qemu_hostdev.h | 4 +- > src/qemu/qemu_hotplug.c | 2 +- > src/security/security_dac.c | 16 ++++++-- > src/security/security_selinux.c | 16 ++++++-- > src/util/hostusb.c | 91 ++++++++++++++++++++++++++++++----------- > src/util/hostusb.h | 22 ++++++---- > 8 files changed, 145 insertions(+), 64 deletions(-) > > diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h > index fa5d1f4..3cb1193 100644 > --- a/src/conf/domain_conf.h > +++ b/src/conf/domain_conf.h > @@ -386,6 +386,7 @@ struct _virDomainHostdevDef { > int mode; /* enum virDomainHostdevMode */ > int startupPolicy; /* enum virDomainStartupPolicy */ > unsigned int managed : 1; > + unsigned int missing : 1; > union { > virDomainHostdevSubsys subsys; > struct { I was wondering if we should actually expose this in the XML, as a read-only attribute, only shown when requesting the live XML. Otherwise there's no way for an application to determine whether the USB device they requested was actually given to the guest, without looking inside the guest. ACK to the other parts of the patch Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list