On Thu, Jan 14, 2010 at 10:42:44AM -0700, Jim Fehlig wrote: > Server side dispatcher for Domain{Attach,Detach}DeviceFlags. > --- > daemon/remote.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 53 insertions(+), 0 deletions(-) > > diff --git a/daemon/remote.c b/daemon/remote.c > index 0b30131..395c060 100644 > --- a/daemon/remote.c > +++ b/daemon/remote.c > @@ -890,6 +890,32 @@ remoteDispatchDomainAttachDevice (struct qemud_server *server ATTRIBUTE_UNUSED, > } > > static int > +remoteDispatchDomainAttachDeviceFlags (struct qemud_server *server ATTRIBUTE_UNUSED, > + struct qemud_client *client ATTRIBUTE_UNUSED, > + virConnectPtr conn, > + remote_message_header *hdr ATTRIBUTE_UNUSED, > + remote_error *rerr, > + remote_domain_attach_device_flags_args *args, > + void *ret ATTRIBUTE_UNUSED) > +{ > + virDomainPtr dom; > + > + dom = get_nonnull_domain (conn, args->dom); > + if (dom == NULL) { > + remoteDispatchConnError(rerr, conn); > + return -1; > + } > + > + if (virDomainAttachDeviceFlags (dom, args->xml, args->flags) == -1) { > + virDomainFree(dom); > + remoteDispatchConnError(rerr, conn); > + return -1; > + } > + virDomainFree(dom); > + return 0; > +} > + > +static int > remoteDispatchDomainCreate (struct qemud_server *server ATTRIBUTE_UNUSED, > struct qemud_client *client ATTRIBUTE_UNUSED, > virConnectPtr conn, > @@ -1015,6 +1041,33 @@ remoteDispatchDomainDetachDevice (struct qemud_server *server ATTRIBUTE_UNUSED, > } > > static int > +remoteDispatchDomainDetachDeviceFlags (struct qemud_server *server ATTRIBUTE_UNUSED, > + struct qemud_client *client ATTRIBUTE_UNUSED, > + virConnectPtr conn, > + remote_message_header *hdr ATTRIBUTE_UNUSED, > + remote_error *rerr, > + remote_domain_detach_device_flags_args *args, > + void *ret ATTRIBUTE_UNUSED) > +{ > + virDomainPtr dom; > + > + dom = get_nonnull_domain (conn, args->dom); > + if (dom == NULL) { > + remoteDispatchConnError(rerr, conn); > + return -1; > + } > + > + if (virDomainDetachDeviceFlags (dom, args->xml, args->flags) == -1) { > + virDomainFree(dom); > + remoteDispatchConnError(rerr, conn); > + return -1; > + } > + > + virDomainFree(dom); > + return 0; > +} > + > +static int > remoteDispatchDomainDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED, > struct qemud_client *client ATTRIBUTE_UNUSED, > virConnectPtr conn, > -- ACK Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list