+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);
+}
+