aboutsummaryrefslogtreecommitdiff
path: root/sutils/halt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sutils/halt.c')
-rw-r--r--sutils/halt.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sutils/halt.c b/sutils/halt.c
index 2d9c1a18..08f754c4 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, 1997, 2002 Free Software Foundation, Inc.
Written by Michael I. Bushnell.
This file is part of the GNU Hurd.
@@ -22,11 +22,19 @@
#include <sys/reboot.h>
#include <unistd.h>
#include <stdio.h>
+#include <argp.h>
+#include <error.h>
+#include <hurd.h>
+#include <version.h>
+
+const char *argp_program_version = STANDARD_HURD_VERSION (halt);
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");
+ error (1, errno, "reboot");
return 1;
}