summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-04-25 21:41:09 +0100
committerRichard Jones <rjones@redhat.com>2009-04-25 21:41:09 +0100
commitaed0fa2c015e56a882fd6d4b759c82df08fc40d7 (patch)
treeacfb96c7b0adbc10ab73236d30c644b85807ffdc /daemon
parent58caa9e5f1dca3916178894876b938a6a45771b0 (diff)
downloadlibguestfs-aed0fa2c015e56a882fd6d4b759c82df08fc40d7.tar.gz
libguestfs-aed0fa2c015e56a882fd6d4b759c82df08fc40d7.tar.xz
libguestfs-aed0fa2c015e56a882fd6d4b759c82df08fc40d7.zip
Generated code for lvremove, vgremove, pvremove.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/actions.h3
-rw-r--r--daemon/stubs.c81
2 files changed, 84 insertions, 0 deletions
diff --git a/daemon/actions.h b/daemon/actions.h
index dafbca76..8e79f7b8 100644
--- a/daemon/actions.h
+++ b/daemon/actions.h
@@ -97,3 +97,6 @@ extern int do_mount_ro (const char *device, const char *mountpoint);
extern int do_mount_options (const char *options, const char *device, const char *mountpoint);
extern int do_mount_vfs (const char *options, const char *vfstype, const char *device, const char *mountpoint);
extern char *do_debug (const char *subcmd, char * const* const extraargs);
+extern int do_lvremove (const char *device);
+extern int do_vgremove (const char *vgname);
+extern int do_pvremove (const char *device);
diff --git a/daemon/stubs.c b/daemon/stubs.c
index e51349ae..02c76f1e 100644
--- a/daemon/stubs.c
+++ b/daemon/stubs.c
@@ -1872,6 +1872,78 @@ done:
xdr_free ((xdrproc_t) xdr_guestfs_debug_args, (char *) &args);
}
+static void lvremove_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_lvremove_args args;
+ const char *device;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_lvremove_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "lvremove");
+ return;
+ }
+ device = args.device;
+
+ r = do_lvremove (device);
+ if (r == -1)
+ /* do_lvremove has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_lvremove_args, (char *) &args);
+}
+
+static void vgremove_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_vgremove_args args;
+ const char *vgname;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_vgremove_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "vgremove");
+ return;
+ }
+ vgname = args.vgname;
+
+ r = do_vgremove (vgname);
+ if (r == -1)
+ /* do_vgremove has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_vgremove_args, (char *) &args);
+}
+
+static void pvremove_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_pvremove_args args;
+ const char *device;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_pvremove_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "pvremove");
+ return;
+ }
+ device = args.device;
+
+ r = do_pvremove (device);
+ if (r == -1)
+ /* do_pvremove has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_pvremove_args, (char *) &args);
+}
+
void dispatch_incoming_message (XDR *xdr_in)
{
switch (proc_nr) {
@@ -2103,6 +2175,15 @@ void dispatch_incoming_message (XDR *xdr_in)
case GUESTFS_PROC_DEBUG:
debug_stub (xdr_in);
break;
+ case GUESTFS_PROC_LVREMOVE:
+ lvremove_stub (xdr_in);
+ break;
+ case GUESTFS_PROC_VGREMOVE:
+ vgremove_stub (xdr_in);
+ break;
+ case GUESTFS_PROC_PVREMOVE:
+ pvremove_stub (xdr_in);
+ break;
default:
reply_with_error ("dispatch_incoming_message: unknown procedure number %d", proc_nr);
}