+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_aug_ls_args, (char *) &args);
+}
+
+static void rm_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_rm_args args;
+ const char *path;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_rm_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "rm");
+ return;
+ }
+ path = args.path;
+
+ r = do_rm (path);
+ if (r == -1)
+ /* do_rm has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_rm_args, (char *) &args);
+}
+
+static void rmdir_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_rmdir_args args;
+ const char *path;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_rmdir_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "rmdir");
+ return;
+ }
+ path = args.path;
+
+ r = do_rmdir (path);
+ if (r == -1)
+ /* do_rmdir has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_rmdir_args, (char *) &args);
+}
+
+static void rm_rf_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_rm_rf_args args;
+ const char *path;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_rm_rf_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "rm_rf");
+ return;
+ }
+ path = args.path;
+
+ r = do_rm_rf (path);
+ if (r == -1)
+ /* do_rm_rf has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_rm_rf_args, (char *) &args);
+}
+
+static void mkdir_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_mkdir_args args;
+ const char *path;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_mkdir_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "mkdir");
+ return;
+ }
+ path = args.path;
+
+ r = do_mkdir (path);
+ if (r == -1)
+ /* do_mkdir has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_mkdir_args, (char *) &args);
+}
+
+static void mkdir_p_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_mkdir_p_args args;
+ const char *path;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_mkdir_p_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "mkdir_p");
+ return;
+ }
+ path = args.path;
+
+ r = do_mkdir_p (path);
+ if (r == -1)
+ /* do_mkdir_p has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_mkdir_p_args, (char *) &args);
+}
+
+static void chmod_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_chmod_args args;
+ int mode;
+ const char *path;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_chmod_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "chmod");
+ return;
+ }
+ mode = args.mode;
+ path = args.path;
+
+ r = do_chmod (mode, path);
+ if (r == -1)
+ /* do_chmod has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_chmod_args, (char *) &args);
+}
+
+static void chown_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_chown_args args;
+ int owner;
+ int group;
+ const char *path;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_chown_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "chown");
+ return;
+ }
+ owner = args.owner;
+ group = args.group;
+ path = args.path;
+
+ r = do_chown (owner, group, path);
+ if (r == -1)
+ /* 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: ;