summaryrefslogtreecommitdiff
path: root/sutils/reboot.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-08-27 16:34:21 +0000
committerMiles Bader <miles@gnu.org>1996-08-27 16:34:21 +0000
commite56099438e19a404453beb1f1022a24c3505f769 (patch)
treece3b383dbb2df9929200e1cc3bd339b8128fef23 /sutils/reboot.c
parent47c4b8a19670e9b3b72ca70668d5e340e1deaeec (diff)
(main): Add argument parsing.
(argp_program_version): New variable. <argp.h>, <hurd.h>: New includes.
Diffstat (limited to 'sutils/reboot.c')
-rw-r--r--sutils/reboot.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sutils/reboot.c b/sutils/reboot.c
index 7844ba06..4d4269af 100644
--- a/sutils/reboot.c
+++ b/sutils/reboot.c
@@ -1,5 +1,5 @@
/* Reboot 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,15 +22,17 @@
#include <sys/reboot.h>
#include <unistd.h>
#include <stdio.h>
+#include <argp.h>
+#include <hurd.h>
+
+char *argp_program_version = "reboot 1.1 (GNU " HURD_RELEASE ")";
int
-main (void)
+main (int argc, char *argv[])
{
+ struct argp argp = {0, 0, 0, "Reboot the system"};
+ argp_parse (&argp, argc, argv, 0, 0, 0);
reboot (0);
perror ("reboot");
return 1;
}
-
-
-
-