summaryrefslogtreecommitdiff
path: root/bin/pax/buf_subs.c
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-06-11 06:41:56 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-06-11 06:41:56 +0000
commit8a9719310ac5463126ef3eec984d2d38f58e851e (patch)
tree7eeb0f7c13108018057e83b9666bc315c747c21e /bin/pax/buf_subs.c
parent8db8a379747ee056c46b16e020c29c8a5829e357 (diff)
Correct compile warnings
Rename warn() to paxwarn() so <err.h> can be included Remove #include <ctype.h> when not needed; from FreeBSD
Diffstat (limited to 'bin/pax/buf_subs.c')
-rw-r--r--bin/pax/buf_subs.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/bin/pax/buf_subs.c b/bin/pax/buf_subs.c
index b627096f2f5..2f8cbc6152c 100644
--- a/bin/pax/buf_subs.c
+++ b/bin/pax/buf_subs.c
@@ -50,7 +50,6 @@ static char rcsid[] = "$NetBSD: buf_subs.c,v 1.5 1995/03/21 09:07:08 cgd Exp $";
#include <sys/stat.h>
#include <sys/param.h>
#include <stdio.h>
-#include <ctype.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
@@ -108,12 +107,12 @@ wr_start()
if (!wrblksz)
wrblksz = frmt->bsz;
if (wrblksz > MAXBLK) {
- warn(1, "Write block size of %d too large, maximium is: %d",
+ paxwarn(1, "Write block size of %d too large, maximium is: %d",
wrblksz, MAXBLK);
return(-1);
}
if (wrblksz % BLKMULT) {
- warn(1, "Write block size of %d is not a %d byte multiple",
+ paxwarn(1, "Write block size of %d is not a %d byte multiple",
wrblksz, BLKMULT);
return(-1);
}
@@ -153,12 +152,12 @@ rd_start()
buf = &(bufmem[BLKMULT]);
if ((act == APPND) && wrblksz) {
if (wrblksz > MAXBLK) {
- warn(1,"Write block size %d too large, maximium is: %d",
+ paxwarn(1,"Write block size %d too large, maximium is: %d",
wrblksz, MAXBLK);
return(-1);
}
if (wrblksz % BLKMULT) {
- warn(1, "Write block size %d is not a %d byte multiple",
+ paxwarn(1, "Write block size %d is not a %d byte multiple",
wrblksz, BLKMULT);
return(-1);
}
@@ -237,7 +236,7 @@ appnd_start(skcnt)
off_t cnt;
if (exit_val != 0) {
- warn(0, "Cannot append to an archive that may have flaws.");
+ paxwarn(0, "Cannot append to an archive that may have flaws.");
return(-1);
}
/*
@@ -314,7 +313,7 @@ appnd_start(skcnt)
return(0);
out:
- warn(1, "Unable to rewrite archive trailer, cannot append.");
+ paxwarn(1, "Unable to rewrite archive trailer, cannot append.");
return(-1);
}
@@ -346,7 +345,7 @@ rd_sync()
if (maxflt == 0)
return(-1);
if (act == APPND) {
- warn(1, "Unable to append when there are archive read errors.");
+ paxwarn(1, "Unable to append when there are archive read errors.");
return(-1);
}
@@ -380,7 +379,7 @@ rd_sync()
* can extract out of the archive.
*/
if ((maxflt > 0) && (++errcnt > maxflt))
- warn(0,"Archive read error limit (%d) reached",maxflt);
+ paxwarn(0,"Archive read error limit (%d) reached",maxflt);
else if (ar_rdsync() == 0)
continue;
if (ar_next() < 0)
@@ -707,11 +706,11 @@ wr_rdfile(arcn, ifd, left)
if (res < 0)
syswarn(1, errno, "Read fault on %s", arcn->org_name);
else if (size != 0L)
- warn(1, "File changed size during read %s", arcn->org_name);
+ paxwarn(1, "File changed size during read %s", arcn->org_name);
else if (fstat(ifd, &sb) < 0)
syswarn(1, errno, "Failed stat on %s", arcn->org_name);
else if (arcn->sb.st_mtime != sb.st_mtime)
- warn(1, "File %s was modified during copy to archive",
+ paxwarn(1, "File %s was modified during copy to archive",
arcn->org_name);
*left = size;
return(0);
@@ -822,7 +821,7 @@ rd_wrfile(arcn, ofd, left)
* calculated crc to the crc stored in the archive
*/
if (docrc && (size == 0L) && (arcn->crc != crc))
- warn(1,"Actual crc does not match expected crc %s",arcn->name);
+ paxwarn(1,"Actual crc does not match expected crc %s",arcn->name);
return(0);
}
@@ -894,12 +893,12 @@ cp_file(arcn, fd1, fd2)
syswarn(1, errno, "Failed write during copy of %s to %s",
arcn->org_name, arcn->name);
else if (cpcnt != arcn->sb.st_size)
- warn(1, "File %s changed size during copy to %s",
+ paxwarn(1, "File %s changed size during copy to %s",
arcn->org_name, arcn->name);
else if (fstat(fd1, &sb) < 0)
syswarn(1, errno, "Failed stat of %s", arcn->org_name);
else if (arcn->sb.st_mtime != sb.st_mtime)
- warn(1, "File %s was modified during copy to %s",
+ paxwarn(1, "File %s was modified during copy to %s",
arcn->org_name, arcn->name);
/*
@@ -992,7 +991,7 @@ buf_flush(bufcnt)
* at least one record. We always round limit UP to next blocksize.
*/
if ((wrlimit > 0) && (wrcnt > wrlimit)) {
- warn(0, "User specified archive volume byte limit reached.");
+ paxwarn(0, "User specified archive volume byte limit reached.");
if (ar_next() < 0) {
wrcnt = 0;
exit_val = 1;