diff options
author | Miles Bader <miles@gnu.org> | 1996-08-27 16:29:52 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-08-27 16:29:52 +0000 |
commit | 47c4b8a19670e9b3b72ca70668d5e340e1deaeec (patch) | |
tree | df7b64c4c56cb03d7a38704a7d52fc417c42afeb | |
parent | 07b72b01f6fc9ff4074f3b984554497a44e199fd (diff) |
(main): Add argument parsing.
(argp_program_version): New variable.
<argp.h>, <hurd.h>: New includes.
-rw-r--r-- | sutils/halt.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sutils/halt.c b/sutils/halt.c index 2d9c1a18..824934b9 100644 --- a/sutils/halt.c +++ b/sutils/halt.c @@ -1,5 +1,5 @@ /* Halt the system - Copyright (C) 1994 Free Software Foundation, Inc. + Copyright (C) 1994, 1996 Free Software Foundation, Inc. Written by Michael I. Bushnell. This file is part of the GNU Hurd. @@ -22,10 +22,16 @@ #include <sys/reboot.h> #include <unistd.h> #include <stdio.h> +#include <argp.h> +#include <hurd.h> + +char *argp_program_version = "halt 1.1 (GNU " HURD_RELEASE ")"; int -main (void) +main (int argc, char *argv[]) { + struct argp argp = {0, 0, 0, "Halt the system"}; + argp_parse (&argp, argc, argv, 0, 0, 0); reboot (RB_HALT); perror ("reboot"); return 1; |