diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-15 13:59:07 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-15 13:59:07 +0100 |
commit | ad5abc8d367c9c410051062cae066b1b141b4c76 (patch) | |
tree | 9b22bc0900d83ac5a79a8bed7c3283f2fc742536 /daemon | |
parent | d5ae4a54e83018687ec05255bc39e7f5ab71a453 (diff) | |
download | libguestfs-ad5abc8d367c9c410051062cae066b1b141b4c76.tar.gz libguestfs-ad5abc8d367c9c410051062cae066b1b141b4c76.tar.xz libguestfs-ad5abc8d367c9c410051062cae066b1b141b4c76.zip |
Generated code for tune2fs-l command and RHashtable return type.
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/actions.h | 1 | ||||
-rw-r--r-- | daemon/stubs.c | 31 |
2 files changed, 32 insertions, 0 deletions
diff --git a/daemon/actions.h b/daemon/actions.h index c0f41ce1..53f3b79e 100644 --- a/daemon/actions.h +++ b/daemon/actions.h @@ -75,3 +75,4 @@ extern char **do_command_lines (char * const* const arguments); extern guestfs_int_stat *do_stat (const char *path); extern guestfs_int_stat *do_lstat (const char *path); extern guestfs_int_statvfs *do_statvfs (const char *path); +extern char **do_tune2fs_l (const char *device); diff --git a/daemon/stubs.c b/daemon/stubs.c index 9662de80..a6175cbd 100644 --- a/daemon/stubs.c +++ b/daemon/stubs.c @@ -1304,6 +1304,34 @@ 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); +} + void dispatch_incoming_message (XDR *xdr_in) { switch (proc_nr) { @@ -1469,6 +1497,9 @@ void dispatch_incoming_message (XDR *xdr_in) case GUESTFS_PROC_STATVFS: statvfs_stub (xdr_in); break; + case GUESTFS_PROC_TUNE2FS_L: + tune2fs_l_stub (xdr_in); + break; default: reply_with_error ("dispatch_incoming_message: unknown procedure number %d", proc_nr); } |