Generated code for mknod, mkfifo, mknod_b, mknod_c, umask.
[libguestfs.git] / daemon / stubs.c
index af0f14c..033f42c 100644 (file)
@@ -19,7 +19,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#define _GNU_SOURCE // for strchrnul
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -37,8 +37,8 @@ static void mount_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_mount_args args;
-  const char *device;
-  const char *mountpoint;
+  char *device;
+  char *mountpoint;
 
   memset (&args, 0, sizeof args);
 
@@ -76,7 +76,7 @@ static void touch_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_touch_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -100,7 +100,7 @@ static void cat_stub (XDR *xdr_in)
 {
   char *r;
   struct guestfs_cat_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -127,7 +127,7 @@ static void ll_stub (XDR *xdr_in)
 {
   char *r;
   struct guestfs_ll_args args;
-  const char *directory;
+  char *directory;
 
   memset (&args, 0, sizeof args);
 
@@ -154,7 +154,7 @@ static void ls_stub (XDR *xdr_in)
 {
   char **r;
   struct guestfs_ls_args args;
-  const char *directory;
+  char *directory;
 
   memset (&args, 0, sizeof args);
 
@@ -315,7 +315,7 @@ static void read_lines_stub (XDR *xdr_in)
 {
   char **r;
   struct guestfs_read_lines_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -343,7 +343,7 @@ static void aug_init_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_aug_init_args args;
-  const char *root;
+  char *root;
   int flags;
 
   memset (&args, 0, sizeof args);
@@ -382,8 +382,8 @@ static void aug_defvar_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_aug_defvar_args args;
-  const char *name;
-  const char *expr;
+  char *name;
+  char *expr;
 
   memset (&args, 0, sizeof args);
 
@@ -410,9 +410,9 @@ static void aug_defnode_stub (XDR *xdr_in)
 {
   guestfs_aug_defnode_ret *r;
   struct guestfs_aug_defnode_args args;
-  const char *name;
-  const char *expr;
-  const char *val;
+  char *name;
+  char *expr;
+  char *val;
 
   memset (&args, 0, sizeof args);
 
@@ -439,7 +439,7 @@ static void aug_get_stub (XDR *xdr_in)
 {
   char *r;
   struct guestfs_aug_get_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -466,8 +466,8 @@ static void aug_set_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_aug_set_args args;
-  const char *path;
-  const char *val;
+  char *path;
+  char *val;
 
   memset (&args, 0, sizeof args);
 
@@ -492,8 +492,8 @@ static void aug_insert_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_aug_insert_args args;
-  const char *path;
-  const char *label;
+  char *path;
+  char *label;
   int before;
 
   memset (&args, 0, sizeof args);
@@ -520,7 +520,7 @@ static void aug_rm_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_aug_rm_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -546,8 +546,8 @@ static void aug_mv_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_aug_mv_args args;
-  const char *src;
-  const char *dest;
+  char *src;
+  char *dest;
 
   memset (&args, 0, sizeof args);
 
@@ -572,7 +572,7 @@ static void aug_match_stub (XDR *xdr_in)
 {
   char **r;
   struct guestfs_aug_match_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -626,7 +626,7 @@ static void aug_ls_stub (XDR *xdr_in)
 {
   char **r;
   struct guestfs_aug_ls_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -654,7 +654,7 @@ static void rm_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_rm_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -678,7 +678,7 @@ static void rmdir_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_rmdir_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -702,7 +702,7 @@ static void rm_rf_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_rm_rf_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -726,7 +726,7 @@ static void mkdir_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_mkdir_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -750,7 +750,7 @@ static void mkdir_p_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_mkdir_p_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -775,7 +775,7 @@ static void chmod_stub (XDR *xdr_in)
   int r;
   struct guestfs_chmod_args args;
   int mode;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -802,7 +802,7 @@ static void chown_stub (XDR *xdr_in)
   struct guestfs_chown_args args;
   int owner;
   int group;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -828,7 +828,7 @@ static void exists_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_exists_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -854,7 +854,7 @@ static void is_file_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_is_file_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -880,7 +880,7 @@ static void is_dir_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_is_dir_args args;
-  const char *path;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
@@ -906,7 +906,7 @@ static void pvcreate_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_pvcreate_args args;
-  const char *device;
+  char *device;
 
   memset (&args, 0, sizeof args);
 
@@ -930,7 +930,7 @@ static void vgcreate_stub (XDR *xdr_in)
 {
   int r;
   struct guestfs_vgcreate_args args;
-  const char *volgroup;
+  char *volgroup;
   char **physvols;
 
   memset (&args, 0, sizeof args);
@@ -940,228 +940,2541 @@ static void vgcreate_stub (XDR *xdr_in)
     return;
   }
   volgroup = args.volgroup;
-  args.physvols.physvols_val = realloc (args.physvols.physvols_val, sizeof (char *) * (args.physvols.physvols_len+1));
-  args.physvols.physvols_val[args.physvols.physvols_len] = NULL;
-  physvols = args.physvols.physvols_val;
+  physvols = realloc (args.physvols.physvols_val,
+                sizeof (char *) * (args.physvols.physvols_len+1));
+  if (physvols == NULL) {
+    reply_with_perror ("realloc");
+    goto done;
+  }
+  physvols[args.physvols.physvols_len] = NULL;
+  args.physvols.physvols_val = physvols;
+
+  r = do_vgcreate (volgroup, physvols);
+  if (r == -1)
+    /* do_vgcreate has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_vgcreate_args, (char *) &args);
+}
+
+static void lvcreate_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_lvcreate_args args;
+  char *logvol;
+  char *volgroup;
+  int mbytes;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_lvcreate_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "lvcreate");
+    return;
+  }
+  logvol = args.logvol;
+  volgroup = args.volgroup;
+  mbytes = args.mbytes;
+
+  r = do_lvcreate (logvol, volgroup, mbytes);
+  if (r == -1)
+    /* do_lvcreate has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_lvcreate_args, (char *) &args);
+}
+
+static void mkfs_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_mkfs_args args;
+  char *fstype;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_mkfs_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "mkfs");
+    return;
+  }
+  fstype = args.fstype;
+  device = args.device;
+
+  r = do_mkfs (fstype, device);
+  if (r == -1)
+    /* do_mkfs has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_mkfs_args, (char *) &args);
+}
+
+static void sfdisk_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_sfdisk_args args;
+  char *device;
+  int cyls;
+  int heads;
+  int sectors;
+  char **lines;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_sfdisk_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "sfdisk");
+    return;
+  }
+  device = args.device;
+  cyls = args.cyls;
+  heads = args.heads;
+  sectors = args.sectors;
+  lines = realloc (args.lines.lines_val,
+                sizeof (char *) * (args.lines.lines_len+1));
+  if (lines == NULL) {
+    reply_with_perror ("realloc");
+    goto done;
+  }
+  lines[args.lines.lines_len] = NULL;
+  args.lines.lines_val = lines;
+
+  r = do_sfdisk (device, cyls, heads, sectors, lines);
+  if (r == -1)
+    /* do_sfdisk has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_sfdisk_args, (char *) &args);
+}
+
+static void write_file_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_write_file_args args;
+  char *path;
+  char *content;
+  int size;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_write_file_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "write_file");
+    return;
+  }
+  path = args.path;
+  content = args.content;
+  size = args.size;
+
+  r = do_write_file (path, content, size);
+  if (r == -1)
+    /* do_write_file has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_write_file_args, (char *) &args);
+}
+
+static void umount_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_umount_args args;
+  char *pathordevice;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_umount_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "umount");
+    return;
+  }
+  pathordevice = args.pathordevice;
+
+  r = do_umount (pathordevice);
+  if (r == -1)
+    /* do_umount has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_umount_args, (char *) &args);
+}
+
+static void mounts_stub (XDR *xdr_in)
+{
+  char **r;
+
+  r = do_mounts ();
+  if (r == NULL)
+    /* do_mounts has already called reply_with_error */
+    goto done;
+
+  struct guestfs_mounts_ret ret;
+  ret.devices.devices_len = count_strings (r);
+  ret.devices.devices_val = r;
+  reply ((xdrproc_t) &xdr_guestfs_mounts_ret, (char *) &ret);
+  free_strings (r);
+done: ;
+}
+
+static void umount_all_stub (XDR *xdr_in)
+{
+  int r;
+
+  r = do_umount_all ();
+  if (r == -1)
+    /* do_umount_all has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done: ;
+}
+
+static void lvm_remove_all_stub (XDR *xdr_in)
+{
+  int r;
+
+  r = do_lvm_remove_all ();
+  if (r == -1)
+    /* do_lvm_remove_all has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done: ;
+}
+
+static void file_stub (XDR *xdr_in)
+{
+  char *r;
+  struct guestfs_file_args args;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_file_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "file");
+    return;
+  }
+  path = args.path;
+
+  r = do_file (path);
+  if (r == NULL)
+    /* do_file has already called reply_with_error */
+    goto done;
+
+  struct guestfs_file_ret ret;
+  ret.description = r;
+  reply ((xdrproc_t) &xdr_guestfs_file_ret, (char *) &ret);
+  free (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_file_args, (char *) &args);
+}
+
+static void command_stub (XDR *xdr_in)
+{
+  char *r;
+  struct guestfs_command_args args;
+  char **arguments;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_command_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "command");
+    return;
+  }
+  arguments = realloc (args.arguments.arguments_val,
+                sizeof (char *) * (args.arguments.arguments_len+1));
+  if (arguments == NULL) {
+    reply_with_perror ("realloc");
+    goto done;
+  }
+  arguments[args.arguments.arguments_len] = NULL;
+  args.arguments.arguments_val = arguments;
+
+  r = do_command (arguments);
+  if (r == NULL)
+    /* do_command has already called reply_with_error */
+    goto done;
+
+  struct guestfs_command_ret ret;
+  ret.output = r;
+  reply ((xdrproc_t) &xdr_guestfs_command_ret, (char *) &ret);
+  free (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_command_args, (char *) &args);
+}
+
+static void command_lines_stub (XDR *xdr_in)
+{
+  char **r;
+  struct guestfs_command_lines_args args;
+  char **arguments;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_command_lines_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "command_lines");
+    return;
+  }
+  arguments = realloc (args.arguments.arguments_val,
+                sizeof (char *) * (args.arguments.arguments_len+1));
+  if (arguments == NULL) {
+    reply_with_perror ("realloc");
+    goto done;
+  }
+  arguments[args.arguments.arguments_len] = NULL;
+  args.arguments.arguments_val = arguments;
+
+  r = do_command_lines (arguments);
+  if (r == NULL)
+    /* do_command_lines has already called reply_with_error */
+    goto done;
+
+  struct guestfs_command_lines_ret ret;
+  ret.lines.lines_len = count_strings (r);
+  ret.lines.lines_val = r;
+  reply ((xdrproc_t) &xdr_guestfs_command_lines_ret, (char *) &ret);
+  free_strings (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_command_lines_args, (char *) &args);
+}
+
+static void stat_stub (XDR *xdr_in)
+{
+  guestfs_int_stat *r;
+  struct guestfs_stat_args args;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_stat_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "stat");
+    return;
+  }
+  path = args.path;
+
+  r = do_stat (path);
+  if (r == NULL)
+    /* do_stat has already called reply_with_error */
+    goto done;
+
+  struct guestfs_stat_ret ret;
+  ret.statbuf = *r;
+  reply ((xdrproc_t) xdr_guestfs_stat_ret, (char *) &ret);
+  xdr_free ((xdrproc_t) xdr_guestfs_stat_ret, (char *) &ret);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_stat_args, (char *) &args);
+}
+
+static void lstat_stub (XDR *xdr_in)
+{
+  guestfs_int_stat *r;
+  struct guestfs_lstat_args args;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_lstat_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "lstat");
+    return;
+  }
+  path = args.path;
+
+  r = do_lstat (path);
+  if (r == NULL)
+    /* do_lstat has already called reply_with_error */
+    goto done;
+
+  struct guestfs_lstat_ret ret;
+  ret.statbuf = *r;
+  reply ((xdrproc_t) xdr_guestfs_lstat_ret, (char *) &ret);
+  xdr_free ((xdrproc_t) xdr_guestfs_lstat_ret, (char *) &ret);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_lstat_args, (char *) &args);
+}
+
+static void statvfs_stub (XDR *xdr_in)
+{
+  guestfs_int_statvfs *r;
+  struct guestfs_statvfs_args args;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_statvfs_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "statvfs");
+    return;
+  }
+  path = args.path;
+
+  r = do_statvfs (path);
+  if (r == NULL)
+    /* do_statvfs has already called reply_with_error */
+    goto done;
+
+  struct guestfs_statvfs_ret ret;
+  ret.statbuf = *r;
+  reply ((xdrproc_t) xdr_guestfs_statvfs_ret, (char *) &ret);
+  xdr_free ((xdrproc_t) xdr_guestfs_statvfs_ret, (char *) &ret);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_statvfs_args, (char *) &args);
+}
+
+static void tune2fs_l_stub (XDR *xdr_in)
+{
+  char **r;
+  struct guestfs_tune2fs_l_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_tune2fs_l_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "tune2fs_l");
+    return;
+  }
+  device = args.device;
+
+  r = do_tune2fs_l (device);
+  if (r == NULL)
+    /* do_tune2fs_l has already called reply_with_error */
+    goto done;
+
+  struct guestfs_tune2fs_l_ret ret;
+  ret.superblock.superblock_len = count_strings (r);
+  ret.superblock.superblock_val = r;
+  reply ((xdrproc_t) &xdr_guestfs_tune2fs_l_ret, (char *) &ret);
+  free_strings (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_tune2fs_l_args, (char *) &args);
+}
+
+static void blockdev_setro_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_blockdev_setro_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_blockdev_setro_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "blockdev_setro");
+    return;
+  }
+  device = args.device;
+
+  r = do_blockdev_setro (device);
+  if (r == -1)
+    /* do_blockdev_setro has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_blockdev_setro_args, (char *) &args);
+}
+
+static void blockdev_setrw_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_blockdev_setrw_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_blockdev_setrw_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "blockdev_setrw");
+    return;
+  }
+  device = args.device;
+
+  r = do_blockdev_setrw (device);
+  if (r == -1)
+    /* do_blockdev_setrw has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_blockdev_setrw_args, (char *) &args);
+}
+
+static void blockdev_getro_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_blockdev_getro_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_blockdev_getro_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "blockdev_getro");
+    return;
+  }
+  device = args.device;
+
+  r = do_blockdev_getro (device);
+  if (r == -1)
+    /* do_blockdev_getro has already called reply_with_error */
+    goto done;
+
+  struct guestfs_blockdev_getro_ret ret;
+  ret.ro = r;
+  reply ((xdrproc_t) &xdr_guestfs_blockdev_getro_ret, (char *) &ret);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_blockdev_getro_args, (char *) &args);
+}
+
+static void blockdev_getss_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_blockdev_getss_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_blockdev_getss_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "blockdev_getss");
+    return;
+  }
+  device = args.device;
+
+  r = do_blockdev_getss (device);
+  if (r == -1)
+    /* do_blockdev_getss has already called reply_with_error */
+    goto done;
+
+  struct guestfs_blockdev_getss_ret ret;
+  ret.sectorsize = r;
+  reply ((xdrproc_t) &xdr_guestfs_blockdev_getss_ret, (char *) &ret);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_blockdev_getss_args, (char *) &args);
+}
+
+static void blockdev_getbsz_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_blockdev_getbsz_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_blockdev_getbsz_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "blockdev_getbsz");
+    return;
+  }
+  device = args.device;
+
+  r = do_blockdev_getbsz (device);
+  if (r == -1)
+    /* do_blockdev_getbsz has already called reply_with_error */
+    goto done;
+
+  struct guestfs_blockdev_getbsz_ret ret;
+  ret.blocksize = r;
+  reply ((xdrproc_t) &xdr_guestfs_blockdev_getbsz_ret, (char *) &ret);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_blockdev_getbsz_args, (char *) &args);
+}
+
+static void blockdev_setbsz_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_blockdev_setbsz_args args;
+  char *device;
+  int blocksize;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_blockdev_setbsz_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "blockdev_setbsz");
+    return;
+  }
+  device = args.device;
+  blocksize = args.blocksize;
+
+  r = do_blockdev_setbsz (device, blocksize);
+  if (r == -1)
+    /* do_blockdev_setbsz has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_blockdev_setbsz_args, (char *) &args);
+}
+
+static void blockdev_getsz_stub (XDR *xdr_in)
+{
+  int64_t r;
+  struct guestfs_blockdev_getsz_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_blockdev_getsz_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "blockdev_getsz");
+    return;
+  }
+  device = args.device;
+
+  r = do_blockdev_getsz (device);
+  if (r == -1)
+    /* do_blockdev_getsz has already called reply_with_error */
+    goto done;
+
+  struct guestfs_blockdev_getsz_ret ret;
+  ret.sizeinsectors = r;
+  reply ((xdrproc_t) &xdr_guestfs_blockdev_getsz_ret, (char *) &ret);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_blockdev_getsz_args, (char *) &args);
+}
+
+static void blockdev_getsize64_stub (XDR *xdr_in)
+{
+  int64_t r;
+  struct guestfs_blockdev_getsize64_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_blockdev_getsize64_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "blockdev_getsize64");
+    return;
+  }
+  device = args.device;
+
+  r = do_blockdev_getsize64 (device);
+  if (r == -1)
+    /* do_blockdev_getsize64 has already called reply_with_error */
+    goto done;
+
+  struct guestfs_blockdev_getsize64_ret ret;
+  ret.sizeinbytes = r;
+  reply ((xdrproc_t) &xdr_guestfs_blockdev_getsize64_ret, (char *) &ret);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_blockdev_getsize64_args, (char *) &args);
+}
+
+static void blockdev_flushbufs_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_blockdev_flushbufs_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_blockdev_flushbufs_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "blockdev_flushbufs");
+    return;
+  }
+  device = args.device;
+
+  r = do_blockdev_flushbufs (device);
+  if (r == -1)
+    /* do_blockdev_flushbufs has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_blockdev_flushbufs_args, (char *) &args);
+}
+
+static void blockdev_rereadpt_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_blockdev_rereadpt_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_blockdev_rereadpt_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "blockdev_rereadpt");
+    return;
+  }
+  device = args.device;
+
+  r = do_blockdev_rereadpt (device);
+  if (r == -1)
+    /* do_blockdev_rereadpt has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_blockdev_rereadpt_args, (char *) &args);
+}
+
+static void upload_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_upload_args args;
+  char *remotefilename;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_upload_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "upload");
+    return;
+  }
+  remotefilename = args.remotefilename;
+
+  r = do_upload (remotefilename);
+  if (r == -1)
+    /* do_upload has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_upload_args, (char *) &args);
+}
+
+static void download_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_download_args args;
+  char *remotefilename;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_download_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "download");
+    return;
+  }
+  remotefilename = args.remotefilename;
+
+  r = do_download (remotefilename);
+  if (r == -1)
+    /* do_download has already called reply_with_error */
+    goto done;
+
+  /* do_download has already sent a reply */
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_download_args, (char *) &args);
+}
+
+static void checksum_stub (XDR *xdr_in)
+{
+  char *r;
+  struct guestfs_checksum_args args;
+  char *csumtype;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_checksum_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "checksum");
+    return;
+  }
+  csumtype = args.csumtype;
+  path = args.path;
+
+  r = do_checksum (csumtype, path);
+  if (r == NULL)
+    /* do_checksum has already called reply_with_error */
+    goto done;
+
+  struct guestfs_checksum_ret ret;
+  ret.checksum = r;
+  reply ((xdrproc_t) &xdr_guestfs_checksum_ret, (char *) &ret);
+  free (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_checksum_args, (char *) &args);
+}
+
+static void tar_in_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_tar_in_args args;
+  char *directory;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_tar_in_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "tar_in");
+    return;
+  }
+  directory = args.directory;
+
+  r = do_tar_in (directory);
+  if (r == -1)
+    /* do_tar_in has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_tar_in_args, (char *) &args);
+}
+
+static void tar_out_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_tar_out_args args;
+  char *directory;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_tar_out_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "tar_out");
+    return;
+  }
+  directory = args.directory;
+
+  r = do_tar_out (directory);
+  if (r == -1)
+    /* do_tar_out has already called reply_with_error */
+    goto done;
+
+  /* do_tar_out has already sent a reply */
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_tar_out_args, (char *) &args);
+}
+
+static void tgz_in_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_tgz_in_args args;
+  char *directory;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_tgz_in_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "tgz_in");
+    return;
+  }
+  directory = args.directory;
+
+  r = do_tgz_in (directory);
+  if (r == -1)
+    /* do_tgz_in has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_tgz_in_args, (char *) &args);
+}
+
+static void tgz_out_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_tgz_out_args args;
+  char *directory;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_tgz_out_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "tgz_out");
+    return;
+  }
+  directory = args.directory;
+
+  r = do_tgz_out (directory);
+  if (r == -1)
+    /* do_tgz_out has already called reply_with_error */
+    goto done;
+
+  /* do_tgz_out has already sent a reply */
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_tgz_out_args, (char *) &args);
+}
+
+static void mount_ro_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_mount_ro_args args;
+  char *device;
+  char *mountpoint;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_mount_ro_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "mount_ro");
+    return;
+  }
+  device = args.device;
+  mountpoint = args.mountpoint;
+
+  r = do_mount_ro (device, mountpoint);
+  if (r == -1)
+    /* do_mount_ro has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_mount_ro_args, (char *) &args);
+}
+
+static void mount_options_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_mount_options_args args;
+  char *options;
+  char *device;
+  char *mountpoint;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_mount_options_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "mount_options");
+    return;
+  }
+  options = args.options;
+  device = args.device;
+  mountpoint = args.mountpoint;
+
+  r = do_mount_options (options, device, mountpoint);
+  if (r == -1)
+    /* do_mount_options has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_mount_options_args, (char *) &args);
+}
+
+static void mount_vfs_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_mount_vfs_args args;
+  char *options;
+  char *vfstype;
+  char *device;
+  char *mountpoint;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_mount_vfs_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "mount_vfs");
+    return;
+  }
+  options = args.options;
+  vfstype = args.vfstype;
+  device = args.device;
+  mountpoint = args.mountpoint;
+
+  r = do_mount_vfs (options, vfstype, device, mountpoint);
+  if (r == -1)
+    /* do_mount_vfs has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_mount_vfs_args, (char *) &args);
+}
+
+static void debug_stub (XDR *xdr_in)
+{
+  char *r;
+  struct guestfs_debug_args args;
+  char *subcmd;
+  char **extraargs;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_debug_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "debug");
+    return;
+  }
+  subcmd = args.subcmd;
+  extraargs = realloc (args.extraargs.extraargs_val,
+                sizeof (char *) * (args.extraargs.extraargs_len+1));
+  if (extraargs == NULL) {
+    reply_with_perror ("realloc");
+    goto done;
+  }
+  extraargs[args.extraargs.extraargs_len] = NULL;
+  args.extraargs.extraargs_val = extraargs;
+
+  r = do_debug (subcmd, extraargs);
+  if (r == NULL)
+    /* do_debug has already called reply_with_error */
+    goto done;
+
+  struct guestfs_debug_ret ret;
+  ret.result = r;
+  reply ((xdrproc_t) &xdr_guestfs_debug_ret, (char *) &ret);
+  free (r);
+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;
+  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;
+  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;
+  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);
+}
+
+static void set_e2label_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_set_e2label_args args;
+  char *device;
+  char *label;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_set_e2label_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "set_e2label");
+    return;
+  }
+  device = args.device;
+  label = args.label;
+
+  r = do_set_e2label (device, label);
+  if (r == -1)
+    /* do_set_e2label has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_set_e2label_args, (char *) &args);
+}
+
+static void get_e2label_stub (XDR *xdr_in)
+{
+  char *r;
+  struct guestfs_get_e2label_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_get_e2label_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "get_e2label");
+    return;
+  }
+  device = args.device;
+
+  r = do_get_e2label (device);
+  if (r == NULL)
+    /* do_get_e2label has already called reply_with_error */
+    goto done;
+
+  struct guestfs_get_e2label_ret ret;
+  ret.label = r;
+  reply ((xdrproc_t) &xdr_guestfs_get_e2label_ret, (char *) &ret);
+  free (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_get_e2label_args, (char *) &args);
+}
+
+static void set_e2uuid_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_set_e2uuid_args args;
+  char *device;
+  char *uuid;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_set_e2uuid_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "set_e2uuid");
+    return;
+  }
+  device = args.device;
+  uuid = args.uuid;
+
+  r = do_set_e2uuid (device, uuid);
+  if (r == -1)
+    /* do_set_e2uuid has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_set_e2uuid_args, (char *) &args);
+}
+
+static void get_e2uuid_stub (XDR *xdr_in)
+{
+  char *r;
+  struct guestfs_get_e2uuid_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_get_e2uuid_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "get_e2uuid");
+    return;
+  }
+  device = args.device;
+
+  r = do_get_e2uuid (device);
+  if (r == NULL)
+    /* do_get_e2uuid has already called reply_with_error */
+    goto done;
+
+  struct guestfs_get_e2uuid_ret ret;
+  ret.uuid = r;
+  reply ((xdrproc_t) &xdr_guestfs_get_e2uuid_ret, (char *) &ret);
+  free (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_get_e2uuid_args, (char *) &args);
+}
+
+static void fsck_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_fsck_args args;
+  char *fstype;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_fsck_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "fsck");
+    return;
+  }
+  fstype = args.fstype;
+  device = args.device;
+
+  r = do_fsck (fstype, device);
+  if (r == -1)
+    /* do_fsck has already called reply_with_error */
+    goto done;
+
+  struct guestfs_fsck_ret ret;
+  ret.status = r;
+  reply ((xdrproc_t) &xdr_guestfs_fsck_ret, (char *) &ret);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_fsck_args, (char *) &args);
+}
+
+static void zero_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_zero_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_zero_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "zero");
+    return;
+  }
+  device = args.device;
+
+  r = do_zero (device);
+  if (r == -1)
+    /* do_zero has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_zero_args, (char *) &args);
+}
+
+static void grub_install_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_grub_install_args args;
+  char *root;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_grub_install_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "grub_install");
+    return;
+  }
+  root = args.root;
+  device = args.device;
+
+  r = do_grub_install (root, device);
+  if (r == -1)
+    /* do_grub_install has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_grub_install_args, (char *) &args);
+}
+
+static void cp_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_cp_args args;
+  char *src;
+  char *dest;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_cp_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "cp");
+    return;
+  }
+  src = args.src;
+  dest = args.dest;
+
+  r = do_cp (src, dest);
+  if (r == -1)
+    /* do_cp has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_cp_args, (char *) &args);
+}
+
+static void cp_a_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_cp_a_args args;
+  char *src;
+  char *dest;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_cp_a_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "cp_a");
+    return;
+  }
+  src = args.src;
+  dest = args.dest;
+
+  r = do_cp_a (src, dest);
+  if (r == -1)
+    /* do_cp_a has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_cp_a_args, (char *) &args);
+}
+
+static void mv_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_mv_args args;
+  char *src;
+  char *dest;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_mv_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "mv");
+    return;
+  }
+  src = args.src;
+  dest = args.dest;
+
+  r = do_mv (src, dest);
+  if (r == -1)
+    /* do_mv has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_mv_args, (char *) &args);
+}
+
+static void drop_caches_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_drop_caches_args args;
+  int whattodrop;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_drop_caches_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "drop_caches");
+    return;
+  }
+  whattodrop = args.whattodrop;
+
+  r = do_drop_caches (whattodrop);
+  if (r == -1)
+    /* do_drop_caches has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_drop_caches_args, (char *) &args);
+}
+
+static void dmesg_stub (XDR *xdr_in)
+{
+  char *r;
+
+  r = do_dmesg ();
+  if (r == NULL)
+    /* do_dmesg has already called reply_with_error */
+    goto done;
+
+  struct guestfs_dmesg_ret ret;
+  ret.kmsgs = r;
+  reply ((xdrproc_t) &xdr_guestfs_dmesg_ret, (char *) &ret);
+  free (r);
+done: ;
+}
+
+static void ping_daemon_stub (XDR *xdr_in)
+{
+  int r;
+
+  r = do_ping_daemon ();
+  if (r == -1)
+    /* do_ping_daemon has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done: ;
+}
+
+static void equal_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_equal_args args;
+  char *file1;
+  char *file2;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_equal_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "equal");
+    return;
+  }
+  file1 = args.file1;
+  file2 = args.file2;
+
+  r = do_equal (file1, file2);
+  if (r == -1)
+    /* do_equal has already called reply_with_error */
+    goto done;
+
+  struct guestfs_equal_ret ret;
+  ret.equality = r;
+  reply ((xdrproc_t) &xdr_guestfs_equal_ret, (char *) &ret);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_equal_args, (char *) &args);
+}
+
+static void strings_stub (XDR *xdr_in)
+{
+  char **r;
+  struct guestfs_strings_args args;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_strings_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "strings");
+    return;
+  }
+  path = args.path;
+
+  r = do_strings (path);
+  if (r == NULL)
+    /* do_strings has already called reply_with_error */
+    goto done;
+
+  struct guestfs_strings_ret ret;
+  ret.stringsout.stringsout_len = count_strings (r);
+  ret.stringsout.stringsout_val = r;
+  reply ((xdrproc_t) &xdr_guestfs_strings_ret, (char *) &ret);
+  free_strings (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_strings_args, (char *) &args);
+}
+
+static void strings_e_stub (XDR *xdr_in)
+{
+  char **r;
+  struct guestfs_strings_e_args args;
+  char *encoding;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_strings_e_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "strings_e");
+    return;
+  }
+  encoding = args.encoding;
+  path = args.path;
+
+  r = do_strings_e (encoding, path);
+  if (r == NULL)
+    /* do_strings_e has already called reply_with_error */
+    goto done;
+
+  struct guestfs_strings_e_ret ret;
+  ret.stringsout.stringsout_len = count_strings (r);
+  ret.stringsout.stringsout_val = r;
+  reply ((xdrproc_t) &xdr_guestfs_strings_e_ret, (char *) &ret);
+  free_strings (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_strings_e_args, (char *) &args);
+}
+
+static void hexdump_stub (XDR *xdr_in)
+{
+  char *r;
+  struct guestfs_hexdump_args args;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_hexdump_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "hexdump");
+    return;
+  }
+  path = args.path;
+
+  r = do_hexdump (path);
+  if (r == NULL)
+    /* do_hexdump has already called reply_with_error */
+    goto done;
+
+  struct guestfs_hexdump_ret ret;
+  ret.dump = r;
+  reply ((xdrproc_t) &xdr_guestfs_hexdump_ret, (char *) &ret);
+  free (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_hexdump_args, (char *) &args);
+}
+
+static void zerofree_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_zerofree_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_zerofree_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "zerofree");
+    return;
+  }
+  device = args.device;
+
+  r = do_zerofree (device);
+  if (r == -1)
+    /* do_zerofree has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_zerofree_args, (char *) &args);
+}
+
+static void pvresize_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_pvresize_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_pvresize_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "pvresize");
+    return;
+  }
+  device = args.device;
+
+  r = do_pvresize (device);
+  if (r == -1)
+    /* do_pvresize has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_pvresize_args, (char *) &args);
+}
+
+static void sfdisk_N_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_sfdisk_N_args args;
+  char *device;
+  int partnum;
+  int cyls;
+  int heads;
+  int sectors;
+  char *line;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_sfdisk_N_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "sfdisk_N");
+    return;
+  }
+  device = args.device;
+  partnum = args.partnum;
+  cyls = args.cyls;
+  heads = args.heads;
+  sectors = args.sectors;
+  line = args.line;
+
+  r = do_sfdisk_N (device, partnum, cyls, heads, sectors, line);
+  if (r == -1)
+    /* do_sfdisk_N has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_sfdisk_N_args, (char *) &args);
+}
+
+static void sfdisk_l_stub (XDR *xdr_in)
+{
+  char *r;
+  struct guestfs_sfdisk_l_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_sfdisk_l_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "sfdisk_l");
+    return;
+  }
+  device = args.device;
+
+  r = do_sfdisk_l (device);
+  if (r == NULL)
+    /* do_sfdisk_l has already called reply_with_error */
+    goto done;
+
+  struct guestfs_sfdisk_l_ret ret;
+  ret.partitions = r;
+  reply ((xdrproc_t) &xdr_guestfs_sfdisk_l_ret, (char *) &ret);
+  free (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_sfdisk_l_args, (char *) &args);
+}
+
+static void sfdisk_kernel_geometry_stub (XDR *xdr_in)
+{
+  char *r;
+  struct guestfs_sfdisk_kernel_geometry_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_sfdisk_kernel_geometry_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "sfdisk_kernel_geometry");
+    return;
+  }
+  device = args.device;
+
+  r = do_sfdisk_kernel_geometry (device);
+  if (r == NULL)
+    /* do_sfdisk_kernel_geometry has already called reply_with_error */
+    goto done;
+
+  struct guestfs_sfdisk_kernel_geometry_ret ret;
+  ret.partitions = r;
+  reply ((xdrproc_t) &xdr_guestfs_sfdisk_kernel_geometry_ret, (char *) &ret);
+  free (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_sfdisk_kernel_geometry_args, (char *) &args);
+}
+
+static void sfdisk_disk_geometry_stub (XDR *xdr_in)
+{
+  char *r;
+  struct guestfs_sfdisk_disk_geometry_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_sfdisk_disk_geometry_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "sfdisk_disk_geometry");
+    return;
+  }
+  device = args.device;
+
+  r = do_sfdisk_disk_geometry (device);
+  if (r == NULL)
+    /* do_sfdisk_disk_geometry has already called reply_with_error */
+    goto done;
+
+  struct guestfs_sfdisk_disk_geometry_ret ret;
+  ret.partitions = r;
+  reply ((xdrproc_t) &xdr_guestfs_sfdisk_disk_geometry_ret, (char *) &ret);
+  free (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_sfdisk_disk_geometry_args, (char *) &args);
+}
+
+static void vg_activate_all_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_vg_activate_all_args args;
+  int activate;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_vg_activate_all_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "vg_activate_all");
+    return;
+  }
+  activate = args.activate;
+
+  r = do_vg_activate_all (activate);
+  if (r == -1)
+    /* do_vg_activate_all has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_vg_activate_all_args, (char *) &args);
+}
+
+static void vg_activate_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_vg_activate_args args;
+  int activate;
+  char **volgroups;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_vg_activate_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "vg_activate");
+    return;
+  }
+  activate = args.activate;
+  volgroups = realloc (args.volgroups.volgroups_val,
+                sizeof (char *) * (args.volgroups.volgroups_len+1));
+  if (volgroups == NULL) {
+    reply_with_perror ("realloc");
+    goto done;
+  }
+  volgroups[args.volgroups.volgroups_len] = NULL;
+  args.volgroups.volgroups_val = volgroups;
+
+  r = do_vg_activate (activate, volgroups);
+  if (r == -1)
+    /* do_vg_activate has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+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;
+  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;
+  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);
+}
+
+static void find_stub (XDR *xdr_in)
+{
+  char **r;
+  struct guestfs_find_args args;
+  char *directory;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_find_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "find");
+    return;
+  }
+  directory = args.directory;
+
+  r = do_find (directory);
+  if (r == NULL)
+    /* do_find has already called reply_with_error */
+    goto done;
+
+  struct guestfs_find_ret ret;
+  ret.names.names_len = count_strings (r);
+  ret.names.names_val = r;
+  reply ((xdrproc_t) &xdr_guestfs_find_ret, (char *) &ret);
+  free_strings (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_find_args, (char *) &args);
+}
+
+static void e2fsck_f_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_e2fsck_f_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_e2fsck_f_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "e2fsck_f");
+    return;
+  }
+  device = args.device;
+
+  r = do_e2fsck_f (device);
+  if (r == -1)
+    /* do_e2fsck_f has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_e2fsck_f_args, (char *) &args);
+}
+
+static void sleep_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_sleep_args args;
+  int secs;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_sleep_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "sleep");
+    return;
+  }
+  secs = args.secs;
+
+  r = do_sleep (secs);
+  if (r == -1)
+    /* do_sleep has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_sleep_args, (char *) &args);
+}
+
+static void ntfs_3g_probe_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_ntfs_3g_probe_args args;
+  int rw;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_ntfs_3g_probe_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "ntfs_3g_probe");
+    return;
+  }
+  rw = args.rw;
+  device = args.device;
+
+  r = do_ntfs_3g_probe (rw, device);
+  if (r == -1)
+    /* do_ntfs_3g_probe has already called reply_with_error */
+    goto done;
+
+  struct guestfs_ntfs_3g_probe_ret ret;
+  ret.status = r;
+  reply ((xdrproc_t) &xdr_guestfs_ntfs_3g_probe_ret, (char *) &ret);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_ntfs_3g_probe_args, (char *) &args);
+}
+
+static void sh_stub (XDR *xdr_in)
+{
+  char *r;
+  struct guestfs_sh_args args;
+  char *command;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_sh_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "sh");
+    return;
+  }
+  command = args.command;
+
+  r = do_sh (command);
+  if (r == NULL)
+    /* do_sh has already called reply_with_error */
+    goto done;
+
+  struct guestfs_sh_ret ret;
+  ret.output = r;
+  reply ((xdrproc_t) &xdr_guestfs_sh_ret, (char *) &ret);
+  free (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_sh_args, (char *) &args);
+}
+
+static void sh_lines_stub (XDR *xdr_in)
+{
+  char **r;
+  struct guestfs_sh_lines_args args;
+  char *command;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_sh_lines_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "sh_lines");
+    return;
+  }
+  command = args.command;
+
+  r = do_sh_lines (command);
+  if (r == NULL)
+    /* do_sh_lines has already called reply_with_error */
+    goto done;
+
+  struct guestfs_sh_lines_ret ret;
+  ret.lines.lines_len = count_strings (r);
+  ret.lines.lines_val = r;
+  reply ((xdrproc_t) &xdr_guestfs_sh_lines_ret, (char *) &ret);
+  free_strings (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_sh_lines_args, (char *) &args);
+}
+
+static void glob_expand_stub (XDR *xdr_in)
+{
+  char **r;
+  struct guestfs_glob_expand_args args;
+  char *pattern;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_glob_expand_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "glob_expand");
+    return;
+  }
+  pattern = args.pattern;
+
+  r = do_glob_expand (pattern);
+  if (r == NULL)
+    /* do_glob_expand has already called reply_with_error */
+    goto done;
+
+  struct guestfs_glob_expand_ret ret;
+  ret.paths.paths_len = count_strings (r);
+  ret.paths.paths_val = r;
+  reply ((xdrproc_t) &xdr_guestfs_glob_expand_ret, (char *) &ret);
+  free_strings (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_glob_expand_args, (char *) &args);
+}
+
+static void scrub_device_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_scrub_device_args args;
+  char *device;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_scrub_device_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "scrub_device");
+    return;
+  }
+  device = args.device;
+
+  r = do_scrub_device (device);
+  if (r == -1)
+    /* do_scrub_device has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_scrub_device_args, (char *) &args);
+}
+
+static void scrub_file_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_scrub_file_args args;
+  char *file;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_scrub_file_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "scrub_file");
+    return;
+  }
+  file = args.file;
+
+  r = do_scrub_file (file);
+  if (r == -1)
+    /* do_scrub_file has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_scrub_file_args, (char *) &args);
+}
+
+static void scrub_freespace_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_scrub_freespace_args args;
+  char *dir;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_scrub_freespace_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "scrub_freespace");
+    return;
+  }
+  dir = args.dir;
+
+  r = do_scrub_freespace (dir);
+  if (r == -1)
+    /* do_scrub_freespace has already called reply_with_error */
+    goto done;
+
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_scrub_freespace_args, (char *) &args);
+}
+
+static void mkdtemp_stub (XDR *xdr_in)
+{
+  char *r;
+  struct guestfs_mkdtemp_args args;
+  char *template;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_mkdtemp_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "mkdtemp");
+    return;
+  }
+  template = args.template;
+
+  r = do_mkdtemp (template);
+  if (r == NULL)
+    /* do_mkdtemp has already called reply_with_error */
+    goto done;
+
+  struct guestfs_mkdtemp_ret ret;
+  ret.dir = r;
+  reply ((xdrproc_t) &xdr_guestfs_mkdtemp_ret, (char *) &ret);
+  free (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_mkdtemp_args, (char *) &args);
+}
+
+static void wc_l_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_wc_l_args args;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_wc_l_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "wc_l");
+    return;
+  }
+  path = args.path;
+
+  r = do_wc_l (path);
+  if (r == -1)
+    /* do_wc_l has already called reply_with_error */
+    goto done;
+
+  struct guestfs_wc_l_ret ret;
+  ret.lines = r;
+  reply ((xdrproc_t) &xdr_guestfs_wc_l_ret, (char *) &ret);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_wc_l_args, (char *) &args);
+}
+
+static void wc_w_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_wc_w_args args;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_wc_w_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "wc_w");
+    return;
+  }
+  path = args.path;
+
+  r = do_wc_w (path);
+  if (r == -1)
+    /* do_wc_w has already called reply_with_error */
+    goto done;
+
+  struct guestfs_wc_w_ret ret;
+  ret.words = r;
+  reply ((xdrproc_t) &xdr_guestfs_wc_w_ret, (char *) &ret);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_wc_w_args, (char *) &args);
+}
+
+static void wc_c_stub (XDR *xdr_in)
+{
+  int r;
+  struct guestfs_wc_c_args args;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_wc_c_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "wc_c");
+    return;
+  }
+  path = args.path;
+
+  r = do_wc_c (path);
+  if (r == -1)
+    /* do_wc_c has already called reply_with_error */
+    goto done;
+
+  struct guestfs_wc_c_ret ret;
+  ret.chars = r;
+  reply ((xdrproc_t) &xdr_guestfs_wc_c_ret, (char *) &ret);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_wc_c_args, (char *) &args);
+}
+
+static void head_stub (XDR *xdr_in)
+{
+  char **r;
+  struct guestfs_head_args args;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_head_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "head");
+    return;
+  }
+  path = args.path;
+
+  r = do_head (path);
+  if (r == NULL)
+    /* do_head has already called reply_with_error */
+    goto done;
+
+  struct guestfs_head_ret ret;
+  ret.lines.lines_len = count_strings (r);
+  ret.lines.lines_val = r;
+  reply ((xdrproc_t) &xdr_guestfs_head_ret, (char *) &ret);
+  free_strings (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_head_args, (char *) &args);
+}
+
+static void head_n_stub (XDR *xdr_in)
+{
+  char **r;
+  struct guestfs_head_n_args args;
+  int nrlines;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_head_n_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "head_n");
+    return;
+  }
+  nrlines = args.nrlines;
+  path = args.path;
+
+  r = do_head_n (nrlines, path);
+  if (r == NULL)
+    /* do_head_n has already called reply_with_error */
+    goto done;
+
+  struct guestfs_head_n_ret ret;
+  ret.lines.lines_len = count_strings (r);
+  ret.lines.lines_val = r;
+  reply ((xdrproc_t) &xdr_guestfs_head_n_ret, (char *) &ret);
+  free_strings (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_head_n_args, (char *) &args);
+}
+
+static void tail_stub (XDR *xdr_in)
+{
+  char **r;
+  struct guestfs_tail_args args;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_tail_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "tail");
+    return;
+  }
+  path = args.path;
+
+  r = do_tail (path);
+  if (r == NULL)
+    /* do_tail has already called reply_with_error */
+    goto done;
+
+  struct guestfs_tail_ret ret;
+  ret.lines.lines_len = count_strings (r);
+  ret.lines.lines_val = r;
+  reply ((xdrproc_t) &xdr_guestfs_tail_ret, (char *) &ret);
+  free_strings (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_tail_args, (char *) &args);
+}
+
+static void tail_n_stub (XDR *xdr_in)
+{
+  char **r;
+  struct guestfs_tail_n_args args;
+  int nrlines;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_tail_n_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "tail_n");
+    return;
+  }
+  nrlines = args.nrlines;
+  path = args.path;
+
+  r = do_tail_n (nrlines, path);
+  if (r == NULL)
+    /* do_tail_n has already called reply_with_error */
+    goto done;
+
+  struct guestfs_tail_n_ret ret;
+  ret.lines.lines_len = count_strings (r);
+  ret.lines.lines_val = r;
+  reply ((xdrproc_t) &xdr_guestfs_tail_n_ret, (char *) &ret);
+  free_strings (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_tail_n_args, (char *) &args);
+}
+
+static void df_stub (XDR *xdr_in)
+{
+  char *r;
 
-  r = do_vgcreate (volgroup, physvols);
+  r = do_df ();
+  if (r == NULL)
+    /* do_df has already called reply_with_error */
+    goto done;
+
+  struct guestfs_df_ret ret;
+  ret.output = r;
+  reply ((xdrproc_t) &xdr_guestfs_df_ret, (char *) &ret);
+  free (r);
+done: ;
+}
+
+static void df_h_stub (XDR *xdr_in)
+{
+  char *r;
+
+  r = do_df_h ();
+  if (r == NULL)
+    /* do_df_h has already called reply_with_error */
+    goto done;
+
+  struct guestfs_df_h_ret ret;
+  ret.output = r;
+  reply ((xdrproc_t) &xdr_guestfs_df_h_ret, (char *) &ret);
+  free (r);
+done: ;
+}
+
+static void du_stub (XDR *xdr_in)
+{
+  int64_t r;
+  struct guestfs_du_args args;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_du_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "du");
+    return;
+  }
+  path = args.path;
+
+  r = do_du (path);
   if (r == -1)
-    /* do_vgcreate has already called reply_with_error */
+    /* do_du has already called reply_with_error */
     goto done;
 
-  reply (NULL, NULL);
+  struct guestfs_du_ret ret;
+  ret.sizekb = r;
+  reply ((xdrproc_t) &xdr_guestfs_du_ret, (char *) &ret);
 done:
-  xdr_free ((xdrproc_t) xdr_guestfs_vgcreate_args, (char *) &args);
+  xdr_free ((xdrproc_t) xdr_guestfs_du_args, (char *) &args);
 }
 
-static void lvcreate_stub (XDR *xdr_in)
+static void initrd_list_stub (XDR *xdr_in)
+{
+  char **r;
+  struct guestfs_initrd_list_args args;
+  char *path;
+
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_initrd_list_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "initrd_list");
+    return;
+  }
+  path = args.path;
+
+  r = do_initrd_list (path);
+  if (r == NULL)
+    /* do_initrd_list has already called reply_with_error */
+    goto done;
+
+  struct guestfs_initrd_list_ret ret;
+  ret.filenames.filenames_len = count_strings (r);
+  ret.filenames.filenames_val = r;
+  reply ((xdrproc_t) &xdr_guestfs_initrd_list_ret, (char *) &ret);
+  free_strings (r);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_initrd_list_args, (char *) &args);
+}
+
+static void mount_loop_stub (XDR *xdr_in)
 {
   int r;
-  struct guestfs_lvcreate_args args;
-  const char *logvol;
-  const char *volgroup;
-  int mbytes;
+  struct guestfs_mount_loop_args args;
+  char *file;
+  char *mountpoint;
 
   memset (&args, 0, sizeof args);
 
-  if (!xdr_guestfs_lvcreate_args (xdr_in, &args)) {
-    reply_with_error ("%s: daemon failed to decode procedure arguments", "lvcreate");
+  if (!xdr_guestfs_mount_loop_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "mount_loop");
     return;
   }
-  logvol = args.logvol;
-  volgroup = args.volgroup;
-  mbytes = args.mbytes;
+  file = args.file;
+  mountpoint = args.mountpoint;
 
-  r = do_lvcreate (logvol, volgroup, mbytes);
+  r = do_mount_loop (file, mountpoint);
   if (r == -1)
-    /* do_lvcreate has already called reply_with_error */
+    /* do_mount_loop has already called reply_with_error */
     goto done;
 
   reply (NULL, NULL);
 done:
-  xdr_free ((xdrproc_t) xdr_guestfs_lvcreate_args, (char *) &args);
+  xdr_free ((xdrproc_t) xdr_guestfs_mount_loop_args, (char *) &args);
 }
 
-static void mkfs_stub (XDR *xdr_in)
+static void mkswap_stub (XDR *xdr_in)
 {
   int r;
-  struct guestfs_mkfs_args args;
-  const char *fstype;
-  const char *device;
+  struct guestfs_mkswap_args args;
+  char *device;
 
   memset (&args, 0, sizeof args);
 
-  if (!xdr_guestfs_mkfs_args (xdr_in, &args)) {
-    reply_with_error ("%s: daemon failed to decode procedure arguments", "mkfs");
+  if (!xdr_guestfs_mkswap_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "mkswap");
     return;
   }
-  fstype = args.fstype;
   device = args.device;
 
-  r = do_mkfs (fstype, device);
+  r = do_mkswap (device);
   if (r == -1)
-    /* do_mkfs has already called reply_with_error */
+    /* do_mkswap has already called reply_with_error */
     goto done;
 
   reply (NULL, NULL);
 done:
-  xdr_free ((xdrproc_t) xdr_guestfs_mkfs_args, (char *) &args);
+  xdr_free ((xdrproc_t) xdr_guestfs_mkswap_args, (char *) &args);
 }
 
-static void sfdisk_stub (XDR *xdr_in)
+static void mkswap_L_stub (XDR *xdr_in)
 {
   int r;
-  struct guestfs_sfdisk_args args;
-  const char *device;
-  int cyls;
-  int heads;
-  int sectors;
-  char **lines;
+  struct guestfs_mkswap_L_args args;
+  char *label;
+  char *device;
 
   memset (&args, 0, sizeof args);
 
-  if (!xdr_guestfs_sfdisk_args (xdr_in, &args)) {
-    reply_with_error ("%s: daemon failed to decode procedure arguments", "sfdisk");
+  if (!xdr_guestfs_mkswap_L_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "mkswap_L");
     return;
   }
+  label = args.label;
   device = args.device;
-  cyls = args.cyls;
-  heads = args.heads;
-  sectors = args.sectors;
-  args.lines.lines_val = realloc (args.lines.lines_val, sizeof (char *) * (args.lines.lines_len+1));
-  args.lines.lines_val[args.lines.lines_len] = NULL;
-  lines = args.lines.lines_val;
 
-  r = do_sfdisk (device, cyls, heads, sectors, lines);
+  r = do_mkswap_L (label, device);
   if (r == -1)
-    /* do_sfdisk has already called reply_with_error */
+    /* do_mkswap_L has already called reply_with_error */
     goto done;
 
   reply (NULL, NULL);
 done:
-  xdr_free ((xdrproc_t) xdr_guestfs_sfdisk_args, (char *) &args);
+  xdr_free ((xdrproc_t) xdr_guestfs_mkswap_L_args, (char *) &args);
 }
 
-static void write_file_stub (XDR *xdr_in)
+static void mkswap_U_stub (XDR *xdr_in)
 {
   int r;
-  struct guestfs_write_file_args args;
-  const char *path;
-  const char *content;
-  int size;
+  struct guestfs_mkswap_U_args args;
+  char *uuid;
+  char *device;
 
   memset (&args, 0, sizeof args);
 
-  if (!xdr_guestfs_write_file_args (xdr_in, &args)) {
-    reply_with_error ("%s: daemon failed to decode procedure arguments", "write_file");
+  if (!xdr_guestfs_mkswap_U_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "mkswap_U");
     return;
   }
-  path = args.path;
-  content = args.content;
-  size = args.size;
+  uuid = args.uuid;
+  device = args.device;
 
-  r = do_write_file (path, content, size);
+  r = do_mkswap_U (uuid, device);
   if (r == -1)
-    /* do_write_file has already called reply_with_error */
+    /* do_mkswap_U has already called reply_with_error */
     goto done;
 
   reply (NULL, NULL);
 done:
-  xdr_free ((xdrproc_t) xdr_guestfs_write_file_args, (char *) &args);
+  xdr_free ((xdrproc_t) xdr_guestfs_mkswap_U_args, (char *) &args);
 }
 
-static void umount_stub (XDR *xdr_in)
+static void mknod_stub (XDR *xdr_in)
 {
   int r;
-  struct guestfs_umount_args args;
-  const char *pathordevice;
+  struct guestfs_mknod_args args;
+  int mode;
+  int devmajor;
+  int devminor;
+  char *path;
 
   memset (&args, 0, sizeof args);
 
-  if (!xdr_guestfs_umount_args (xdr_in, &args)) {
-    reply_with_error ("%s: daemon failed to decode procedure arguments", "umount");
+  if (!xdr_guestfs_mknod_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "mknod");
     return;
   }
-  pathordevice = args.pathordevice;
+  mode = args.mode;
+  devmajor = args.devmajor;
+  devminor = args.devminor;
+  path = args.path;
 
-  r = do_umount (pathordevice);
+  r = do_mknod (mode, devmajor, devminor, path);
   if (r == -1)
-    /* do_umount has already called reply_with_error */
+    /* do_mknod has already called reply_with_error */
     goto done;
 
   reply (NULL, NULL);
 done:
-  xdr_free ((xdrproc_t) xdr_guestfs_umount_args, (char *) &args);
+  xdr_free ((xdrproc_t) xdr_guestfs_mknod_args, (char *) &args);
 }
 
-static void mounts_stub (XDR *xdr_in)
+static void mkfifo_stub (XDR *xdr_in)
 {
-  char **r;
+  int r;
+  struct guestfs_mkfifo_args args;
+  int mode;
+  char *path;
 
-  r = do_mounts ();
-  if (r == NULL)
-    /* do_mounts has already called reply_with_error */
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_mkfifo_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "mkfifo");
+    return;
+  }
+  mode = args.mode;
+  path = args.path;
+
+  r = do_mkfifo (mode, path);
+  if (r == -1)
+    /* do_mkfifo has already called reply_with_error */
     goto done;
 
-  struct guestfs_mounts_ret ret;
-  ret.devices.devices_len = count_strings (r);
-  ret.devices.devices_val = r;
-  reply ((xdrproc_t) &xdr_guestfs_mounts_ret, (char *) &ret);
-  free_strings (r);
-done: ;
+  reply (NULL, NULL);
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_mkfifo_args, (char *) &args);
 }
 
-static void umount_all_stub (XDR *xdr_in)
+static void mknod_b_stub (XDR *xdr_in)
 {
   int r;
+  struct guestfs_mknod_b_args args;
+  int mode;
+  int devmajor;
+  int devminor;
+  char *path;
 
-  r = do_umount_all ();
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_mknod_b_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "mknod_b");
+    return;
+  }
+  mode = args.mode;
+  devmajor = args.devmajor;
+  devminor = args.devminor;
+  path = args.path;
+
+  r = do_mknod_b (mode, devmajor, devminor, path);
   if (r == -1)
-    /* do_umount_all has already called reply_with_error */
+    /* do_mknod_b has already called reply_with_error */
     goto done;
 
   reply (NULL, NULL);
-done: ;
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_mknod_b_args, (char *) &args);
 }
 
-static void lvm_remove_all_stub (XDR *xdr_in)
+static void mknod_c_stub (XDR *xdr_in)
 {
   int r;
+  struct guestfs_mknod_c_args args;
+  int mode;
+  int devmajor;
+  int devminor;
+  char *path;
 
-  r = do_lvm_remove_all ();
+  memset (&args, 0, sizeof args);
+
+  if (!xdr_guestfs_mknod_c_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "mknod_c");
+    return;
+  }
+  mode = args.mode;
+  devmajor = args.devmajor;
+  devminor = args.devminor;
+  path = args.path;
+
+  r = do_mknod_c (mode, devmajor, devminor, path);
   if (r == -1)
-    /* do_lvm_remove_all has already called reply_with_error */
+    /* do_mknod_c has already called reply_with_error */
     goto done;
 
   reply (NULL, NULL);
-done: ;
+done:
+  xdr_free ((xdrproc_t) xdr_guestfs_mknod_c_args, (char *) &args);
 }
 
-static void file_stub (XDR *xdr_in)
+static void umask_stub (XDR *xdr_in)
 {
-  char *r;
-  struct guestfs_file_args args;
-  const char *path;
+  int r;
+  struct guestfs_umask_args args;
+  int mask;
 
   memset (&args, 0, sizeof args);
 
-  if (!xdr_guestfs_file_args (xdr_in, &args)) {
-    reply_with_error ("%s: daemon failed to decode procedure arguments", "file");
+  if (!xdr_guestfs_umask_args (xdr_in, &args)) {
+    reply_with_error ("%s: daemon failed to decode procedure arguments", "umask");
     return;
   }
-  path = args.path;
+  mask = args.mask;
 
-  r = do_file (path);
-  if (r == NULL)
-    /* do_file has already called reply_with_error */
+  r = do_umask (mask);
+  if (r == -1)
+    /* do_umask has already called reply_with_error */
     goto done;
 
-  struct guestfs_file_ret ret;
-  ret.description = r;
-  reply ((xdrproc_t) &xdr_guestfs_file_ret, (char *) &ret);
-  free (r);
+  struct guestfs_umask_ret ret;
+  ret.oldmask = r;
+  reply ((xdrproc_t) &xdr_guestfs_umask_ret, (char *) &ret);
 done:
-  xdr_free ((xdrproc_t) xdr_guestfs_file_args, (char *) &args);
+  xdr_free ((xdrproc_t) xdr_guestfs_umask_args, (char *) &args);
 }
 
 void dispatch_incoming_message (XDR *xdr_in)
@@ -1314,8 +3627,272 @@ void dispatch_incoming_message (XDR *xdr_in)
     case GUESTFS_PROC_FILE:
       file_stub (xdr_in);
       break;
+    case GUESTFS_PROC_COMMAND:
+      command_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_COMMAND_LINES:
+      command_lines_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_STAT:
+      stat_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_LSTAT:
+      lstat_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_STATVFS:
+      statvfs_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_TUNE2FS_L:
+      tune2fs_l_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_BLOCKDEV_SETRO:
+      blockdev_setro_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_BLOCKDEV_SETRW:
+      blockdev_setrw_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_BLOCKDEV_GETRO:
+      blockdev_getro_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_BLOCKDEV_GETSS:
+      blockdev_getss_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_BLOCKDEV_GETBSZ:
+      blockdev_getbsz_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_BLOCKDEV_SETBSZ:
+      blockdev_setbsz_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_BLOCKDEV_GETSZ:
+      blockdev_getsz_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_BLOCKDEV_GETSIZE64:
+      blockdev_getsize64_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_BLOCKDEV_FLUSHBUFS:
+      blockdev_flushbufs_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_BLOCKDEV_REREADPT:
+      blockdev_rereadpt_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_UPLOAD:
+      upload_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_DOWNLOAD:
+      download_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_CHECKSUM:
+      checksum_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_TAR_IN:
+      tar_in_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_TAR_OUT:
+      tar_out_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_TGZ_IN:
+      tgz_in_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_TGZ_OUT:
+      tgz_out_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_MOUNT_RO:
+      mount_ro_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_MOUNT_OPTIONS:
+      mount_options_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_MOUNT_VFS:
+      mount_vfs_stub (xdr_in);
+      break;
+    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;
+    case GUESTFS_PROC_SET_E2LABEL:
+      set_e2label_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_GET_E2LABEL:
+      get_e2label_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_SET_E2UUID:
+      set_e2uuid_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_GET_E2UUID:
+      get_e2uuid_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_FSCK:
+      fsck_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_ZERO:
+      zero_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_GRUB_INSTALL:
+      grub_install_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_CP:
+      cp_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_CP_A:
+      cp_a_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_MV:
+      mv_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_DROP_CACHES:
+      drop_caches_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_DMESG:
+      dmesg_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_PING_DAEMON:
+      ping_daemon_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_EQUAL:
+      equal_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_STRINGS:
+      strings_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_STRINGS_E:
+      strings_e_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_HEXDUMP:
+      hexdump_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_ZEROFREE:
+      zerofree_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_PVRESIZE:
+      pvresize_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_SFDISK_N:
+      sfdisk_N_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_SFDISK_L:
+      sfdisk_l_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_SFDISK_KERNEL_GEOMETRY:
+      sfdisk_kernel_geometry_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_SFDISK_DISK_GEOMETRY:
+      sfdisk_disk_geometry_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_VG_ACTIVATE_ALL:
+      vg_activate_all_stub (xdr_in);
+      break;
+    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;
+    case GUESTFS_PROC_FIND:
+      find_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_E2FSCK_F:
+      e2fsck_f_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_SLEEP:
+      sleep_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_NTFS_3G_PROBE:
+      ntfs_3g_probe_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_SH:
+      sh_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_SH_LINES:
+      sh_lines_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_GLOB_EXPAND:
+      glob_expand_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_SCRUB_DEVICE:
+      scrub_device_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_SCRUB_FILE:
+      scrub_file_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_SCRUB_FREESPACE:
+      scrub_freespace_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_MKDTEMP:
+      mkdtemp_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_WC_L:
+      wc_l_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_WC_W:
+      wc_w_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_WC_C:
+      wc_c_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_HEAD:
+      head_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_HEAD_N:
+      head_n_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_TAIL:
+      tail_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_TAIL_N:
+      tail_n_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_DF:
+      df_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_DF_H:
+      df_h_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_DU:
+      du_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_INITRD_LIST:
+      initrd_list_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_MOUNT_LOOP:
+      mount_loop_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_MKSWAP:
+      mkswap_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_MKSWAP_L:
+      mkswap_L_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_MKSWAP_U:
+      mkswap_U_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_MKNOD:
+      mknod_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_MKFIFO:
+      mkfifo_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_MKNOD_B:
+      mknod_b_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_MKNOD_C:
+      mknod_c_stub (xdr_in);
+      break;
+    case GUESTFS_PROC_UMASK:
+      umask_stub (xdr_in);
+      break;
     default:
-      reply_with_error ("dispatch_incoming_message: unknown procedure number %d", proc_nr);
+      reply_with_error ("dispatch_incoming_message: unknown procedure number %d, set LIBGUESTFS_PATH to point to the matching libguestfs appliance directory", proc_nr);
   }
 }
 
@@ -1543,6 +4120,7 @@ parse_command_line_pvs (void)
     reply_with_error ("%s", err);
     free (out);
     free (err);
+    free (ret);
     return NULL;
   }
 
@@ -1882,6 +4460,7 @@ parse_command_line_vgs (void)
     reply_with_error ("%s", err);
     free (out);
     free (err);
+    free (ret);
     return NULL;
   }
 
@@ -2191,6 +4770,7 @@ parse_command_line_lvs (void)
     reply_with_error ("%s", err);
     free (out);
     free (err);
+    free (ret);
     return NULL;
   }