aboutsummaryrefslogtreecommitdiff
path: root/src/copyout.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2014-01-30 13:00:58 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2014-01-30 13:00:58 +0200
commit9e2d258c81af9f8cedba2e4b8874fbaea59b43c4 (patch)
treed470f085625c6434d4661b185c981f8065c14d3c /src/copyout.c
parenta3987da2a573bd2438f15df6faa680922025be18 (diff)
downloadcpio-9e2d258c81af9f8cedba2e4b8874fbaea59b43c4.tar.gz
cpio-9e2d258c81af9f8cedba2e4b8874fbaea59b43c4.tar.bz2
Use exit codes consistenly.
Diffstat (limited to 'src/copyout.c')
-rw-r--r--src/copyout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/copyout.c b/src/copyout.c
index a5a8931..63785ff 100644
--- a/src/copyout.c
+++ b/src/copyout.c
@@ -48,7 +48,7 @@ read_for_checksum (int in_file_des, int file_size, char *file_name)
{
bytes_read = read (in_file_des, buf, BUFSIZ);
if (bytes_read < 0)
- error (1, errno, _("cannot read checksum for %s"), file_name);
+ error (PAXEXIT_FAILURE, errno, _("cannot read checksum for %s"), file_name);
if (bytes_read == 0)
break;
if (bytes_left < bytes_read)
@@ -57,7 +57,7 @@ read_for_checksum (int in_file_des, int file_size, char *file_name)
crc += buf[i] & 0xff;
}
if (lseek (in_file_des, 0L, SEEK_SET))
- error (1, errno, _("cannot read checksum for %s"), file_name);
+ error (PAXEXIT_FAILURE, errno, _("cannot read checksum for %s"), file_name);
return crc;
}
@@ -606,7 +606,7 @@ process_copy_out ()
else
{
if (fstat (out_file_des, &file_stat))
- error (1, errno, _("standard output is closed"));
+ error (PAXEXIT_FAILURE, errno, _("standard output is closed"));
output_is_special =
#ifdef S_ISBLK
S_ISBLK (file_stat.st_mode) ||

Return to:

Send suggestions and report system problems to the System administrator.