+ /* do_chown has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_chown_args, (char *) &args);
+}
+
+static void exists_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_exists_args args;
+ const char *path;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_exists_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "exists");
+ return;
+ }
+ path = args.path;
+
+ r = do_exists (path);
+ if (r == -1)
+ /* do_exists has already called reply_with_error */
+ goto done;
+
+ struct guestfs_exists_ret ret;
+ ret.existsflag = r;
+ reply ((xdrproc_t) &xdr_guestfs_exists_ret, (char *) &ret);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_exists_args, (char *) &args);
+}
+
+static void is_file_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_is_file_args args;
+ const char *path;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_is_file_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "is_file");
+ return;
+ }
+ path = args.path;
+
+ r = do_is_file (path);
+ if (r == -1)
+ /* do_is_file has already called reply_with_error */
+ goto done;
+
+ struct guestfs_is_file_ret ret;
+ ret.fileflag = r;
+ reply ((xdrproc_t) &xdr_guestfs_is_file_ret, (char *) &ret);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_is_file_args, (char *) &args);
+}
+
+static void is_dir_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_is_dir_args args;
+ const char *path;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_is_dir_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "is_dir");
+ return;
+ }
+ path = args.path;
+
+ r = do_is_dir (path);
+ if (r == -1)
+ /* do_is_dir has already called reply_with_error */
+ goto done;
+
+ struct guestfs_is_dir_ret ret;
+ ret.dirflag = r;
+ reply ((xdrproc_t) &xdr_guestfs_is_dir_ret, (char *) &ret);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_is_dir_args, (char *) &args);
+}
+
+static void pvcreate_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_pvcreate_args args;
+ const char *device;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_pvcreate_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "pvcreate");
+ return;
+ }
+ device = args.device;
+
+ r = do_pvcreate (device);
+ if (r == -1)
+ /* do_pvcreate has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_pvcreate_args, (char *) &args);
+}
+
+static void vgcreate_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_vgcreate_args args;
+ const char *volgroup;
+ char **physvols;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_vgcreate_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "vgcreate");
+ 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;
+
+ 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;
+ const char *logvol;
+ const 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;
+ const char *fstype;
+ const 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;
+ const 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;
+ 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);
+ 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;
+ const char *path;
+ const 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;
+ const 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;
+ const 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;
+ }
+ args.arguments.arguments_val = realloc (args.arguments.arguments_val, sizeof (char *) * (args.arguments.arguments_len+1));
+ args.arguments.arguments_val[args.arguments.arguments_len] = NULL;
+ arguments = args.arguments.arguments_val;
+
+ 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;
+ }
+ args.arguments.arguments_val = realloc (args.arguments.arguments_val, sizeof (char *) * (args.arguments.arguments_len+1));
+ args.arguments.arguments_val[args.arguments.arguments_len] = NULL;
+ arguments = args.arguments.arguments_val;
+
+ 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;
+ const 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;
+ const 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;
+ const 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;
+ const 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;
+ const 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;
+ const 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");