summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-03-12 14:44:27 +0100
committerJiří Klimeš <jklimes@redhat.com>2014-03-31 08:37:10 +0200
commit0a85bff70a65d5a205b56bc9f74fc2b0237ad05a (patch)
tree25d31f76410339d9acb33bbbbf218a36ce8fd89c
parentea962ce4112ccf3b25efe5b9661c1a48090dc4e4 (diff)
downloadNetworkManager-0a85bff70a65d5a205b56bc9f74fc2b0237ad05a.tar.gz
nm-online: fix considering the --quiet option
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--test/nm-online.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/nm-online.c b/test/nm-online.c
index 25a195f994..581a99e3d2 100644
--- a/test/nm-online.c
+++ b/test/nm-online.c
@@ -106,7 +106,6 @@ main (int argc, char *argv[])
{
gint t_secs = -1;
gboolean exit_no_nm = FALSE;
- gboolean quiet = FALSE;
gboolean wait_startup = FALSE;
Timeout timeout;
GOptionContext *opt_ctx = NULL;
@@ -118,11 +117,13 @@ main (int argc, char *argv[])
GOptionEntry options[] = {
{"timeout", 't', 0, G_OPTION_ARG_INT, &t_secs, N_("Time to wait for a connection, in seconds (without the option, default value is 30)"), "<timeout>"},
{"exit", 'x', 0, G_OPTION_ARG_NONE, &exit_no_nm, N_("Exit immediately if NetworkManager is not running or connecting"), NULL},
- {"quiet", 'q', 0, G_OPTION_ARG_NONE, &quiet, N_("Don't print anything"), NULL},
+ {"quiet", 'q', 0, G_OPTION_ARG_NONE, &timeout.quiet, N_("Don't print anything"), NULL},
{"wait-for-startup", 's', 0, G_OPTION_ARG_NONE, &wait_startup, N_("Wait for NetworkManager startup instead of a connection"), NULL},
{NULL}
};
+ timeout.quiet = FALSE;
+
/* Set locale to be able to use environment variables */
setlocale (LC_ALL, "");