diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-05-19 12:05:43 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-05-19 12:05:43 +0100 |
commit | 1fc41b39dac877ccec1284da8bb14baa4df368b8 (patch) | |
tree | 74d0693b6d97d796b75847ace4815109c17b3198 /perl/Guestfs.xs | |
parent | d1df2f342489bbbba086cae2bb95971c8e404cad (diff) | |
download | libguestfs-1fc41b39dac877ccec1284da8bb14baa4df368b8.tar.gz libguestfs-1fc41b39dac877ccec1284da8bb14baa4df368b8.tar.xz libguestfs-1fc41b39dac877ccec1284da8bb14baa4df368b8.zip |
Generated code for 'find' command.
Diffstat (limited to 'perl/Guestfs.xs')
-rw-r--r-- | perl/Guestfs.xs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs index 5a6cf364..0cc124ce 100644 --- a/perl/Guestfs.xs +++ b/perl/Guestfs.xs @@ -1917,3 +1917,22 @@ PREINIT: if (r == -1) croak ("resize2fs: %s", guestfs_last_error (g)); +void +find (g, directory) + guestfs_h *g; + char *directory; +PREINIT: + char **names; + int i, n; + PPCODE: + names = guestfs_find (g, directory); + if (names == NULL) + croak ("find: %s", guestfs_last_error (g)); + for (n = 0; names[n] != NULL; ++n) /**/; + EXTEND (SP, n); + for (i = 0; i < n; ++i) { + PUSHs (sv_2mortal (newSVpv (names[i], 0))); + free (names[i]); + } + free (names); + |