summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'daemon')
-rw-r--r--daemon/actions.h1
-rw-r--r--daemon/stubs.c29
2 files changed, 30 insertions, 0 deletions
diff --git a/daemon/actions.h b/daemon/actions.h
index 8c3c5fe0..1d412dcc 100644
--- a/daemon/actions.h
+++ b/daemon/actions.h
@@ -149,3 +149,4 @@ 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);
+extern int do_mount_loop (char *file, char *mountpoint);
diff --git a/daemon/stubs.c b/daemon/stubs.c
index 294d9e68..6d7cb0e7 100644
--- a/daemon/stubs.c
+++ b/daemon/stubs.c
@@ -3233,6 +3233,32 @@ done:
xdr_free ((xdrproc_t) xdr_guestfs_initrd_list_args, (char *) &args);
}
+static void mount_loop_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_mount_loop_args args;
+ char *file;
+ char *mountpoint;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_mount_loop_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "mount_loop");
+ return;
+ }
+ file = args.file;
+ mountpoint = args.mountpoint;
+
+ r = do_mount_loop (file, mountpoint);
+ if (r == -1)
+ /* do_mount_loop has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_mount_loop_args, (char *) &args);
+}
+
void dispatch_incoming_message (XDR *xdr_in)
{
switch (proc_nr) {
@@ -3620,6 +3646,9 @@ void dispatch_incoming_message (XDR *xdr_in)
case GUESTFS_PROC_INITRD_LIST:
initrd_list_stub (xdr_in);
break;
+ case GUESTFS_PROC_MOUNT_LOOP:
+ mount_loop_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);
}