summaryrefslogtreecommitdiff
path: root/sutils
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2002-03-26 19:10:17 +0000
committerNeal H. Walfield <neal@gnu.org>2002-03-26 19:10:17 +0000
commit927bf1d75bca2da6dee691ec851a5d6cec40125c (patch)
tree8b8105f548598dd3ac0ecf68ff4fe6ca3102a72e /sutils
parent4ba5bfd888ec829ea12a2334fd29c3fe7046fba2 (diff)
2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>
* halt.c (main): Use error, not perror. * reboot.c (main): Likewise. * update.c (main): Use error, not perror and exit.
Diffstat (limited to 'sutils')
-rw-r--r--sutils/halt.c4
-rw-r--r--sutils/reboot.c4
-rw-r--r--sutils/update.c7
3 files changed, 6 insertions, 9 deletions
diff --git a/sutils/halt.c b/sutils/halt.c
index 01f06b4f..c108872e 100644
--- a/sutils/halt.c
+++ b/sutils/halt.c
@@ -1,5 +1,5 @@
/* Halt the system
- Copyright (C) 1994, 1996, 1997 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.
@@ -34,6 +34,6 @@ 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;
}
diff --git a/sutils/reboot.c b/sutils/reboot.c
index 715dc90c..5bfaf20c 100644
--- a/sutils/reboot.c
+++ b/sutils/reboot.c
@@ -1,5 +1,5 @@
/* Reboot the system
- Copyright (C) 1994, 1996, 1997 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.
@@ -34,6 +34,6 @@ 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");
+ error (1, errno, "reboot");
return 1;
}
diff --git a/sutils/update.c b/sutils/update.c
index 0342824f..c1f4e982 100644
--- a/sutils/update.c
+++ b/sutils/update.c
@@ -1,5 +1,5 @@
/* Periodically call sync.
- Copyright (C) 1994 Free Software Foundation, Inc.
+ Copyright (C) 1994, 2002 Free Software Foundation, Inc.
Written by Michael I. Bushnell.
This file is part of the GNU Hurd.
@@ -41,10 +41,7 @@ main (int argc, char **argv)
}
if (daemon (0, 0))
- {
- perror ("daemon");
- exit (1);
- }
+ error (1, errno, "daemon");
for (;;)
{