mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
generator: Deprecate direct mode (guestfs_set_direct, guestfs_get_direct).
This commit is contained in:
@@ -259,34 +259,6 @@ C<guestfs_set_event_callback>)." };
|
||||
longdesc = "\
|
||||
Return the command trace flag." };
|
||||
|
||||
{ defaults with
|
||||
name = "set_direct"; added = (1, 0, 72);
|
||||
style = RErr, [Bool "direct"], [];
|
||||
fish_alias = ["direct"]; config_only = true;
|
||||
blocking = false;
|
||||
shortdesc = "enable or disable direct appliance mode";
|
||||
longdesc = "\
|
||||
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." };
|
||||
|
||||
{ defaults with
|
||||
name = "get_direct"; added = (1, 0, 72);
|
||||
style = RBool "direct", [], [];
|
||||
blocking = false;
|
||||
shortdesc = "get direct appliance mode flag";
|
||||
longdesc = "\
|
||||
Return the direct appliance mode flag." };
|
||||
|
||||
{ defaults with
|
||||
name = "set_recovery_proc"; added = (1, 0, 77);
|
||||
style = RErr, [Bool "recoveryproc"], [];
|
||||
|
||||
@@ -125,6 +125,36 @@ Return the current backend.
|
||||
|
||||
See C<guestfs_set_backend> and L<guestfs(3)/BACKEND>." };
|
||||
|
||||
{ defaults with
|
||||
name = "set_direct"; added = (1, 0, 72);
|
||||
style = RErr, [Bool "direct"], [];
|
||||
deprecated_by = Deprecated_no_replacement;
|
||||
fish_alias = ["direct"]; config_only = true;
|
||||
blocking = false;
|
||||
shortdesc = "enable or disable direct appliance mode";
|
||||
longdesc = "\
|
||||
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." };
|
||||
|
||||
{ defaults with
|
||||
name = "get_direct"; added = (1, 0, 72);
|
||||
style = RBool "direct", [], [];
|
||||
deprecated_by = Deprecated_no_replacement;
|
||||
blocking = false;
|
||||
shortdesc = "get direct appliance mode flag";
|
||||
longdesc = "\
|
||||
Return the direct appliance mode flag." };
|
||||
|
||||
]
|
||||
|
||||
let daemon_functions = [
|
||||
|
||||
@@ -295,9 +295,12 @@ main (int argc, char *argv[])
|
||||
usage (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
/* Setting "direct mode" is required for the rescue appliance. */
|
||||
if (guestfs_set_direct (g, 1) == -1)
|
||||
exit (EXIT_FAILURE);
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
{
|
||||
/* The libvirt backend doesn't support direct mode. As a temporary
|
||||
|
||||
@@ -224,7 +224,6 @@ main (int argc, char *argv[])
|
||||
p = guestfs_get_cachedir (g);
|
||||
printf ("guestfs_get_cachedir: %s\n", p ? : "(null)");
|
||||
free (p);
|
||||
printf ("guestfs_get_direct: %d\n", guestfs_get_direct (g));
|
||||
p = guestfs_get_hv (g);
|
||||
printf ("guestfs_get_hv: %s\n", p);
|
||||
free (p);
|
||||
|
||||
Reference in New Issue
Block a user