summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-06-29 15:18:17 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-06-29 15:19:10 +0100
commitc6d6f5ae1b76ec9aa5c540906aeed73d25d13eb9 (patch)
tree3f090396c5b90e0829c3ab25f8c3d8275726a46e /daemon
parent4dff42aa13dd726fb6b02843d0f4db4b4b330fe3 (diff)
downloadlibguestfs-c6d6f5ae1b76ec9aa5c540906aeed73d25d13eb9.tar.gz
libguestfs-c6d6f5ae1b76ec9aa5c540906aeed73d25d13eb9.tar.xz
libguestfs-c6d6f5ae1b76ec9aa5c540906aeed73d25d13eb9.zip
Generated code for 'initrd-list'.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/actions.h1
-rw-r--r--daemon/stubs.c31
2 files changed, 32 insertions, 0 deletions
diff --git a/daemon/actions.h b/daemon/actions.h
index 7d87b677..8c3c5fe0 100644
--- a/daemon/actions.h
+++ b/daemon/actions.h
@@ -148,3 +148,4 @@ extern char **do_tail_n (int nrlines, char *path);
extern char *do_df (void);
extern char *do_df_h (void);
extern int64_t do_du (char *path);
+extern char **do_initrd_list (char *path);
diff --git a/daemon/stubs.c b/daemon/stubs.c
index 67e6ef5b..294d9e68 100644
--- a/daemon/stubs.c
+++ b/daemon/stubs.c
@@ -3205,6 +3205,34 @@ done:
xdr_free ((xdrproc_t) xdr_guestfs_du_args, (char *) &args);
}
+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);
+}
+
void dispatch_incoming_message (XDR *xdr_in)
{
switch (proc_nr) {
@@ -3589,6 +3617,9 @@ void dispatch_incoming_message (XDR *xdr_in)
case GUESTFS_PROC_DU:
du_stub (xdr_in);
break;
+ case GUESTFS_PROC_INITRD_LIST:
+ initrd_list_stub (xdr_in);
+ break;
default:
reply_with_error ("dispatch_incoming_message: unknown procedure number %d, set LIBGUESTFS_PATH to point to the matching libguestfs appliance directory", proc_nr);
}