diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-06-22 08:20:42 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-06-22 08:20:42 +0100 |
commit | ad8a256f54a6cb99f89bb444c8597a152a793dce (patch) | |
tree | f82b1ef05fe745c9cb2ec93275b9d0909f1a882e /daemon | |
parent | 05c34c1c1479bb07b31cfbf912743a8cf014a636 (diff) | |
download | libguestfs-ad8a256f54a6cb99f89bb444c8597a152a793dce.tar.gz libguestfs-ad8a256f54a6cb99f89bb444c8597a152a793dce.tar.xz libguestfs-ad8a256f54a6cb99f89bb444c8597a152a793dce.zip |
Generated code for 'glob-expand'.
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 a76498f3..cc8bc787 100644 --- a/daemon/actions.h +++ b/daemon/actions.h @@ -133,3 +133,4 @@ extern int do_sleep (int secs); extern int do_ntfs_3g_probe (int rw, char *device); extern char *do_sh (char *command); extern char **do_sh_lines (char *command); +extern char **do_glob_expand (char *pattern); diff --git a/daemon/stubs.c b/daemon/stubs.c index dcdc51c0..2a6035cf 100644 --- a/daemon/stubs.c +++ b/daemon/stubs.c @@ -2826,6 +2826,34 @@ 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); +} + void dispatch_incoming_message (XDR *xdr_in) { switch (proc_nr) { @@ -3165,6 +3193,9 @@ void dispatch_incoming_message (XDR *xdr_in) case GUESTFS_PROC_SH_LINES: sh_lines_stub (xdr_in); break; + case GUESTFS_PROC_GLOB_EXPAND: + glob_expand_stub (xdr_in); + break; default: reply_with_error ("dispatch_incoming_message: unknown procedure number %d", proc_nr); } |