diff options
author | Jim Meyering <jim@meyering.net> | 2002-08-30 23:04:53 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-08-30 23:04:53 +0000 |
commit | 74887031996e79df07dae9711f08d80839b31e62 (patch) | |
tree | d249c7ea293b5540ca108f3b40733401544b29ba /src/mknod.c | |
parent | 6c80ecd8d5d3a0642f8cf321f9750f50314ea939 (diff) | |
download | coreutils-74887031996e79df07dae9711f08d80839b31e62.tar.gz coreutils-74887031996e79df07dae9711f08d80839b31e62.tar.bz2 coreutils-74887031996e79df07dae9711f08d80839b31e62.zip |
Change `error (1, ...' to `error (EXIT_FAILURE, ...'.
Diffstat (limited to 'src/mknod.c')
-rw-r--r-- | src/mknod.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mknod.c b/src/mknod.c index 104426dad..66ccba06a 100644 --- a/src/mknod.c +++ b/src/mknod.c @@ -1,5 +1,5 @@ /* mknod -- make special files - Copyright (C) 90, 91, 1995-2001 Free Software Foundation, Inc. + Copyright (C) 90, 91, 1995-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -128,7 +128,7 @@ main (int argc, char **argv) newmode &= ~ umask (0); change = mode_compile (specified_mode, 0); if (change == MODE_INVALID) - error (1, 0, _("invalid mode")); + error (EXIT_FAILURE, 0, _("invalid mode")); else if (change == MODE_MEMORY_EXHAUSTED) xalloc_die (); newmode = mode_adjust (newmode, change); @@ -186,20 +186,22 @@ numbers must be specified")); if (xstrtoumax (s_major, NULL, 0, &i_major, NULL) != LONGINT_OK || i_major != (major_t) i_major) - error (1, 0, _("invalid major device number %s"), quote (s_major)); + error (EXIT_FAILURE, 0, + _("invalid major device number %s"), quote (s_major)); if (xstrtoumax (s_minor, NULL, 0, &i_minor, NULL) != LONGINT_OK || i_minor != (minor_t) i_minor) - error (1, 0, _("invalid minor device number %s"), quote (s_minor)); + error (EXIT_FAILURE, 0, + _("invalid minor device number %s"), quote (s_minor)); device = makedev (i_major, i_minor); #ifdef NODEV if (device == NODEV) - error (1, 0, _("invalid device %s %s"), s_major, s_minor); + error (EXIT_FAILURE, 0, _("invalid device %s %s"), s_major, s_minor); #endif if (mknod (argv[optind], newmode | node_type, device) != 0) - error (1, errno, "%s", quote (argv[optind])); + error (EXIT_FAILURE, errno, "%s", quote (argv[optind])); } break; @@ -214,7 +216,7 @@ major and minor device numbers may not be specified for fifo files")); usage (1); } if (mkfifo (argv[optind], newmode)) - error (1, errno, "%s", quote (argv[optind])); + error (EXIT_FAILURE, errno, "%s", quote (argv[optind])); #endif break; |