summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-05-18 20:22:53 +0100
committerRichard Jones <rjones@redhat.com>2009-05-18 20:22:53 +0100
commitca49c50e06834bbc68e21630a5552c57494f2b53 (patch)
tree0d1c98fd038abf05d7491f044c8affbfb461ce00 /daemon
parent0695593702b8612b500ff0b3bf800e5934f9b56e (diff)
downloadlibguestfs-ca49c50e06834bbc68e21630a5552c57494f2b53.tar.gz
libguestfs-ca49c50e06834bbc68e21630a5552c57494f2b53.tar.xz
libguestfs-ca49c50e06834bbc68e21630a5552c57494f2b53.zip
Generated code for lvresize, resize2fs.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/actions.h2
-rw-r--r--daemon/stubs.c56
2 files changed, 58 insertions, 0 deletions
diff --git a/daemon/actions.h b/daemon/actions.h
index dcffd2a2..79ec62aa 100644
--- a/daemon/actions.h
+++ b/daemon/actions.h
@@ -125,3 +125,5 @@ extern char *do_sfdisk_kernel_geometry (const char *device);
extern char *do_sfdisk_disk_geometry (const char *device);
extern int do_vg_activate_all (int activate);
extern int do_vg_activate (int activate, char * const* const volgroups);
+extern int do_lvresize (const char *device, int mbytes);
+extern int do_resize2fs (const char *device);
diff --git a/daemon/stubs.c b/daemon/stubs.c
index 2fd2da93..2fdd5c16 100644
--- a/daemon/stubs.c
+++ b/daemon/stubs.c
@@ -2617,6 +2617,56 @@ done:
xdr_free ((xdrproc_t) xdr_guestfs_vg_activate_args, (char *) &args);
}
+static void lvresize_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_lvresize_args args;
+ const char *device;
+ int mbytes;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_lvresize_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "lvresize");
+ return;
+ }
+ device = args.device;
+ mbytes = args.mbytes;
+
+ r = do_lvresize (device, mbytes);
+ if (r == -1)
+ /* do_lvresize has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_lvresize_args, (char *) &args);
+}
+
+static void resize2fs_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_resize2fs_args args;
+ const char *device;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_resize2fs_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "resize2fs");
+ return;
+ }
+ device = args.device;
+
+ r = do_resize2fs (device);
+ if (r == -1)
+ /* do_resize2fs has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_resize2fs_args, (char *) &args);
+}
+
void dispatch_incoming_message (XDR *xdr_in)
{
switch (proc_nr) {
@@ -2932,6 +2982,12 @@ void dispatch_incoming_message (XDR *xdr_in)
case GUESTFS_PROC_VG_ACTIVATE:
vg_activate_stub (xdr_in);
break;
+ case GUESTFS_PROC_LVRESIZE:
+ lvresize_stub (xdr_in);
+ break;
+ case GUESTFS_PROC_RESIZE2FS:
+ resize2fs_stub (xdr_in);
+ break;
default:
reply_with_error ("dispatch_incoming_message: unknown procedure number %d", proc_nr);
}