~serge-hallyn/ubuntu/oneiric/libvirt/fix-shutdown

« back to all changes in this revision

Viewing changes to docs/api_extension/0005-Step-5-of-8-Implement-the-RPC-client.patch

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2010-11-02 16:26:51 UTC
  • mfrom: (1.2.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20101102162651-aq8tnbz58mdf01bf
Tags: 0.8.5-0ubuntu1
* New upstream release.
* Removed a slew of patches which have been
  applied upstream since 0.8.3.
  - 9012-apparmor-extra-tests.patch
  - 9013-apparmor-chardev.patch
  - 9015-Add-ubd-to-the-list-of-disk-prefixes.patch
  - 9016-Close-fd-s-of-persistent-tap-devices.patch
  - 9017-Make-sure-all-command-line-arguments-get-passed-to-U.patch
  - 9018-Make-umlConnectTapDevice-ask-brAddTap-for-a-persiste.patch
  - 9019-uml-fix-logic-bug-in-checking-reply-length.patch
  - 9021-Allow-chardev-of-type-file-for-UML-domains.patch
  - 9022-Rename-qemudShrinkDisks-to-virDomainDiskRemove-and-m.patch
  - 9023-Support-virDomainAttachDevice-and-virDomainDetachDev.patch
  - 9024-Explicitly-pass-uml_dir-argument-to-user-mode-linux.patch
  - 9025-Add-nwfilter-support-to-UML-driver.patch
  - 9026-Rebuild-network-filter-for-UML-guests-on-updates.patch
  - 9027-Make-newfilter-xml-transformations-endian-safe.patch
  - 9028-lp628055.patch
* Updated 9002-better_default_uri_virsh.patch to use vshStrdup,
  as now required in that file.  (use of strdup now causes compilation
  to fail)
* Removed 9008-run-as-root-by-default.patch, which has not been
  applied for awhile now, with no ill effects.
* Simple refresh of:
  - 0001-remove-RHism.diff.patch
  - 0003-allow-libvirt-group-to-access-the-socket.patch
  - 0004-fix-Debian-specific-path-to-hvm-loader.patch
  - 0006-patch-qemuMonitorTextGetMigrationStatus-to-intercept.patch
  - 9000-delayed_iff_up_bridge.patch
  - 9001-dont_clobber_existing_bridges.patch
  - 9003-better-default-arch.patch
  - 9004-libvirtd-group-name.patch
  - 9005-increase-unix-socket-timeout.patch
  - 9006-default-config-test-case.patch
  - 9009-autodetect-nc-params.patch
  - 9010-dont-disable-ipv6.patch
  - 9011-move-ebtables-script.patch
  - 9014-skip-nodeinfotest.patch
  - 9020-lp545795.patch
* Create a patch to include stdint.h so lxc_container.h, which
  #includes linux/fs.h, doesn't trip up on undefined uint64_t.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From ff272552c297966ace3492aefe91fc830152251a Mon Sep 17 00:00:00 2001
2
 
From: David Allan <dallan@redhat.com>
3
 
Date: Tue, 19 May 2009 16:26:12 -0400
4
 
Subject: [PATCH] Step 5 of 8 Implement the RPC client
5
 
 
6
 
---
7
 
 src/remote_internal.c |   55 +++++++++++++++++++++++++++++++++++++++++++++++++
8
 
 1 files changed, 55 insertions(+), 0 deletions(-)
9
 
 
10
 
diff --git a/src/remote_internal.c b/src/remote_internal.c
11
 
index 4b3afb0..e665ef8 100644
12
 
--- a/src/remote_internal.c
13
 
+++ b/src/remote_internal.c
14
 
@@ -4978,6 +4978,59 @@ done:
15
 
 }
16
 
 
17
 
 
18
 
+static virNodeDevicePtr
19
 
+remoteNodeDeviceCreateXML(virConnectPtr conn,
20
 
+                          const char *xmlDesc,
21
 
+                          unsigned int flags)
22
 
+{
23
 
+    remote_node_device_create_xml_args args;
24
 
+    remote_node_device_create_xml_ret ret;
25
 
+    virNodeDevicePtr dev = NULL;
26
 
+    struct private_data *priv = conn->privateData;
27
 
+
28
 
+    remoteDriverLock(priv);
29
 
+
30
 
+    memset(&ret, 0, sizeof ret);
31
 
+    args.xml_desc = (char *)xmlDesc;
32
 
+    args.flags = flags;
33
 
+
34
 
+    if (call(conn, priv, 0, REMOTE_PROC_NODE_DEVICE_CREATE_XML,
35
 
+             (xdrproc_t) xdr_remote_node_device_create_xml_args, (char *) &args,
36
 
+             (xdrproc_t) xdr_remote_node_device_create_xml_ret, (char *) &ret) == -1)
37
 
+        goto done;
38
 
+
39
 
+    dev = get_nonnull_node_device(conn, ret.dev);
40
 
+    xdr_free ((xdrproc_t) xdr_remote_node_device_create_xml_ret, (char *) &ret);
41
 
+
42
 
+done:
43
 
+    remoteDriverUnlock(priv);
44
 
+    return dev;
45
 
+}
46
 
+
47
 
+static int
48
 
+remoteNodeDeviceDestroy(virNodeDevicePtr dev)
49
 
+{
50
 
+    int rv = -1;
51
 
+    remote_node_device_destroy_args args;
52
 
+    struct private_data *priv = dev->conn->privateData;
53
 
+
54
 
+    remoteDriverLock(priv);
55
 
+
56
 
+    args.name = dev->name;
57
 
+
58
 
+    if (call(dev->conn, priv, 0, REMOTE_PROC_NODE_DEVICE_DESTROY,
59
 
+             (xdrproc_t) xdr_remote_node_device_destroy_args, (char *) &args,
60
 
+             (xdrproc_t) xdr_void, (char *) NULL) == -1)
61
 
+        goto done;
62
 
+
63
 
+    rv = 0;
64
 
+
65
 
+done:
66
 
+    remoteDriverUnlock(priv);
67
 
+    return rv;
68
 
+}
69
 
+
70
 
+
71
 
 /*----------------------------------------------------------------------*/
72
 
 
73
 
 static int
74
 
@@ -6982,6 +7035,8 @@ static virDeviceMonitor dev_monitor = {
75
 
     .deviceGetParent = remoteNodeDeviceGetParent,
76
 
     .deviceNumOfCaps = remoteNodeDeviceNumOfCaps,
77
 
     .deviceListCaps = remoteNodeDeviceListCaps,
78
 
+    .deviceCreateXML = remoteNodeDeviceCreateXML,
79
 
+    .deviceDestroy = remoteNodeDeviceDestroy
80
 
 };
81
 
 
82
 
 
83
 
1.6.0.6