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

[libvirt] [PATCH 6/9] Implement RPC client for vol wiping



---
 src/remote/remote_driver.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index b7b2e09..9d28c84 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -5538,6 +5538,32 @@ done:
 }

 static int
+remoteStorageVolWipe(virStorageVolPtr vol,
+                     unsigned int flags)
+{
+    int rv = -1;
+    remote_storage_vol_wipe_args args;
+    struct private_data *priv = vol->conn->storagePrivateData;
+
+    remoteDriverLock(priv);
+
+    make_nonnull_storage_vol(&args.vol, vol);
+    args.flags = flags;
+
+    if (call(vol->conn, priv, 0, REMOTE_PROC_STORAGE_VOL_WIPE,
+             (xdrproc_t) xdr_remote_storage_vol_wipe_args, (char *) &args,
+             (xdrproc_t) xdr_void, (char *) NULL) == -1)
+        goto done;
+
+    rv = 0;
+
+done:
+    remoteDriverUnlock(priv);
+    return rv;
+}
+
+
+static int
 remoteStorageVolGetInfo (virStorageVolPtr vol, virStorageVolInfoPtr info)
 {
     int rv = -1;
@@ -9202,6 +9228,7 @@ static virStorageDriver storage_driver = {
     .volCreateXML = remoteStorageVolCreateXML,
     .volCreateXMLFrom = remoteStorageVolCreateXMLFrom,
     .volDelete = remoteStorageVolDelete,
+    .volWipe = remoteStorageVolWipe,
     .volGetInfo = remoteStorageVolGetInfo,
     .volGetXMLDesc = remoteStorageVolDumpXML,
     .volGetPath = remoteStorageVolGetPath,
-- 
1.6.5.5


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