Richard W.M. Jones wrote:
Subject: [PATCH 2/3] Add direct appliance mode flag and
implementation.
When the g->direct flag is set, the appliance stdin/stdout
are not connected to the library. Instead they inherit the
stdin/stdout of the caller.
THis looks fine. ACK
...
diff --git a/src/guestfs.c b/src/guestfs.c
index 6eafcf5..03089ea 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -119,6 +119,7 @@ struct guestfs_h
int verbose;
int trace;
int autosync;
+ int direct;
char *path; /* Path to kernel, initrd. */
char *qemu; /* Qemu binary. */
@@ -651,6 +652,19 @@ guestfs__get_trace (guestfs_h *g)
return g->trace;
}
+int
+guestfs__set_direct (guestfs_h *g, int d)
+{
+ g->direct = !!d;
+ return 0;
+}
+
+int
+guestfs__get_direct (guestfs_h *g)
+{
+ return g->direct;
+}
Probably of only marginal benefit (who has const guestfs_h* pointers?),
but at least from its definition, you can see that this parameter
can be "const".