From 41885daa5bef4af4494706f5c9a2192a6fd22e68 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 30 Aug 2005 15:32:09 +0000 Subject: [PATCH] 2005-08-30 Bastien Nocera * test/nmtestdevices.c: (print_usage), (main): Check the number of arguments, and fix a typo git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@910 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 5 +++++ test/nmtestdevices.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 92ecfc2005..781364d278 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-08-30 Bastien Nocera + + * test/nmtestdevices.c: (print_usage), (main): + Check the number of arguments, and fix a typo + 2005-08-29 Dan Williams Patch from Dumitru Ciobarcianu diff --git a/test/nmtestdevices.c b/test/nmtestdevices.c index 0515157e28..93188ad039 100644 --- a/test/nmtestdevices.c +++ b/test/nmtestdevices.c @@ -176,7 +176,7 @@ static void print_usage (void) "This tool allows you to tell NetworkManager to create and manipulate fake 'test' devices. This\n" "is useful in sitation where you may not have a particular device but still want to test\n" "NetworkManager out with it (For example, you forgot your wireless card at home and now you're\n" - "taking a trip and want to hack on NM, and you're on a plane so you could use the wireless\n" + "taking a trip and want to hack on NM, and you're on a plane so you couldn't use the wireless\n" "card anyway).\n" "\n"); } @@ -193,6 +193,11 @@ int main( int argc, char *argv[] ) gboolean make_link_inactive = FALSE; NMDeviceType dev_type = DEVICE_TYPE_DONT_KNOW; + if (argc < 2) { + print_usage (); + exit (0); + } + /* Parse options */ while (1) {