summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: af263d7)
raw | patch | inline | side by side (parent: af263d7)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 6 Jun 2009 19:21:28 +0000 (21:21 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 16 Jul 2009 16:53:34 +0000 (18:53 +0200) |
src/oping.c | patch | blob | history |
diff --git a/src/oping.c b/src/oping.c
index 0ef6ec662dc5213ff6398d9bcb0c2d09d630426f..a1dbade1f22af3d573f42d330a9b37b7b8f100dd 100644 (file)
--- a/src/oping.c
+++ b/src/oping.c
free (context);
}
-static void usage_exit (const char *name)
+static void usage_exit (const char *name, int status)
{
int name_length;
"by Florian octo Forster <octo@verplant.org>\n"
"for contributions see `AUTHORS'\n",
name);
- exit (1);
+ exit (status);
}
static int read_options (int argc, char **argv)
}
case 'h':
+ usage_exit (argv[0], 0);
+ break;
default:
- usage_exit (argv[0]);
+ usage_exit (argv[0], 1);
}
}
optind = read_options (argc, argv);
if ((optind >= argc) && (opt_filename == NULL)) {
- usage_exit (argv[0]);
+ usage_exit (argv[0], 1);
}
if (geteuid () != 0)