fprintf (stderr, "warning: \"guestfs_e2fsck_f\" has no tests\n");
}
+static int test_ntfs_3g_probe_0_skip (void)
+{
+ const char *str;
+
+ str = getenv ("SKIP_TEST_NTFS_3G_PROBE_0");
+ if (str && strcmp (str, "1") == 0) return 1;
+ str = getenv ("SKIP_TEST_NTFS_3G_PROBE");
+ if (str && strcmp (str, "1") == 0) return 1;
+ return 0;
+}
+
+static int test_ntfs_3g_probe_0 (void)
+{
+ if (test_ntfs_3g_probe_0_skip ()) {
+ printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_ntfs_3g_probe_0");
+ return 0;
+ }
+
+ /* InitNone|InitEmpty for test_ntfs_3g_probe_0 */
+ {
+ char device[] = "/dev/sda";
+ device[5] = devchar;
+ 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;
+ }
+ /* TestOutputInt for ntfs_3g_probe (0) */
+ {
+ char device[] = "/dev/sda";
+ device[5] = devchar;
+ 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[] = "ntfs";
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
+ int r;
+ suppress_error = 0;
+ r = guestfs_mkfs (g, fstype, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
+ int r;
+ suppress_error = 0;
+ r = guestfs_ntfs_3g_probe (g, 1, device);
+ if (r == -1)
+ return -1;
+ if (r != 0) {
+ fprintf (stderr, "test_ntfs_3g_probe_0: expected 0 but got %d\n", (int) r);
+ return -1;
+ }
+ }
+ return 0;
+}
+
+static int test_ntfs_3g_probe_1_skip (void)
+{
+ const char *str;
+
+ str = getenv ("SKIP_TEST_NTFS_3G_PROBE_1");
+ if (str && strcmp (str, "1") == 0) return 1;
+ str = getenv ("SKIP_TEST_NTFS_3G_PROBE");
+ if (str && strcmp (str, "1") == 0) return 1;
+ return 0;
+}
+
+static int test_ntfs_3g_probe_1 (void)
+{
+ if (test_ntfs_3g_probe_1_skip ()) {
+ printf ("%s skipped (reason: SKIP_TEST_* variable set)\n", "test_ntfs_3g_probe_1");
+ return 0;
+ }
+
+ /* InitNone|InitEmpty for test_ntfs_3g_probe_1 */
+ {
+ char device[] = "/dev/sda";
+ device[5] = devchar;
+ 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;
+ }
+ /* TestOutputInt for ntfs_3g_probe (1) */
+ {
+ char device[] = "/dev/sda";
+ device[5] = devchar;
+ 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";
+ device[5] = devchar;
+ int r;
+ suppress_error = 0;
+ r = guestfs_mkfs (g, fstype, device);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
+ int r;
+ suppress_error = 0;
+ r = guestfs_ntfs_3g_probe (g, 1, device);
+ if (r == -1)
+ return -1;
+ if (r != 12) {
+ fprintf (stderr, "test_ntfs_3g_probe_1: expected 12 but got %d\n", (int) r);
+ return -1;
+ }
+ }
+ return 0;
+}
+
static int test_sleep_0_skip (void)
{
const char *str;
free (devs[i]);
free (devs);
- nr_tests = 144;
+ nr_tests = 146;
test_num++;
+ printf ("%3d/%3d test_ntfs_3g_probe_0\n", test_num, nr_tests);
+ if (test_ntfs_3g_probe_0 () == -1) {
+ printf ("test_ntfs_3g_probe_0 FAILED\n");
+ failed++;
+ }
+ test_num++;
+ printf ("%3d/%3d test_ntfs_3g_probe_1\n", test_num, nr_tests);
+ if (test_ntfs_3g_probe_1 () == -1) {
+ printf ("test_ntfs_3g_probe_1 FAILED\n");
+ failed++;
+ }
+ test_num++;
printf ("%3d/%3d test_sleep_0\n", test_num, nr_tests);
if (test_sleep_0 () == -1) {
printf ("test_sleep_0 FAILED\n");
extern char **do_find (const char *directory);
extern int do_e2fsck_f (const char *device);
extern int do_sleep (int secs);
+extern int do_ntfs_3g_probe (int rw, const char *device);
xdr_free ((xdrproc_t) xdr_guestfs_sleep_args, (char *) &args);
}
+static void ntfs_3g_probe_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_ntfs_3g_probe_args args;
+ int rw;
+ const char *device;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_ntfs_3g_probe_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "ntfs_3g_probe");
+ return;
+ }
+ rw = args.rw;
+ device = args.device;
+
+ r = do_ntfs_3g_probe (rw, device);
+ if (r == -1)
+ /* do_ntfs_3g_probe has already called reply_with_error */
+ goto done;
+
+ struct guestfs_ntfs_3g_probe_ret ret;
+ ret.status = r;
+ reply ((xdrproc_t) &xdr_guestfs_ntfs_3g_probe_ret, (char *) &ret);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_ntfs_3g_probe_args, (char *) &args);
+}
+
void dispatch_incoming_message (XDR *xdr_in)
{
switch (proc_nr) {
case GUESTFS_PROC_SLEEP:
sleep_stub (xdr_in);
break;
+ case GUESTFS_PROC_NTFS_3G_PROBE:
+ ntfs_3g_probe_stub (xdr_in);
+ break;
default:
reply_with_error ("dispatch_incoming_message: unknown procedure number %d", proc_nr);
}
printf ("%-20s %s\n", "mount-vfs", "mount a guest disk with mount options and vfstype");
printf ("%-20s %s\n", "mounts", "show mounted filesystems");
printf ("%-20s %s\n", "mv", "move a file");
+ printf ("%-20s %s\n", "ntfs-3g-probe", "probe NTFS volume");
printf ("%-20s %s\n", "ping-daemon", "ping the guest daemon");
printf ("%-20s %s\n", "pvcreate", "create an LVM physical volume");
printf ("%-20s %s\n", "pvremove", "remove an LVM physical volume");
if (strcasecmp (cmd, "sleep") == 0)
pod2text ("sleep - sleep for some seconds", " sleep <secs>\n\nSleep for C<secs> seconds.");
else
+ if (strcasecmp (cmd, "ntfs_3g_probe") == 0 || strcasecmp (cmd, "ntfs-3g-probe") == 0)
+ pod2text ("ntfs-3g-probe - probe NTFS volume", " ntfs-3g-probe <rw> <device>\n\nThis command runs the L<ntfs-3g.probe(8)> command which probes\nan NTFS C<device> for mountability. (Not all NTFS volumes can\nbe mounted read-write, and some cannot be mounted at all).\n\nC<rw> is a boolean flag. Set it to true if you want to test\nif the volume can be mounted read-write. Set it to false if\nyou want to test if the volume can be mounted read-only.\n\nThe return value is an integer which C<0> if the operation\nwould succeed, or some non-zero value documented in the\nL<ntfs-3g.probe(8)> manual page.");
+ else
display_builtin_command (cmd);
}
return r;
}
+static int run_ntfs_3g_probe (const char *cmd, int argc, char *argv[])
+{
+ int r;
+ int rw;
+ const char *device;
+ if (argc != 2) {
+ fprintf (stderr, "%s should have 2 parameter(s)\n", cmd);
+ fprintf (stderr, "type 'help %s' for help on %s\n", cmd, cmd);
+ return -1;
+ }
+ rw = is_true (argv[0]) ? 1 : 0;
+ device = argv[1];
+ r = guestfs_ntfs_3g_probe (g, rw, device);
+ if (r == -1) return -1;
+ printf ("%d\n", 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, "sleep") == 0)
return run_sleep (cmd, argc, argv);
else
+ if (strcasecmp (cmd, "ntfs_3g_probe") == 0 || strcasecmp (cmd, "ntfs-3g-probe") == 0)
+ return run_ntfs_3g_probe (cmd, argc, argv);
+ else
{
fprintf (stderr, "%s: unknown command\n", cmd);
return -1;
"find",
"e2fsck-f",
"sleep",
+ "ntfs-3g-probe",
NULL
};
This moves a file from C<src> to C<dest> where C<dest> is
either a destination filename or destination directory.
+=head2 ntfs-3g-probe
+
+ ntfs-3g-probe true|false device
+
+This command runs the L<ntfs-3g.probe(8)> command which probes
+an NTFS C<device> for mountability. (Not all NTFS volumes can
+be mounted read-write, and some cannot be mounted at all).
+
+C<rw> is a boolean flag. Set it to true if you want to test
+if the volume can be mounted read-write. Set it to false if
+you want to test if the volume can be mounted read-only.
+
+The return value is an integer which C<0> if the operation
+would succeed, or some non-zero value documented in the
+L<ntfs-3g.probe(8)> manual page.
+
=head2 ping-daemon
ping-daemon
This function returns 0 on success or -1 on error.
+=head2 guestfs_ntfs_3g_probe
+
+ int guestfs_ntfs_3g_probe (guestfs_h *handle,
+ int rw,
+ const char *device);
+
+This command runs the L<ntfs-3g.probe(8)> command which probes
+an NTFS C<device> for mountability. (Not all NTFS volumes can
+be mounted read-write, and some cannot be mounted at all).
+
+C<rw> is a boolean flag. Set it to true if you want to test
+if the volume can be mounted read-write. Set it to false if
+you want to test if the volume can be mounted read-only.
+
+The return value is an integer which C<0> if the operation
+would succeed, or some non-zero value documented in the
+L<ntfs-3g.probe(8)> manual page.
+
+On error this function returns -1.
+
=head2 guestfs_ping_daemon
int guestfs_ping_daemon (guestfs_h *handle);
private native void _sleep (long g, int secs)
throws LibGuestFSException;
+ /**
+ * probe NTFS volume
+ * <p>
+ * This command runs the ntfs-3g.probe(8) command which
+ * probes an NTFS "device" for mountability. (Not all NTFS
+ * volumes can be mounted read-write, and some cannot be
+ * mounted at all).
+ * <p>
+ * "rw" is a boolean flag. Set it to true if you want to
+ * test if the volume can be mounted read-write. Set it to
+ * false if you want to test if the volume can be mounted
+ * read-only.
+ * <p>
+ * The return value is an integer which 0 if the operation
+ * would succeed, or some non-zero value documented in the
+ * ntfs-3g.probe(8) manual page.
+ * <p>
+ * @throws LibGuestFSException
+ */
+ public int ntfs_3g_probe (boolean rw, String device)
+ throws LibGuestFSException
+ {
+ if (g == 0)
+ throw new LibGuestFSException ("ntfs_3g_probe: handle is closed");
+ return _ntfs_3g_probe (g, rw, device);
+ }
+ private native int _ntfs_3g_probe (long g, boolean rw, String device)
+ throws LibGuestFSException;
+
}
}
}
+JNIEXPORT jint JNICALL
+Java_com_redhat_et_libguestfs_GuestFS__1ntfs_13g_1probe
+ (JNIEnv *env, jobject obj, jlong jg, jboolean jrw, jstring jdevice)
+{
+ guestfs_h *g = (guestfs_h *) (long) jg;
+ int r;
+ int rw;
+ const char *device;
+
+ rw = jrw;
+ device = (*env)->GetStringUTFChars (env, jdevice, NULL);
+ r = guestfs_ntfs_3g_probe (g, rw, device);
+ (*env)->ReleaseStringUTFChars (env, jdevice, device);
+ if (r == -1) {
+ throw_exception (env, guestfs_last_error (g));
+ return 0;
+ }
+ return (jint) r;
+}
+
external find : t -> string -> string array = "ocaml_guestfs_find"
external e2fsck_f : t -> string -> unit = "ocaml_guestfs_e2fsck_f"
external sleep : t -> int -> unit = "ocaml_guestfs_sleep"
+external ntfs_3g_probe : t -> bool -> string -> int = "ocaml_guestfs_ntfs_3g_probe"
val sleep : t -> int -> unit
(** sleep for some seconds *)
+val ntfs_3g_probe : t -> bool -> string -> int
+(** probe NTFS volume *)
+
CAMLreturn (rv);
}
+CAMLprim value
+ocaml_guestfs_ntfs_3g_probe (value gv, value rwv, value devicev)
+{
+ CAMLparam3 (gv, rwv, devicev);
+ CAMLlocal1 (rv);
+
+ guestfs_h *g = Guestfs_val (gv);
+ if (g == NULL)
+ caml_failwith ("ntfs_3g_probe: used handle after closing it");
+
+ int rw = Bool_val (rwv);
+ const char *device = String_val (devicev);
+ int r;
+
+ caml_enter_blocking_section ();
+ r = guestfs_ntfs_3g_probe (g, rw, device);
+ caml_leave_blocking_section ();
+ if (r == -1)
+ ocaml_guestfs_raise_error (g, "ntfs_3g_probe");
+
+ rv = Val_int (r);
+ CAMLreturn (rv);
+}
+
if (r == -1)
croak ("sleep: %s", guestfs_last_error (g));
+SV *
+ntfs_3g_probe (g, rw, device)
+ guestfs_h *g;
+ int rw;
+ char *device;
+PREINIT:
+ int status;
+ CODE:
+ status = guestfs_ntfs_3g_probe (g, rw, device);
+ if (status == -1)
+ croak ("ntfs_3g_probe: %s", guestfs_last_error (g));
+ RETVAL = newSViv (status);
+ OUTPUT:
+ RETVAL
+
This moves a file from C<src> to C<dest> where C<dest> is
either a destination filename or destination directory.
+=item $status = $h->ntfs_3g_probe ($rw, $device);
+
+This command runs the L<ntfs-3g.probe(8)> command which probes
+an NTFS C<device> for mountability. (Not all NTFS volumes can
+be mounted read-write, and some cannot be mounted at all).
+
+C<rw> is a boolean flag. Set it to true if you want to test
+if the volume can be mounted read-write. Set it to false if
+you want to test if the volume can be mounted read-only.
+
+The return value is an integer which C<0> if the operation
+would succeed, or some non-zero value documented in the
+L<ntfs-3g.probe(8)> manual page.
+
=item $h->ping_daemon ();
This is a test probe into the guestfs daemon running inside
return py_r;
}
+static PyObject *
+py_guestfs_ntfs_3g_probe (PyObject *self, PyObject *args)
+{
+ PyObject *py_g;
+ guestfs_h *g;
+ PyObject *py_r;
+ int r;
+ int rw;
+ const char *device;
+
+ if (!PyArg_ParseTuple (args, (char *) "Ois:guestfs_ntfs_3g_probe",
+ &py_g, &rw, &device))
+ return NULL;
+ g = get_handle (py_g);
+
+ r = guestfs_ntfs_3g_probe (g, rw, device);
+ if (r == -1) {
+ PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
+ return NULL;
+ }
+
+ py_r = PyInt_FromLong ((long) r);
+ return py_r;
+}
+
static PyMethodDef methods[] = {
{ (char *) "create", py_guestfs_create, METH_VARARGS, NULL },
{ (char *) "close", py_guestfs_close, METH_VARARGS, NULL },
{ (char *) "find", py_guestfs_find, METH_VARARGS, NULL },
{ (char *) "e2fsck_f", py_guestfs_e2fsck_f, METH_VARARGS, NULL },
{ (char *) "sleep", py_guestfs_sleep, METH_VARARGS, NULL },
+ { (char *) "ntfs_3g_probe", py_guestfs_ntfs_3g_probe, METH_VARARGS, NULL },
{ NULL, NULL, 0, NULL }
};
"""
return libguestfsmod.sleep (self._o, secs)
+ def ntfs_3g_probe (self, rw, device):
+ u"""This command runs the ntfs-3g.probe(8) command which
+ probes an NTFS "device" for mountability. (Not all NTFS
+ volumes can be mounted read-write, and some cannot be
+ mounted at all).
+
+ "rw" is a boolean flag. Set it to true if you want to
+ test if the volume can be mounted read-write. Set it to
+ false if you want to test if the volume can be mounted
+ read-only.
+
+ The return value is an integer which 0 if the operation
+ would succeed, or some non-zero value documented in the
+ ntfs-3g.probe(8) manual page.
+ """
+ return libguestfsmod.ntfs_3g_probe (self._o, rw, device)
+
return Qnil;
}
+static VALUE ruby_guestfs_ntfs_3g_probe (VALUE gv, VALUE rwv, VALUE devicev)
+{
+ guestfs_h *g;
+ Data_Get_Struct (gv, guestfs_h, g);
+ if (!g)
+ rb_raise (rb_eArgError, "%s: used handle after closing it", "ntfs_3g_probe");
+
+ int rw = RTEST (rwv);
+ const char *device = StringValueCStr (devicev);
+ if (!device)
+ rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
+ "device", "ntfs_3g_probe");
+
+ int r;
+
+ r = guestfs_ntfs_3g_probe (g, rw, device);
+ if (r == -1)
+ rb_raise (e_Error, "%s", guestfs_last_error (g));
+
+ return INT2NUM (r);
+}
+
/* Initialize the module. */
void Init__guestfs ()
{
ruby_guestfs_e2fsck_f, 1);
rb_define_method (c_guestfs, "sleep",
ruby_guestfs_sleep, 1);
+ rb_define_method (c_guestfs, "ntfs_3g_probe",
+ ruby_guestfs_ntfs_3g_probe, 2);
}
return 0;
}
+struct ntfs_3g_probe_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_ntfs_3g_probe_ret ret;
+};
+
+static void ntfs_3g_probe_reply_cb (guestfs_h *g, void *data, XDR *xdr)
+{
+ guestfs_main_loop *ml = guestfs_get_main_loop (g);
+ struct ntfs_3g_probe_ctx *ctx = (struct ntfs_3g_probe_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_ntfs_3g_probe");
+ return;
+ }
+
+ ml->main_loop_quit (ml, g);
+
+ if (!xdr_guestfs_message_header (xdr, &ctx->hdr)) {
+ error (g, "%s: failed to parse reply header", "guestfs_ntfs_3g_probe");
+ 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_ntfs_3g_probe");
+ return;
+ }
+ goto done;
+ }
+ if (!xdr_guestfs_ntfs_3g_probe_ret (xdr, &ctx->ret)) {
+ error (g, "%s: failed to parse reply", "guestfs_ntfs_3g_probe");
+ return;
+ }
+ done:
+ ctx->cb_sequence = 1;
+}
+
+int guestfs_ntfs_3g_probe (guestfs_h *g,
+ int rw,
+ const char *device)
+{
+ struct guestfs_ntfs_3g_probe_args args;
+ struct ntfs_3g_probe_ctx ctx;
+ guestfs_main_loop *ml = guestfs_get_main_loop (g);
+ int serial;
+
+ if (check_state (g, "guestfs_ntfs_3g_probe") == -1) return -1;
+ guestfs_set_busy (g);
+
+ memset (&ctx, 0, sizeof ctx);
+
+ args.rw = rw;
+ args.device = (char *) device;
+ serial = guestfs__send_sync (g, GUESTFS_PROC_NTFS_3G_PROBE,
+ (xdrproc_t) xdr_guestfs_ntfs_3g_probe_args, (char *) &args);
+ if (serial == -1) {
+ guestfs_end_busy (g);
+ return -1;
+ }
+
+ guestfs__switch_to_receiving (g);
+ ctx.cb_sequence = 0;
+ guestfs_set_reply_callback (g, ntfs_3g_probe_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_ntfs_3g_probe");
+ guestfs_end_busy (g);
+ return -1;
+ }
+
+ if (check_reply_header (g, &ctx.hdr, GUESTFS_PROC_NTFS_3G_PROBE, serial) == -1) {
+ guestfs_end_busy (g);
+ return -1;
+ }
+
+ if (ctx.hdr.status == GUESTFS_STATUS_ERROR) {
+ error (g, "%s", ctx.err.error_message);
+ free (ctx.err.error_message);
+ guestfs_end_busy (g);
+ return -1;
+ }
+
+ guestfs_end_busy (g);
+ return ctx.ret.status;
+}
+
extern char **guestfs_find (guestfs_h *handle, const char *directory);
extern int guestfs_e2fsck_f (guestfs_h *handle, const char *device);
extern int guestfs_sleep (guestfs_h *handle, int secs);
+extern int guestfs_ntfs_3g_probe (guestfs_h *handle, int rw, const char *device);
}
bool_t
+xdr_guestfs_ntfs_3g_probe_args (XDR *xdrs, guestfs_ntfs_3g_probe_args *objp)
+{
+ register int32_t *buf;
+
+ if (!xdr_bool (xdrs, &objp->rw))
+ return FALSE;
+ if (!xdr_string (xdrs, &objp->device, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_guestfs_ntfs_3g_probe_ret (XDR *xdrs, guestfs_ntfs_3g_probe_ret *objp)
+{
+ register int32_t *buf;
+
+ if (!xdr_int (xdrs, &objp->status))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
xdr_guestfs_procedure (XDR *xdrs, guestfs_procedure *objp)
{
register int32_t *buf;
};
typedef struct guestfs_sleep_args guestfs_sleep_args;
+struct guestfs_ntfs_3g_probe_args {
+ bool_t rw;
+ char *device;
+};
+typedef struct guestfs_ntfs_3g_probe_args guestfs_ntfs_3g_probe_args;
+
+struct guestfs_ntfs_3g_probe_ret {
+ int status;
+};
+typedef struct guestfs_ntfs_3g_probe_ret guestfs_ntfs_3g_probe_ret;
+
enum guestfs_procedure {
GUESTFS_PROC_MOUNT = 1,
GUESTFS_PROC_SYNC = 2,
GUESTFS_PROC_FIND = 107,
GUESTFS_PROC_E2FSCK_F = 108,
GUESTFS_PROC_SLEEP = 109,
- GUESTFS_PROC_NR_PROCS = 109 + 1,
+ GUESTFS_PROC_NTFS_3G_PROBE = 110,
+ GUESTFS_PROC_NR_PROCS = 110 + 1,
};
typedef enum guestfs_procedure guestfs_procedure;
#define GUESTFS_MESSAGE_MAX 4194304
extern bool_t xdr_guestfs_find_ret (XDR *, guestfs_find_ret*);
extern bool_t xdr_guestfs_e2fsck_f_args (XDR *, guestfs_e2fsck_f_args*);
extern bool_t xdr_guestfs_sleep_args (XDR *, guestfs_sleep_args*);
+extern bool_t xdr_guestfs_ntfs_3g_probe_args (XDR *, guestfs_ntfs_3g_probe_args*);
+extern bool_t xdr_guestfs_ntfs_3g_probe_ret (XDR *, guestfs_ntfs_3g_probe_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_find_ret ();
extern bool_t xdr_guestfs_e2fsck_f_args ();
extern bool_t xdr_guestfs_sleep_args ();
+extern bool_t xdr_guestfs_ntfs_3g_probe_args ();
+extern bool_t xdr_guestfs_ntfs_3g_probe_ret ();
extern bool_t xdr_guestfs_procedure ();
extern bool_t xdr_guestfs_message_direction ();
extern bool_t xdr_guestfs_message_status ();
int secs;
};
+struct guestfs_ntfs_3g_probe_args {
+ bool rw;
+ string device<>;
+};
+
+struct guestfs_ntfs_3g_probe_ret {
+ int status;
+};
+
enum guestfs_procedure {
GUESTFS_PROC_MOUNT = 1,
GUESTFS_PROC_SYNC = 2,
GUESTFS_PROC_FIND = 107,
GUESTFS_PROC_E2FSCK_F = 108,
GUESTFS_PROC_SLEEP = 109,
+ GUESTFS_PROC_NTFS_3G_PROBE = 110,
GUESTFS_PROC_NR_PROCS
};