/*
* virsh-console.c: A dumb serial console client
*
- * Copyright (C) 2007-2008, 2010-2013 Red Hat, Inc.
+ * Copyright (C) 2007-2008, 2010-2014 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
};
-static int got_signal = 0;
static void
virConsoleHandleSignal(int sig ATTRIBUTE_UNUSED)
{
- got_signal = 1;
}
/* Trap all common signals so that we can safely restore the original
* terminal settings on STDIN before the process exits - people don't like
* being left with a messed up terminal ! */
- got_signal = 0;
sigaction(SIGQUIT, &sighandler, &old_sigquit);
sigaction(SIGTERM, &sighandler, &old_sigterm);
sigaction(SIGINT, &sighandler, &old_sigint);
fflush(stderr);
}
-static volatile sig_atomic_t intCaught = 0;
+static volatile sig_atomic_t intCaught;
static void vshCatchInt(int sig ATTRIBUTE_UNUSED,
siginfo_t *siginfo ATTRIBUTE_UNUSED,
/*
* Detection of disconnections and automatic reconnection support
*/
-static int disconnected = 0; /* we may have been disconnected */
+static int disconnected; /* we may have been disconnected */
/*
* vshCatchDisconnect:
vshReadlineOptionsGenerator(const char *text, int state)
{
static int list_index, len;
- static const vshCmdDef *cmd = NULL;
+ static const vshCmdDef *cmd;
const char *name;
if (!state) {
/*
* virt-host-validate-common.c: Sanity check helper APIs
*
- * Copyright (C) 2012 Red Hat, Inc.
+ * Copyright (C) 2012, 2014 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
static bool virHostMsgWantEscape(void)
{
static bool detectTty = true;
- static bool wantEscape = false;
+ static bool wantEscape;
if (detectTty) {
if (isatty(STDOUT_FILENO))
wantEscape = true;