diff options
| author | Richard Jones <rjones@trick.home.annexia.org> | 2009-09-22 19:52:56 +0100 |
|---|---|---|
| committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-09-23 11:18:45 +0100 |
| commit | 3bc55551356532c17403508dfd8466beb2b9db1e (patch) | |
| tree | 7c92379351e2087adc1cfaca550318e6e60b7bc4 /src/generator.ml | |
| parent | d186e9d3d371162774d026f85823d9615ac3bbbc (diff) | |
| download | libguestfs-3bc55551356532c17403508dfd8466beb2b9db1e.tar.gz libguestfs-3bc55551356532c17403508dfd8466beb2b9db1e.tar.xz libguestfs-3bc55551356532c17403508dfd8466beb2b9db1e.zip | |
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 is used to implement virt-rescue.
Diffstat (limited to 'src/generator.ml')
| -rwxr-xr-x | src/generator.ml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/generator.ml b/src/generator.ml index e5e2681f..1dd8b206 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -808,6 +808,31 @@ C<LIBGUESTFS_TRACE> is defined and set to C<1>."); "\ Return the command trace flag."); + ("set_direct", (RErr, [Bool "direct"]), -1, [FishAlias "direct"], + [InitNone, Always, TestOutputFalse ( + [["set_direct"; "false"]; + ["get_direct"]])], + "enable or disable direct appliance mode", + "\ +If the direct appliance mode flag is enabled, then stdin and +stdout are passed directly through to the appliance once it +is launched. + +One consequence of this is that log messages aren't caught +by the library and handled by C<guestfs_set_log_message_callback>, +but go straight to stdout. + +You probably don't want to use this unless you know what you +are doing. + +The default is disabled."); + + ("get_direct", (RBool "direct", []), -1, [], + [], + "get direct appliance mode flag", + "\ +Return the direct appliance mode flag."); + ] (* daemon_functions are any functions which cause some action |
