mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-31 17:05:16 +00:00
tools: fix ordering mistake in virt-admin daemon-set-timeout code
Most of the impl for the 'daemon-set-timeout' command was ordered under the heading for the 'daemon-log-filters' command. Reviewed-by: Martin Kletzander <mkletzan@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
fc3a60d9d7
commit
d12e937f47
@ -1005,41 +1005,6 @@ static const vshCmdInfo info_daemon_log_outputs = {
|
||||
"daemon."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_daemon_timeout[] = {
|
||||
{.name = "timeout",
|
||||
.type = VSH_OT_INT,
|
||||
.required = true,
|
||||
.positional = true,
|
||||
.help = N_("number of seconds the daemon will run without any active connection"),
|
||||
},
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
static bool
|
||||
cmdDaemonTimeout(vshControl *ctl, const vshCmd *cmd)
|
||||
{
|
||||
vshAdmControl *priv = ctl->privData;
|
||||
unsigned int timeout = 0;
|
||||
|
||||
if (vshCommandOptUInt(ctl, cmd, "timeout", &timeout) < 0)
|
||||
return false;
|
||||
|
||||
if (virAdmConnectSetDaemonTimeout(priv->conn, timeout, 0) < 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/* --------------------------
|
||||
* Command daemon-timeout
|
||||
* --------------------------
|
||||
*/
|
||||
static const vshCmdInfo info_daemon_timeout = {
|
||||
.help = N_("set the auto shutdown timeout of the daemon"),
|
||||
.desc = N_("set the auto shutdown timeout of the daemon"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_daemon_log_outputs[] = {
|
||||
{.name = "outputs",
|
||||
.type = VSH_OT_STRING,
|
||||
@ -1076,6 +1041,42 @@ cmdDaemonLogOutputs(vshControl *ctl, const vshCmd *cmd)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/* --------------------------
|
||||
* Command daemon-timeout
|
||||
* --------------------------
|
||||
*/
|
||||
static const vshCmdInfo info_daemon_timeout = {
|
||||
.help = N_("set the auto shutdown timeout of the daemon"),
|
||||
.desc = N_("set the auto shutdown timeout of the daemon"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_daemon_timeout[] = {
|
||||
{.name = "timeout",
|
||||
.type = VSH_OT_INT,
|
||||
.required = true,
|
||||
.positional = true,
|
||||
.help = N_("number of seconds the daemon will run without any active connection"),
|
||||
},
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
static bool
|
||||
cmdDaemonTimeout(vshControl *ctl, const vshCmd *cmd)
|
||||
{
|
||||
vshAdmControl *priv = ctl->privData;
|
||||
unsigned int timeout = 0;
|
||||
|
||||
if (vshCommandOptUInt(ctl, cmd, "timeout", &timeout) < 0)
|
||||
return false;
|
||||
|
||||
if (virAdmConnectSetDaemonTimeout(priv->conn, timeout, 0) < 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static void *
|
||||
vshAdmConnectionHandler(vshControl *ctl)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user