fprintf (stderr, "warning: \"guestfs_df_h\" has no tests\n");
}
+static int test_initrd_list_0_skip (void)
+{
+ const char *str;
+
+ str = getenv ("TEST_ONLY");
+ if (str)
+ return strstr (str, "initrd_list") == NULL;
+ str = getenv ("SKIP_TEST_INITRD_LIST_0");
+ if (str && strcmp (str, "1") == 0) return 1;
+ str = getenv ("SKIP_TEST_INITRD_LIST");
+ if (str && strcmp (str, "1") == 0) return 1;
+ return 0;
+}
+
+static int test_initrd_list_0 (void)
+{
+ if (test_initrd_list_0_skip ()) {
+ printf ("%s skipped (reason: environment variable set)\n", "test_initrd_list_0");
+ return 0;
+ }
+
+ /* InitBasicFS for test_initrd_list_0: create ext2 on /dev/sda1 */
+ {
+ char device[] = "/dev/sda";
+ int r;
+ suppress_error = 0;
+ r = guestfs_blockdev_setrw (g, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ int r;
+ suppress_error = 0;
+ r = guestfs_umount_all (g);
+ if (r == -1)
+ return -1;
+ }
+ {
+ int r;
+ suppress_error = 0;
+ r = guestfs_lvm_remove_all (g);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda";
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char fstype[] = "ext2";
+ char device[] = "/dev/sda1";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mkfs (g, fstype, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ char mountpoint[] = "/";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mount (g, device, mountpoint);
+ if (r == -1)
+ return -1;
+ }
+ /* TestOutputList for initrd_list (0) */
+ {
+ char options[] = "ro";
+ char vfstype[] = "squashfs";
+ char device[] = "/dev/sdd";
+ char mountpoint[] = "/";
+ int r;
+ suppress_error = 0;
+ r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char path[] = "/initrd";
+ char **r;
+ int i;
+ suppress_error = 0;
+ r = guestfs_initrd_list (g, path);
+ if (r == NULL)
+ return -1;
+ if (!r[0]) {
+ fprintf (stderr, "test_initrd_list_0: short list returned from command\n");
+ print_strings (r);
+ return -1;
+ }
+ {
+ char expected[] = "empty";
+ if (strcmp (r[0], expected) != 0) {
+ fprintf (stderr, "test_initrd_list_0: expected \"%s\" but got \"%s\"\n", expected, r[0]);
+ return -1;
+ }
+ }
+ if (!r[1]) {
+ fprintf (stderr, "test_initrd_list_0: short list returned from command\n");
+ print_strings (r);
+ return -1;
+ }
+ {
+ char expected[] = "known-1";
+ if (strcmp (r[1], expected) != 0) {
+ fprintf (stderr, "test_initrd_list_0: expected \"%s\" but got \"%s\"\n", expected, r[1]);
+ return -1;
+ }
+ }
+ if (!r[2]) {
+ fprintf (stderr, "test_initrd_list_0: short list returned from command\n");
+ print_strings (r);
+ return -1;
+ }
+ {
+ char expected[] = "known-2";
+ if (strcmp (r[2], expected) != 0) {
+ fprintf (stderr, "test_initrd_list_0: expected \"%s\" but got \"%s\"\n", expected, r[2]);
+ return -1;
+ }
+ }
+ if (!r[3]) {
+ fprintf (stderr, "test_initrd_list_0: short list returned from command\n");
+ print_strings (r);
+ return -1;
+ }
+ {
+ char expected[] = "known-3";
+ if (strcmp (r[3], expected) != 0) {
+ fprintf (stderr, "test_initrd_list_0: expected \"%s\" but got \"%s\"\n", expected, r[3]);
+ return -1;
+ }
+ }
+ if (r[4] != NULL) {
+ fprintf (stderr, "test_initrd_list_0: extra elements returned from command\n");
+ print_strings (r);
+ return -1;
+ }
+ for (i = 0; r[i] != NULL; ++i)
+ free (r[i]);
+ free (r);
+ }
+ return 0;
+}
+
static int test_du_0_skip (void)
{
const char *str;
/* Cancel previous alarm. */
alarm (0);
- nr_tests = 165;
+ nr_tests = 166;
test_num++;
+ printf ("%3d/%3d test_initrd_list_0\n", test_num, nr_tests);
+ if (test_initrd_list_0 () == -1) {
+ printf ("test_initrd_list_0 FAILED\n");
+ failed++;
+ }
+ test_num++;
printf ("%3d/%3d test_du_0\n", test_num, nr_tests);
if (test_du_0 () == -1) {
printf ("test_du_0 FAILED\n");
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);
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) {
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);
}
printf ("%-20s %s\n", "head", "return first 10 lines of a file");
printf ("%-20s %s\n", "head-n", "return first N lines of a file");
printf ("%-20s %s\n", "hexdump", "dump a file in hexadecimal");
+ printf ("%-20s %s\n", "initrd-list", "list files in an initrd");
printf ("%-20s %s\n", "is-busy", "is busy processing a command");
printf ("%-20s %s\n", "is-config", "is in configuration state");
printf ("%-20s %s\n", "is-dir", "test if file exists");
if (strcasecmp (cmd, "du") == 0)
pod2text ("du - estimate file space usage", " du <path>\n\nThis command runs the C<du -s> command to estimate file space\nusage for C<path>.\n\nC<path> can be a file or a directory. If C<path> is a directory\nthen the estimate includes the contents of the directory and all\nsubdirectories (recursively).\n\nThe result is the estimated size in I<kilobytes>\n(ie. units of 1024 bytes).");
else
+ if (strcasecmp (cmd, "initrd_list") == 0 || strcasecmp (cmd, "initrd-list") == 0)
+ pod2text ("initrd-list - list files in an initrd", " initrd-list <path>\n\nThis command lists out files contained in an initrd.\n\nThe files are listed without any initial C</> character. The\nfiles are listed in the order they appear (not necessarily\nalphabetical). Directory names are listed as separate items.\n\nOld Linux kernels (2.4 and earlier) used a compressed ext2\nfilesystem as initrd. We I<only> support the newer initramfs\nformat (compressed cpio files).");
+ else
display_builtin_command (cmd);
}
return 0;
}
+static int run_initrd_list (const char *cmd, int argc, char *argv[])
+{
+ char **r;
+ const char *path;
+ if (argc != 1) {
+ fprintf (stderr, "%s should have 1 parameter(s)\n", cmd);
+ fprintf (stderr, "type 'help %s' for help on %s\n", cmd, cmd);
+ return -1;
+ }
+ path = argv[0];
+ r = guestfs_initrd_list (g, path);
+ if (r == NULL) return -1;
+ print_strings (r);
+ free_strings (r);
+ return 0;
+}
+
int run_action (const char *cmd, int argc, char *argv[])
{
if (strcasecmp (cmd, "launch") == 0 || strcasecmp (cmd, "run") == 0)
if (strcasecmp (cmd, "du") == 0)
return run_du (cmd, argc, argv);
else
+ if (strcasecmp (cmd, "initrd_list") == 0 || strcasecmp (cmd, "initrd-list") == 0)
+ return run_initrd_list (cmd, argc, argv);
+ else
{
fprintf (stderr, "%s: unknown command\n", cmd);
return -1;
"df",
"df-h",
"du",
+ "initrd-list",
NULL
};
of somewhere between 2MB and 4MB. To transfer large files you should use
FTP.
+=head2 initrd-list
+
+ initrd-list path
+
+This command lists out files contained in an initrd.
+
+The files are listed without any initial C</> character. The
+files are listed in the order they appear (not necessarily
+alphabetical). Directory names are listed as separate items.
+
+Old Linux kernels (2.4 and earlier) used a compressed ext2
+filesystem as initrd. We I<only> support the newer initramfs
+format (compressed cpio files).
+
=head2 is-busy
is-busy
of somewhere between 2MB and 4MB. To transfer large files you should use
FTP.
+=head2 guestfs_initrd_list
+
+ char **guestfs_initrd_list (guestfs_h *handle,
+ const char *path);
+
+This command lists out files contained in an initrd.
+
+The files are listed without any initial C</> character. The
+files are listed in the order they appear (not necessarily
+alphabetical). Directory names are listed as separate items.
+
+Old Linux kernels (2.4 and earlier) used a compressed ext2
+filesystem as initrd. We I<only> support the newer initramfs
+format (compressed cpio files).
+
+This function returns a NULL-terminated array of strings
+(like L<environ(3)>), or NULL if there was an error.
+I<The caller must free the strings and the array after use>.
+
=head2 guestfs_is_busy
int guestfs_is_busy (guestfs_h *handle);
private native long _du (long g, String path)
throws LibGuestFSException;
+ /**
+ * list files in an initrd
+ * <p>
+ * This command lists out files contained in an initrd.
+ * <p>
+ * The files are listed without any initial "/" character.
+ * The files are listed in the order they appear (not
+ * necessarily alphabetical). Directory names are listed as
+ * separate items.
+ * <p>
+ * Old Linux kernels (2.4 and earlier) used a compressed
+ * ext2 filesystem as initrd. We *only* support the newer
+ * initramfs format (compressed cpio files).
+ * <p>
+ * @throws LibGuestFSException
+ */
+ public String[] initrd_list (String path)
+ throws LibGuestFSException
+ {
+ if (g == 0)
+ throw new LibGuestFSException ("initrd_list: handle is closed");
+ return _initrd_list (g, path);
+ }
+ private native String[] _initrd_list (long g, String path)
+ throws LibGuestFSException;
+
}
return (jlong) r;
}
+JNIEXPORT jobjectArray JNICALL
+Java_com_redhat_et_libguestfs_GuestFS__1initrd_1list
+ (JNIEnv *env, jobject obj, jlong jg, jstring jpath)
+{
+ guestfs_h *g = (guestfs_h *) (long) jg;
+ jobjectArray jr;
+ int r_len;
+ jclass cl;
+ jstring jstr;
+ char **r;
+ const char *path;
+ int i;
+
+ path = (*env)->GetStringUTFChars (env, jpath, NULL);
+ r = guestfs_initrd_list (g, path);
+ (*env)->ReleaseStringUTFChars (env, jpath, path);
+ if (r == NULL) {
+ throw_exception (env, guestfs_last_error (g));
+ return NULL;
+ }
+ for (r_len = 0; r[r_len] != NULL; ++r_len) ;
+ cl = (*env)->FindClass (env, "java/lang/String");
+ jstr = (*env)->NewStringUTF (env, "");
+ jr = (*env)->NewObjectArray (env, r_len, cl, jstr);
+ for (i = 0; i < r_len; ++i) {
+ jstr = (*env)->NewStringUTF (env, r[i]);
+ (*env)->SetObjectArrayElement (env, jr, i, jstr);
+ free (r[i]);
+ }
+ free (r);
+ return jr;
+}
+
external df : t -> string = "ocaml_guestfs_df"
external df_h : t -> string = "ocaml_guestfs_df_h"
external du : t -> string -> int64 = "ocaml_guestfs_du"
+external initrd_list : t -> string -> string array = "ocaml_guestfs_initrd_list"
val du : t -> string -> int64
(** estimate file space usage *)
+val initrd_list : t -> string -> string array
+(** list files in an initrd *)
+
CAMLreturn (rv);
}
+CAMLprim value
+ocaml_guestfs_initrd_list (value gv, value pathv)
+{
+ CAMLparam2 (gv, pathv);
+ CAMLlocal1 (rv);
+
+ guestfs_h *g = Guestfs_val (gv);
+ if (g == NULL)
+ caml_failwith ("initrd_list: used handle after closing it");
+
+ const char *path = String_val (pathv);
+ int i;
+ char **r;
+
+ caml_enter_blocking_section ();
+ r = guestfs_initrd_list (g, path);
+ caml_leave_blocking_section ();
+ if (r == NULL)
+ ocaml_guestfs_raise_error (g, "initrd_list");
+
+ rv = caml_copy_string_array ((const char **) r);
+ for (i = 0; r[i] != NULL; ++i) free (r[i]);
+ free (r);
+ CAMLreturn (rv);
+}
+
OUTPUT:
RETVAL
+void
+initrd_list (g, path)
+ guestfs_h *g;
+ char *path;
+PREINIT:
+ char **filenames;
+ int i, n;
+ PPCODE:
+ filenames = guestfs_initrd_list (g, path);
+ if (filenames == NULL)
+ croak ("initrd_list: %s", guestfs_last_error (g));
+ for (n = 0; filenames[n] != NULL; ++n) /**/;
+ EXTEND (SP, n);
+ for (i = 0; i < n; ++i) {
+ PUSHs (sv_2mortal (newSVpv (filenames[i], 0)));
+ free (filenames[i]);
+ }
+ free (filenames);
+
of somewhere between 2MB and 4MB. To transfer large files you should use
FTP.
+=item @filenames = $h->initrd_list ($path);
+
+This command lists out files contained in an initrd.
+
+The files are listed without any initial C</> character. The
+files are listed in the order they appear (not necessarily
+alphabetical). Directory names are listed as separate items.
+
+Old Linux kernels (2.4 and earlier) used a compressed ext2
+filesystem as initrd. We I<only> support the newer initramfs
+format (compressed cpio files).
+
=item $busy = $h->is_busy ();
This returns true iff this handle is busy processing a command
return py_r;
}
+static PyObject *
+py_guestfs_initrd_list (PyObject *self, PyObject *args)
+{
+ PyObject *py_g;
+ guestfs_h *g;
+ PyObject *py_r;
+ char **r;
+ const char *path;
+
+ if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_initrd_list",
+ &py_g, &path))
+ return NULL;
+ g = get_handle (py_g);
+
+ r = guestfs_initrd_list (g, path);
+ if (r == NULL) {
+ PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
+ return NULL;
+ }
+
+ py_r = put_string_list (r);
+ free_strings (r);
+ return py_r;
+}
+
static PyMethodDef methods[] = {
{ (char *) "create", py_guestfs_create, METH_VARARGS, NULL },
{ (char *) "close", py_guestfs_close, METH_VARARGS, NULL },
{ (char *) "df", py_guestfs_df, METH_VARARGS, NULL },
{ (char *) "df_h", py_guestfs_df_h, METH_VARARGS, NULL },
{ (char *) "du", py_guestfs_du, METH_VARARGS, NULL },
+ { (char *) "initrd_list", py_guestfs_initrd_list, METH_VARARGS, NULL },
{ NULL, NULL, 0, NULL }
};
"""
return libguestfsmod.du (self._o, path)
+ def initrd_list (self, path):
+ u"""This command lists out files contained in an initrd.
+
+ The files are listed without any initial "/" character.
+ The files are listed in the order they appear (not
+ necessarily alphabetical). Directory names are listed as
+ separate items.
+
+ Old Linux kernels (2.4 and earlier) used a compressed
+ ext2 filesystem as initrd. We *only* support the newer
+ initramfs format (compressed cpio files).
+
+ This function returns a list of strings.
+ """
+ return libguestfsmod.initrd_list (self._o, path)
+
return ULL2NUM (r);
}
+static VALUE ruby_guestfs_initrd_list (VALUE gv, VALUE pathv)
+{
+ guestfs_h *g;
+ Data_Get_Struct (gv, guestfs_h, g);
+ if (!g)
+ rb_raise (rb_eArgError, "%s: used handle after closing it", "initrd_list");
+
+ Check_Type (pathv, T_STRING);
+ const char *path = StringValueCStr (pathv);
+ if (!path)
+ rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
+ "path", "initrd_list");
+
+ char **r;
+
+ r = guestfs_initrd_list (g, path);
+ if (r == NULL)
+ rb_raise (e_Error, "%s", guestfs_last_error (g));
+
+ int i, len = 0;
+ for (i = 0; r[i] != NULL; ++i) len++;
+ VALUE rv = rb_ary_new2 (len);
+ for (i = 0; r[i] != NULL; ++i) {
+ rb_ary_push (rv, rb_str_new2 (r[i]));
+ free (r[i]);
+ }
+ free (r);
+ return rv;
+}
+
/* Initialize the module. */
void Init__guestfs ()
{
ruby_guestfs_df_h, 0);
rb_define_method (c_guestfs, "du",
ruby_guestfs_du, 1);
+ rb_define_method (c_guestfs, "initrd_list",
+ ruby_guestfs_initrd_list, 1);
}
return ctx.ret.sizekb;
}
+struct initrd_list_ctx {
+ /* This flag is set by the callbacks, so we know we've done
+ * the callbacks as expected, and in the right sequence.
+ * 0 = not called, 1 = reply_cb called.
+ */
+ int cb_sequence;
+ struct guestfs_message_header hdr;
+ struct guestfs_message_error err;
+ struct guestfs_initrd_list_ret ret;
+};
+
+static void initrd_list_reply_cb (guestfs_h *g, void *data, XDR *xdr)
+{
+ guestfs_main_loop *ml = guestfs_get_main_loop (g);
+ struct initrd_list_ctx *ctx = (struct initrd_list_ctx *) data;
+
+ /* This should definitely not happen. */
+ if (ctx->cb_sequence != 0) {
+ ctx->cb_sequence = 9999;
+ error (g, "%s: internal error: reply callback called twice", "guestfs_initrd_list");
+ return;
+ }
+
+ ml->main_loop_quit (ml, g);
+
+ if (!xdr_guestfs_message_header (xdr, &ctx->hdr)) {
+ error (g, "%s: failed to parse reply header", "guestfs_initrd_list");
+ return;
+ }
+ if (ctx->hdr.status == GUESTFS_STATUS_ERROR) {
+ if (!xdr_guestfs_message_error (xdr, &ctx->err)) {
+ error (g, "%s: failed to parse reply error", "guestfs_initrd_list");
+ return;
+ }
+ goto done;
+ }
+ if (!xdr_guestfs_initrd_list_ret (xdr, &ctx->ret)) {
+ error (g, "%s: failed to parse reply", "guestfs_initrd_list");
+ return;
+ }
+ done:
+ ctx->cb_sequence = 1;
+}
+
+char **guestfs_initrd_list (guestfs_h *g,
+ const char *path)
+{
+ struct guestfs_initrd_list_args args;
+ struct initrd_list_ctx ctx;
+ guestfs_main_loop *ml = guestfs_get_main_loop (g);
+ int serial;
+
+ if (check_state (g, "guestfs_initrd_list") == -1) return NULL;
+ guestfs_set_busy (g);
+
+ memset (&ctx, 0, sizeof ctx);
+
+ args.path = (char *) path;
+ serial = guestfs__send_sync (g, GUESTFS_PROC_INITRD_LIST,
+ (xdrproc_t) xdr_guestfs_initrd_list_args, (char *) &args);
+ if (serial == -1) {
+ guestfs_end_busy (g);
+ return NULL;
+ }
+
+ guestfs__switch_to_receiving (g);
+ ctx.cb_sequence = 0;
+ guestfs_set_reply_callback (g, initrd_list_reply_cb, &ctx);
+ (void) ml->main_loop_run (ml, g);
+ guestfs_set_reply_callback (g, NULL, NULL);
+ if (ctx.cb_sequence != 1) {
+ error (g, "%s reply failed, see earlier error messages", "guestfs_initrd_list");
+ guestfs_end_busy (g);
+ return NULL;
+ }
+
+ if (check_reply_header (g, &ctx.hdr, GUESTFS_PROC_INITRD_LIST, serial) == -1) {
+ guestfs_end_busy (g);
+ return NULL;
+ }
+
+ if (ctx.hdr.status == GUESTFS_STATUS_ERROR) {
+ error (g, "%s", ctx.err.error_message);
+ free (ctx.err.error_message);
+ guestfs_end_busy (g);
+ return NULL;
+ }
+
+ guestfs_end_busy (g);
+ /* caller will free this, but we need to add a NULL entry */
+ ctx.ret.filenames.filenames_val =
+ safe_realloc (g, ctx.ret.filenames.filenames_val,
+ sizeof (char *) * (ctx.ret.filenames.filenames_len + 1));
+ ctx.ret.filenames.filenames_val[ctx.ret.filenames.filenames_len] = NULL;
+ return ctx.ret.filenames.filenames_val;
+}
+
extern char *guestfs_df (guestfs_h *handle);
extern char *guestfs_df_h (guestfs_h *handle);
extern int64_t guestfs_du (guestfs_h *handle, const char *path);
+extern char **guestfs_initrd_list (guestfs_h *handle, const char *path);
}
bool_t
+xdr_guestfs_initrd_list_args (XDR *xdrs, guestfs_initrd_list_args *objp)
+{
+ register int32_t *buf;
+
+ if (!xdr_string (xdrs, &objp->path, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_guestfs_initrd_list_ret (XDR *xdrs, guestfs_initrd_list_ret *objp)
+{
+ register int32_t *buf;
+
+ if (!xdr_array (xdrs, (char **)&objp->filenames.filenames_val, (u_int *) &objp->filenames.filenames_len, ~0,
+ sizeof (str), (xdrproc_t) xdr_str))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
xdr_guestfs_procedure (XDR *xdrs, guestfs_procedure *objp)
{
register int32_t *buf;
};
typedef struct guestfs_du_ret guestfs_du_ret;
+struct guestfs_initrd_list_args {
+ char *path;
+};
+typedef struct guestfs_initrd_list_args guestfs_initrd_list_args;
+
+struct guestfs_initrd_list_ret {
+ struct {
+ u_int filenames_len;
+ str *filenames_val;
+ } filenames;
+};
+typedef struct guestfs_initrd_list_ret guestfs_initrd_list_ret;
+
enum guestfs_procedure {
GUESTFS_PROC_MOUNT = 1,
GUESTFS_PROC_SYNC = 2,
GUESTFS_PROC_DF = 125,
GUESTFS_PROC_DF_H = 126,
GUESTFS_PROC_DU = 127,
- GUESTFS_PROC_NR_PROCS = 127 + 1,
+ GUESTFS_PROC_INITRD_LIST = 128,
+ GUESTFS_PROC_NR_PROCS = 128 + 1,
};
typedef enum guestfs_procedure guestfs_procedure;
#define GUESTFS_MESSAGE_MAX 4194304
extern bool_t xdr_guestfs_df_h_ret (XDR *, guestfs_df_h_ret*);
extern bool_t xdr_guestfs_du_args (XDR *, guestfs_du_args*);
extern bool_t xdr_guestfs_du_ret (XDR *, guestfs_du_ret*);
+extern bool_t xdr_guestfs_initrd_list_args (XDR *, guestfs_initrd_list_args*);
+extern bool_t xdr_guestfs_initrd_list_ret (XDR *, guestfs_initrd_list_ret*);
extern bool_t xdr_guestfs_procedure (XDR *, guestfs_procedure*);
extern bool_t xdr_guestfs_message_direction (XDR *, guestfs_message_direction*);
extern bool_t xdr_guestfs_message_status (XDR *, guestfs_message_status*);
extern bool_t xdr_guestfs_df_h_ret ();
extern bool_t xdr_guestfs_du_args ();
extern bool_t xdr_guestfs_du_ret ();
+extern bool_t xdr_guestfs_initrd_list_args ();
+extern bool_t xdr_guestfs_initrd_list_ret ();
extern bool_t xdr_guestfs_procedure ();
extern bool_t xdr_guestfs_message_direction ();
extern bool_t xdr_guestfs_message_status ();
hyper sizekb;
};
+struct guestfs_initrd_list_args {
+ string path<>;
+};
+
+struct guestfs_initrd_list_ret {
+ str filenames<>;
+};
+
enum guestfs_procedure {
GUESTFS_PROC_MOUNT = 1,
GUESTFS_PROC_SYNC = 2,
GUESTFS_PROC_DF = 125,
GUESTFS_PROC_DF_H = 126,
GUESTFS_PROC_DU = 127,
+ GUESTFS_PROC_INITRD_LIST = 128,
GUESTFS_PROC_NR_PROCS
};