summaryrefslogtreecommitdiffstats
path: root/bin/pax
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>1997-08-29 16:12:30 +0000
committersos <sos@FreeBSD.org>1997-08-29 16:12:30 +0000
commit99b7368a45a052dfe4e61148f2b7f949d35a2008 (patch)
tree7b110c0e5096d1a7b6e8d31b77e1196ec3b5eced /bin/pax
parent9dc7e3f1c1ec2ca42b3a1763f7616851497c14d3 (diff)
downloadFreeBSD-src-99b7368a45a052dfe4e61148f2b7f949d35a2008.zip
FreeBSD-src-99b7368a45a052dfe4e61148f2b7f949d35a2008.tar.gz
Dont have an internal function named "warn" it clashes with libc..
Needed for ELF.
Diffstat (limited to 'bin/pax')
-rw-r--r--bin/pax/ar_io.c76
-rw-r--r--bin/pax/ar_subs.c30
-rw-r--r--bin/pax/buf_subs.c46
-rw-r--r--bin/pax/cache.c10
-rw-r--r--bin/pax/cpio.c38
-rw-r--r--bin/pax/extern.h6
-rw-r--r--bin/pax/file_subs.c58
-rw-r--r--bin/pax/ftree.c28
-rw-r--r--bin/pax/options.c30
-rw-r--r--bin/pax/pat_rep.c30
-rw-r--r--bin/pax/pax.c10
-rw-r--r--bin/pax/sel_subs.c30
-rw-r--r--bin/pax/tables.c48
-rw-r--r--bin/pax/tar.c34
-rw-r--r--bin/pax/tty_subs.c20
15 files changed, 247 insertions, 247 deletions
diff --git a/bin/pax/ar_io.c b/bin/pax/ar_io.c
index 3bf0bdc..8cb5a3b 100644
--- a/bin/pax/ar_io.c
+++ b/bin/pax/ar_io.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: ar_io.c,v 1.7 1997/02/22 14:04:17 peter Exp $
*/
#ifndef lint
@@ -120,14 +120,14 @@ ar_open(name)
arfd = STDIN_FILENO;
arcname = STDN;
} else if ((arfd = open(name, EXT_MODE, DMOD)) < 0)
- syswarn(0, errno, "Failed open to read on %s", name);
+ sys_warn(0, errno, "Failed open to read on %s", name);
break;
case ARCHIVE:
if (name == NULL) {
arfd = STDOUT_FILENO;
arcname = STDO;
} else if ((arfd = open(name, AR_MODE, DMOD)) < 0)
- syswarn(0, errno, "Failed open to write on %s", name);
+ sys_warn(0, errno, "Failed open to write on %s", name);
else
can_unlnk = 1;
break;
@@ -136,7 +136,7 @@ ar_open(name)
arfd = STDOUT_FILENO;
arcname = STDO;
} else if ((arfd = open(name, APP_MODE, DMOD)) < 0)
- syswarn(0, errno, "Failed open to read/write on %s",
+ sys_warn(0, errno, "Failed open to read/write on %s",
name);
break;
case COPY:
@@ -154,14 +154,14 @@ ar_open(name)
* set up is based on device type
*/
if (fstat(arfd, &arsb) < 0) {
- syswarn(0, errno, "Failed stat on %s", arcname);
+ sys_warn(0, errno, "Failed stat on %s", arcname);
(void)close(arfd);
arfd = -1;
can_unlnk = 0;
return(-1);
}
if (S_ISDIR(arsb.st_mode)) {
- warn(0, "Cannot write an archive on top of a directory %s",
+ pax_warn(0, "Cannot write an archive on top of a directory %s",
arcname);
(void)close(arfd);
arfd = -1;
@@ -470,7 +470,7 @@ ar_set_wr()
*/
if (((cpos = lseek(arfd, (off_t)0L, SEEK_CUR)) < 0) ||
(ftruncate(arfd, cpos) < 0)) {
- syswarn(1, errno, "Unable to truncate archive file");
+ sys_warn(1, errno, "Unable to truncate archive file");
return(-1);
}
return(0);
@@ -494,13 +494,13 @@ ar_app_ok()
#endif
{
if (artyp == ISPIPE) {
- warn(1, "Cannot append to an archive obtained from a pipe.");
+ pax_warn(1, "Cannot append to an archive obtained from a pipe.");
return(-1);
}
if (!invld_rec)
return(0);
- warn(1,"Cannot append, device record size %d does not support %s spec",
+ pax_warn(1,"Cannot append, device record size %d does not support %s spec",
rdblksz, argv0);
return(-1);
}
@@ -587,9 +587,9 @@ ar_read(buf, cnt)
*/
lstrval = res;
if (res < 0)
- syswarn(1, errno, "Failed read on archive volume %d", arvol);
+ sys_warn(1, errno, "Failed read on archive volume %d", arvol);
else
- warn(0, "End of archive volume %d reached", arvol);
+ pax_warn(0, "End of archive volume %d reached", arvol);
return(res);
}
@@ -668,7 +668,7 @@ ar_write(buf, bsz)
if (res >= 0)
break;
if (errno == EACCES) {
- warn(0, "Write failed, archive is write protected.");
+ pax_warn(0, "Write failed, archive is write protected.");
res = lstrval = 0;
return(0);
}
@@ -706,18 +706,18 @@ ar_write(buf, bsz)
* must quit right away.
*/
if (!wr_trail && (res <= 0)) {
- warn(1,"Unable to append, trailer re-write failed. Quitting.");
+ pax_warn(1,"Unable to append, trailer re-write failed. Quitting.");
return(res);
}
if (res == 0)
- warn(0, "End of archive volume %d reached", arvol);
+ pax_warn(0, "End of archive volume %d reached", arvol);
else if (res < 0)
- syswarn(1, errno, "Failed write to archive volume: %d", arvol);
+ sys_warn(1, errno, "Failed write to archive volume: %d", arvol);
else if (!frmt->blkalgn || ((res % frmt->blkalgn) == 0))
- warn(0,"WARNING: partial archive write. Archive MAY BE FLAWED");
+ pax_warn(0,"WARNING: partial archive write. Archive MAY BE FLAWED");
else
- warn(1,"WARNING: partial archive write. Archive IS FLAWED");
+ pax_warn(1,"WARNING: partial archive write. Archive IS FLAWED");
return(res);
}
@@ -751,7 +751,7 @@ ar_rdsync()
return(-1);
if ((act == APPND) || (act == ARCHIVE)) {
- warn(1, "Cannot allow updates to an archive with flaws.");
+ pax_warn(1, "Cannot allow updates to an archive with flaws.");
return(-1);
}
if (io_ok)
@@ -803,10 +803,10 @@ ar_rdsync()
break;
}
if (lstrval <= 0) {
- warn(1, "Unable to recover from an archive read failure.");
+ pax_warn(1, "Unable to recover from an archive read failure.");
return(-1);
}
- warn(0, "Attempting to recover from an archive read failure.");
+ pax_warn(0, "Attempting to recover from an archive read failure.");
return(0);
}
@@ -870,7 +870,7 @@ ar_fow(sksz, skipped)
if (lseek(arfd, mpos, SEEK_SET) >= 0)
return(0);
}
- syswarn(1, errno, "Foward positioning operation on archive failed");
+ sys_warn(1, errno, "Foward positioning operation on archive failed");
lstrval = -1;
return(-1);
}
@@ -912,7 +912,7 @@ ar_rev(sksz)
/*
* cannot go backwards on these critters
*/
- warn(1, "Reverse positioning on pipes is not supported.");
+ pax_warn(1, "Reverse positioning on pipes is not supported.");
lstrval = -1;
return(-1);
case ISREG:
@@ -930,7 +930,7 @@ ar_rev(sksz)
* First we figure out where we are in the archive.
*/
if ((cpos = lseek(arfd, (off_t)0L, SEEK_CUR)) < 0) {
- syswarn(1, errno,
+ sys_warn(1, errno,
"Unable to obtain current archive byte offset");
lstrval = -1;
return(-1);
@@ -948,14 +948,14 @@ ar_rev(sksz)
/*
* this should never happen
*/
- warn(1,"Reverse position on previous volume.");
+ pax_warn(1,"Reverse position on previous volume.");
lstrval = -1;
return(-1);
}
cpos = (off_t)0L;
}
if (lseek(arfd, cpos, SEEK_SET) < 0) {
- syswarn(1, errno, "Unable to seek archive backwards");
+ sys_warn(1, errno, "Unable to seek archive backwards");
lstrval = -1;
return(-1);
}
@@ -990,7 +990,7 @@ ar_rev(sksz)
* ok we have to move. Make sure the tape drive can do it.
*/
if (sksz % phyblk) {
- warn(1,
+ pax_warn(1,
"Tape drive unable to backspace requested amount");
lstrval = -1;
return(-1);
@@ -1002,7 +1002,7 @@ ar_rev(sksz)
mb.mt_op = MTBSR;
mb.mt_count = sksz/phyblk;
if (ioctl(arfd, MTIOCTOP, &mb) < 0) {
- syswarn(1,errno, "Unable to backspace tape %d blocks.",
+ sys_warn(1,errno, "Unable to backspace tape %d blocks.",
mb.mt_count);
lstrval = -1;
return(-1);
@@ -1050,7 +1050,7 @@ get_phys()
while ((res = read(arfd, scbuf, sizeof(scbuf))) > 0)
padsz += res;
if (res < 0) {
- syswarn(1, errno, "Unable to locate tape filemark.");
+ sys_warn(1, errno, "Unable to locate tape filemark.");
return(-1);
}
}
@@ -1062,7 +1062,7 @@ get_phys()
mb.mt_op = MTBSF;
mb.mt_count = 1;
if (ioctl(arfd, MTIOCTOP, &mb) < 0) {
- syswarn(1, errno, "Unable to backspace over tape filemark.");
+ sys_warn(1, errno, "Unable to backspace over tape filemark.");
return(-1);
}
@@ -1073,11 +1073,11 @@ get_phys()
mb.mt_op = MTBSR;
mb.mt_count = 1;
if (ioctl(arfd, MTIOCTOP, &mb) < 0) {
- syswarn(1, errno, "Unable to backspace over last tape block.");
+ sys_warn(1, errno, "Unable to backspace over last tape block.");
return(-1);
}
if ((phyblk = read(arfd, scbuf, sizeof(scbuf))) <= 0) {
- syswarn(1, errno, "Cannot determine archive tape blocksize.");
+ sys_warn(1, errno, "Cannot determine archive tape blocksize.");
return(-1);
}
@@ -1088,13 +1088,13 @@ get_phys()
while ((res = read(arfd, scbuf, sizeof(scbuf))) > 0)
;
if (res < 0) {
- syswarn(1, errno, "Unable to locate tape filemark.");
+ sys_warn(1, errno, "Unable to locate tape filemark.");
return(-1);
}
mb.mt_op = MTBSF;
mb.mt_count = 1;
if (ioctl(arfd, MTIOCTOP, &mb) < 0) {
- syswarn(1, errno, "Unable to backspace over tape filemark.");
+ sys_warn(1, errno, "Unable to backspace over tape filemark.");
return(-1);
}
@@ -1114,7 +1114,7 @@ get_phys()
* never fail).
*/
if (padsz % phyblk) {
- warn(1, "Tape drive unable to backspace requested amount");
+ pax_warn(1, "Tape drive unable to backspace requested amount");
return(-1);
}
@@ -1125,7 +1125,7 @@ get_phys()
mb.mt_op = MTBSR;
mb.mt_count = padsz/phyblk;
if (ioctl(arfd, MTIOCTOP, &mb) < 0) {
- syswarn(1,errno,"Unable to backspace tape over %d pad blocks",
+ sys_warn(1,errno,"Unable to backspace tape over %d pad blocks",
mb.mt_count);
return(-1);
}
@@ -1160,10 +1160,10 @@ ar_next()
* also be called via a signal handler, so we must prevent a race.
*/
if (sigprocmask(SIG_BLOCK, &s_mask, &o_mask) < 0)
- syswarn(0, errno, "Unable to set signal mask");
+ sys_warn(0, errno, "Unable to set signal mask");
ar_close();
if (sigprocmask(SIG_SETMASK, &o_mask, (sigset_t *)NULL) < 0)
- syswarn(0, errno, "Unable to restore signal mask");
+ sys_warn(0, errno, "Unable to restore signal mask");
if (done || !wr_trail)
return(-1);
@@ -1276,7 +1276,7 @@ ar_next()
if ((arcname = strdup(buf)) == NULL) {
done = 1;
lstrval = -1;
- warn(0, "Cannot save archive name.");
+ pax_warn(0, "Cannot save archive name.");
return(-1);
}
freeit = 1;
diff --git a/bin/pax/ar_subs.c b/bin/pax/ar_subs.c
index 07efc9f..6e4ecf5 100644
--- a/bin/pax/ar_subs.c
+++ b/bin/pax/ar_subs.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: ar_subs.c,v 1.7 1997/02/22 14:04:19 peter Exp $
*/
#ifndef lint
@@ -425,7 +425,7 @@ wr_archive(arcn, is_app)
* the link table).
*/
if ((fd = open(arcn->org_name, O_RDONLY, 0)) < 0) {
- syswarn(1,errno, "Unable to open %s to read",
+ sys_warn(1,errno, "Unable to open %s to read",
arcn->org_name);
purg_lnk(arcn);
continue;
@@ -572,7 +572,7 @@ append()
if (get_arc() < 0)
return;
if ((orgfrmt != NULL) && (orgfrmt != frmt)) {
- warn(1, "Cannot mix current archive format %s with %s",
+ pax_warn(1, "Cannot mix current archive format %s with %s",
frmt->name, orgfrmt->name);
return;
}
@@ -753,12 +753,12 @@ copy()
drem = PAXPATHLEN - dlen;
if (stat(dirptr, &sb) < 0) {
- syswarn(1, errno, "Cannot access destination directory %s",
+ sys_warn(1, errno, "Cannot access destination directory %s",
dirptr);
return;
}
if (!S_ISDIR(sb.st_mode)) {
- warn(1, "Destination is not a directory %s", dirptr);
+ pax_warn(1, "Destination is not a directory %s", dirptr);
return;
}
@@ -812,7 +812,7 @@ copy()
else
res = 0;
if ((arcn->nlen - res) > drem) {
- warn(1, "Destination pathname too long %s",
+ pax_warn(1, "Destination pathname too long %s",
arcn->name);
continue;
}
@@ -917,7 +917,7 @@ copy()
* first open source file and then create the destination file
*/
if ((fdsrc = open(arcn->org_name, O_RDONLY, 0)) < 0) {
- syswarn(1, errno, "Unable to open %s to read",
+ sys_warn(1, errno, "Unable to open %s to read",
arcn->org_name);
purg_lnk(arcn);
continue;
@@ -1009,16 +1009,16 @@ next_head(arcn)
* storage device, better give the user the bad news.
*/
if ((ret == 0) || (rd_sync() < 0)) {
- warn(1,"Premature end of file on archive read");
+ pax_warn(1,"Premature end of file on archive read");
return(-1);
}
if (!in_resync) {
if (act == APPND) {
- warn(1,
+ pax_warn(1,
"Archive I/O error, cannot continue");
return(-1);
}
- warn(1,"Archive I/O error. Trying to recover.");
+ pax_warn(1,"Archive I/O error. Trying to recover.");
++in_resync;
}
@@ -1079,10 +1079,10 @@ next_head(arcn)
*/
if (!in_resync) {
if (act == APPND) {
- warn(1,"Unable to append, archive header flaw");
+ pax_warn(1,"Unable to append, archive header flaw");
return(-1);
}
- warn(1,"Invalid header, starting valid header search.");
+ pax_warn(1,"Invalid header, starting valid header search.");
++in_resync;
}
bcopy(hdbuf+1, hdbuf, shftsz);
@@ -1174,7 +1174,7 @@ get_arc()
if (!notice) {
if (act == APPND)
return(-1);
- warn(1,"Cannot identify format. Searching...");
+ pax_warn(1,"Cannot identify format. Searching...");
++notice;
}
}
@@ -1209,7 +1209,7 @@ get_arc()
if (!notice) {
if (act == APPND)
return(-1);
- warn(1, "Cannot identify format. Searching...");
+ pax_warn(1, "Cannot identify format. Searching...");
++notice;
}
@@ -1234,6 +1234,6 @@ get_arc()
/*
* we cannot find a header, bow, apologize and quit
*/
- warn(1, "Sorry, unable to determine archive format.");
+ pax_warn(1, "Sorry, unable to determine archive format.");
return(-1);
}
diff --git a/bin/pax/buf_subs.c b/bin/pax/buf_subs.c
index e04182a..6a579c5 100644
--- a/bin/pax/buf_subs.c
+++ b/bin/pax/buf_subs.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: buf_subs.c,v 1.7 1997/02/22 14:04:20 peter Exp $
*/
#ifndef lint
@@ -103,12 +103,12 @@ wr_start()
if (!wrblksz)
wrblksz = frmt->bsz;
if (wrblksz > MAXBLK) {
- warn(1, "Write block size of %d too large, maximium is: %d",
+ pax_warn(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",
+ pax_warn(1, "Write block size of %d is not a %d byte multiple",
wrblksz, BLKMULT);
return(-1);
}
@@ -148,12 +148,12 @@ rd_start()
buf = &(bufmem[BLKMULT]);
if ((act == APPND) && wrblksz) {
if (wrblksz > MAXBLK) {
- warn(1,"Write block size %d too large, maximium is: %d",
+ pax_warn(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",
+ pax_warn(1, "Write block size %d is not a %d byte multiple",
wrblksz, BLKMULT);
return(-1);
}
@@ -232,7 +232,7 @@ appnd_start(skcnt)
off_t cnt;
if (exit_val != 0) {
- warn(0, "Cannot append to an archive that may have flaws.");
+ pax_warn(0, "Cannot append to an archive that may have flaws.");
return(-1);
}
/*
@@ -309,7 +309,7 @@ appnd_start(skcnt)
return(0);
out:
- warn(1, "Unable to rewrite archive trailer, cannot append.");
+ pax_warn(1, "Unable to rewrite archive trailer, cannot append.");
return(-1);
}
@@ -341,7 +341,7 @@ rd_sync()
if (maxflt == 0)
return(-1);
if (act == APPND) {
- warn(1, "Unable to append when there are archive read errors.");
+ pax_warn(1, "Unable to append when there are archive read errors.");
return(-1);
}
@@ -375,7 +375,7 @@ rd_sync()
* can extract out of the archive.
*/
if ((maxflt > 0) && (++errcnt > maxflt))
- warn(0,"Archive read error limit (%d) reached",maxflt);
+ pax_warn(0,"Archive read error limit (%d) reached",maxflt);
else if (ar_rdsync() == 0)
continue;
if (ar_next() < 0)
@@ -654,7 +654,7 @@ wr_skip(skcnt)
* it is important that we always write EXACTLY the number of bytes that
* the format specific write routine told us to. The file can also get
* bigger, so reading to the end of file would create an improper archive,
- * we just detect this case and warn the user. We never create a bad
+ * we just detect this case and pax_warn the user. We never create a bad
* archive if we can avoid it. Of course trying to archive files that are
* active is asking for trouble. It we fail, we pass back how much we
* could NOT copy and let the caller deal with it.
@@ -700,13 +700,13 @@ wr_rdfile(arcn, ifd, left)
* or the file read failed.
*/
if (res < 0)
- syswarn(1, errno, "Read fault on %s", arcn->org_name);
+ sys_warn(1, errno, "Read fault on %s", arcn->org_name);
else if (size != 0L)
- warn(1, "File changed size during read %s", arcn->org_name);
+ pax_warn(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);
+ sys_warn(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",
+ pax_warn(1, "File %s was modified during copy to archive",
arcn->org_name);
*left = size;
return(0);
@@ -761,7 +761,7 @@ rd_wrfile(arcn, ofd, left)
if (sb.st_blksize > 0)
sz = (int)sb.st_blksize;
} else
- syswarn(0,errno,"Unable to obtain block size for file %s",fnm);
+ sys_warn(0,errno,"Unable to obtain block size for file %s",fnm);
rem = sz;
*left = 0L;
@@ -817,7 +817,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);
+ pax_warn(1,"Actual crc does not match expected crc %s",arcn->name);
return(0);
}
@@ -864,7 +864,7 @@ cp_file(arcn, fd1, fd2)
if (sb.st_blksize > 0)
sz = sb.st_blksize;
} else
- syswarn(0,errno,"Unable to obtain block size for file %s",fnm);
+ sys_warn(0,errno,"Unable to obtain block size for file %s",fnm);
rem = sz;
/*
@@ -886,15 +886,15 @@ cp_file(arcn, fd1, fd2)
* check to make sure the copy is valid.
*/
if (res < 0)
- syswarn(1, errno, "Failed write during copy of %s to %s",
+ sys_warn(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",
+ pax_warn(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);
+ sys_warn(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",
+ pax_warn(1, "File %s was modified during copy to %s",
arcn->org_name, arcn->name);
/*
@@ -987,7 +987,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.");
+ pax_warn(0, "User specified archive volume byte limit reached.");
if (ar_next() < 0) {
wrcnt = 0;
exit_val = 1;
@@ -1043,7 +1043,7 @@ buf_flush(bufcnt)
/*
* Oh drat we got a partial write!
* if format doesnt care about alignment let it go,
- * we warned the user in ar_write().... but this means
+ * we pax_warned the user in ar_write().... but this means
* the last record on this volume violates pax spec....
*/
totcnt += cnt;
diff --git a/bin/pax/cache.c b/bin/pax/cache.c
index 68e534a..56f59f1 100644
--- a/bin/pax/cache.c
+++ b/bin/pax/cache.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: cache.c,v 1.6 1997/02/22 14:04:21 peter Exp $
+ * $Id: cache.c,v 1.7 1997/06/02 06:30:06 charnier Exp $
*/
#ifndef lint
@@ -92,7 +92,7 @@ uidtb_start()
return(-1);
if ((uidtb = (UIDC **)calloc(UID_SZ, sizeof(UIDC *))) == NULL) {
++fail;
- warn(1, "Unable to allocate memory for user id cache table");
+ pax_warn(1, "Unable to allocate memory for user id cache table");
return(-1);
}
return(0);
@@ -121,7 +121,7 @@ gidtb_start()
return(-1);
if ((gidtb = (GIDC **)calloc(GID_SZ, sizeof(GIDC *))) == NULL) {
++fail;
- warn(1, "Unable to allocate memory for group id cache table");
+ pax_warn(1, "Unable to allocate memory for group id cache table");
return(-1);
}
return(0);
@@ -150,7 +150,7 @@ usrtb_start()
return(-1);
if ((usrtb = (UIDC **)calloc(UNM_SZ, sizeof(UIDC *))) == NULL) {
++fail;
- warn(1, "Unable to allocate memory for user name cache table");
+ pax_warn(1, "Unable to allocate memory for user name cache table");
return(-1);
}
return(0);
@@ -179,7 +179,7 @@ grptb_start()
return(-1);
if ((grptb = (GIDC **)calloc(GNM_SZ, sizeof(GIDC *))) == NULL) {
++fail;
- warn(1,"Unable to allocate memory for group name cache table");
+ pax_warn(1,"Unable to allocate memory for group name cache table");
return(-1);
}
return(0);
diff --git a/bin/pax/cpio.c b/bin/pax/cpio.c
index 41b1c64..23bbc78 100644
--- a/bin/pax/cpio.c
+++ b/bin/pax/cpio.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: cpio.c,v 1.7 1997/02/22 14:04:23 peter Exp $
*/
#ifndef lint
@@ -216,7 +216,7 @@ rd_nm(arcn, nsz)
* do not even try bogus values
*/
if ((nsz == 0) || (nsz > sizeof(arcn->name))) {
- warn(1, "Cpio file name length %d is out of range", nsz);
+ pax_warn(1, "Cpio file name length %d is out of range", nsz);
return(-1);
}
@@ -225,7 +225,7 @@ rd_nm(arcn, nsz)
*/
if ((rd_wrbuf(arcn->name,nsz) != nsz) || (arcn->name[nsz-1] != '\0') ||
(arcn->name[0] == '\0')) {
- warn(1, "Cpio file name in header is corrupted");
+ pax_warn(1, "Cpio file name in header is corrupted");
return(-1);
}
return(0);
@@ -254,10 +254,10 @@ rd_ln_nm(arcn)
if ((arcn->sb.st_size == 0) ||
(arcn->sb.st_size >= sizeof(arcn->ln_name))) {
# ifdef NET2_STAT
- warn(1, "Cpio link name length is invalid: %lu",
+ pax_warn(1, "Cpio link name length is invalid: %lu",
arcn->sb.st_size);
# else
- warn(1, "Cpio link name length is invalid: %qu",
+ pax_warn(1, "Cpio link name length is invalid: %qu",
arcn->sb.st_size);
# endif
return(-1);
@@ -268,7 +268,7 @@ rd_ln_nm(arcn)
*/
if (rd_wrbuf(arcn->ln_name, (int)arcn->sb.st_size) !=
(int)arcn->sb.st_size) {
- warn(1, "Cpio link name read error");
+ pax_warn(1, "Cpio link name read error");
return(-1);
}
arcn->ln_nlen = arcn->sb.st_size;
@@ -278,7 +278,7 @@ rd_ln_nm(arcn)
* watch out for those empty link names
*/
if (arcn->ln_name[0] == '\0') {
- warn(1, "Cpio link name is corrupt");
+ pax_warn(1, "Cpio link name is corrupt");
return(-1);
}
return(0);
@@ -480,7 +480,7 @@ cpio_wr(arcn)
if (uqd_asc((u_quad_t)arcn->sb.st_size, hd->c_filesize,
sizeof(hd->c_filesize), OCT)) {
# endif
- warn(1,"File is too large for cpio format %s",
+ pax_warn(1,"File is too large for cpio format %s",
arcn->org_name);
return(1);
}
@@ -531,7 +531,7 @@ cpio_wr(arcn)
*/
if ((wr_rdbuf(hdblk, (int)sizeof(HD_CPIO)) < 0) ||
(wr_rdbuf(arcn->name, nsz) < 0)) {
- warn(1, "Unable to write cpio header for %s", arcn->org_name);
+ pax_warn(1, "Unable to write cpio header for %s", arcn->org_name);
return(-1);
}
@@ -550,7 +550,7 @@ cpio_wr(arcn)
* next file as we are done.
*/
if (wr_rdbuf(arcn->ln_name, arcn->ln_nlen) < 0) {
- warn(1,"Unable to write cpio link name for %s",arcn->org_name);
+ pax_warn(1,"Unable to write cpio link name for %s",arcn->org_name);
return(-1);
}
return(1);
@@ -559,7 +559,7 @@ cpio_wr(arcn)
/*
* header field is out of range
*/
- warn(1, "Cpio header field is too small to store file %s",
+ pax_warn(1, "Cpio header field is too small to store file %s",
arcn->org_name);
return(1);
}
@@ -847,7 +847,7 @@ vcpio_wr(arcn)
if (uqd_asc((u_quad_t)arcn->sb.st_size, hd->c_filesize,
sizeof(hd->c_filesize), HEX)) {
# endif
- warn(1,"File is too large for sv4cpio format %s",
+ pax_warn(1,"File is too large for sv4cpio format %s",
arcn->org_name);
return(1);
}
@@ -905,7 +905,7 @@ vcpio_wr(arcn)
if ((wr_rdbuf(hdblk, (int)sizeof(HD_VCPIO)) < 0) ||
(wr_rdbuf(arcn->name, (int)nsz) < 0) ||
(wr_skip((off_t)(VCPIO_PAD(sizeof(HD_VCPIO) + nsz))) < 0)) {
- warn(1,"Could not write sv4cpio header for %s",arcn->org_name);
+ pax_warn(1,"Could not write sv4cpio header for %s",arcn->org_name);
return(-1);
}
@@ -927,7 +927,7 @@ vcpio_wr(arcn)
*/
if ((wr_rdbuf(arcn->ln_name, arcn->ln_nlen) < 0) ||
(wr_skip((off_t)(VCPIO_PAD(arcn->ln_nlen))) < 0)) {
- warn(1,"Could not write sv4cpio link name for %s",
+ pax_warn(1,"Could not write sv4cpio link name for %s",
arcn->org_name);
return(-1);
}
@@ -937,7 +937,7 @@ vcpio_wr(arcn)
/*
* header field is out of range
*/
- warn(1,"Sv4cpio header field is too small for file %s",arcn->org_name);
+ pax_warn(1,"Sv4cpio header field is too small for file %s",arcn->org_name);
return(1);
}
@@ -1158,7 +1158,7 @@ bcpio_wr(arcn)
t_offt = (off_t)(SHRT_EXT(hd->h_filesize_1));
t_offt = (t_offt<<16) | ((off_t)(SHRT_EXT(hd->h_filesize_2)));
if (arcn->sb.st_size != t_offt) {
- warn(1,"File is too large for bcpio format %s",
+ pax_warn(1,"File is too large for bcpio format %s",
arcn->org_name);
return(1);
}
@@ -1243,7 +1243,7 @@ bcpio_wr(arcn)
if ((wr_rdbuf(hdblk, (int)sizeof(HD_BCPIO)) < 0) ||
(wr_rdbuf(arcn->name, nsz) < 0) ||
(wr_skip((off_t)(BCPIO_PAD(sizeof(HD_BCPIO) + nsz))) < 0)) {
- warn(1, "Could not write bcpio header for %s", arcn->org_name);
+ pax_warn(1, "Could not write bcpio header for %s", arcn->org_name);
return(-1);
}
@@ -1265,7 +1265,7 @@ bcpio_wr(arcn)
*/
if ((wr_rdbuf(arcn->ln_name, arcn->ln_nlen) < 0) ||
(wr_skip((off_t)(BCPIO_PAD(arcn->ln_nlen))) < 0)) {
- warn(1,"Could not write bcpio link name for %s",arcn->org_name);
+ pax_warn(1,"Could not write bcpio link name for %s",arcn->org_name);
return(-1);
}
return(1);
@@ -1274,6 +1274,6 @@ bcpio_wr(arcn)
/*
* header field is out of range
*/
- warn(1,"Bcpio header field is too small for file %s", arcn->org_name);
+ pax_warn(1,"Bcpio header field is too small for file %s", arcn->org_name);
return(1);
}
diff --git a/bin/pax/extern.h b/bin/pax/extern.h
index 819329f2..dda38ac 100644
--- a/bin/pax/extern.h
+++ b/bin/pax/extern.h
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)extern.h 8.2 (Berkeley) 4/18/94
- * $Id$
+ * $Id: extern.h,v 1.4 1997/02/22 14:04:25 peter Exp $
*/
/*
@@ -282,5 +282,5 @@ int ustar_wr __P((register ARCHD *));
int tty_init __P((void));
void tty_prnt __P((char *, ...));
int tty_read __P((char *, int));
-void warn __P((int, char *, ...));
-void syswarn __P((int, int, char *, ...));
+void pax_warn __P((int, char *, ...));
+void sys_warn __P((int, int, char *, ...));
diff --git a/bin/pax/file_subs.c b/bin/pax/file_subs.c
index a158bb5..f4bcee2 100644
--- a/bin/pax/file_subs.c
+++ b/bin/pax/file_subs.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: file_subs.c,v 1.7 1997/02/22 14:04:26 peter Exp $
*/
#ifndef lint
@@ -122,7 +122,7 @@ file_creat(arcn)
break;
oerrno = errno;
if (chk_path(arcn->name,arcn->sb.st_uid,arcn->sb.st_gid) < 0) {
- syswarn(1, oerrno, "Unable to create %s", arcn->name);
+ sys_warn(1, oerrno, "Unable to create %s", arcn->name);
return(-1);
}
}
@@ -152,7 +152,7 @@ file_close(arcn, fd)
if (fd < 0)
return;
if (close(fd) < 0)
- syswarn(0, errno, "Unable to close file descriptor on %s",
+ sys_warn(0, errno, "Unable to close file descriptor on %s",
arcn->name);
/*
@@ -200,13 +200,13 @@ lnk_creat(arcn)
* is not a directory, so we lstat and check
*/
if (lstat(arcn->ln_name, &sb) < 0) {
- syswarn(1,errno,"Unable to link to %s from %s", arcn->ln_name,
+ sys_warn(1,errno,"Unable to link to %s from %s", arcn->ln_name,
arcn->name);
return(-1);
}
if (S_ISDIR(sb.st_mode)) {
- warn(1, "A hard link to the directory %s is not allowed",
+ pax_warn(1, "A hard link to the directory %s is not allowed",
arcn->ln_name);
return(-1);
}
@@ -217,7 +217,7 @@ lnk_creat(arcn)
/*
* cross_lnk()
* Create a hard link to arcn->org_name from arcn->name. Only used in copy
- * with the -l flag. No warning or error if this does not succeed (we will
+ * with the -l flag. No pax_warning or error if this does not succeed (we will
* then just create the file)
* Return:
* 1 if copy() should try to create this file node
@@ -278,7 +278,7 @@ chk_same(arcn)
* better make sure the user does not have src == dest by mistake
*/
if ((arcn->sb.st_dev == sb.st_dev) && (arcn->sb.st_ino == sb.st_ino)) {
- warn(1, "Unable to copy %s, file would overwrite itself",
+ pax_warn(1, "Unable to copy %s, file would overwrite itself",
arcn->name);
return(0);
}
@@ -325,7 +325,7 @@ mk_link(to, to_sb, from, ign)
* make sure it is not the same file, protect the user
*/
if ((to_sb->st_dev==sb.st_dev)&&(to_sb->st_ino == sb.st_ino)) {
- warn(1, "Unable to link file %s to itself", to);
+ pax_warn(1, "Unable to link file %s to itself", to);
return(-1);;
}
@@ -334,12 +334,12 @@ mk_link(to, to_sb, from, ign)
*/
if (S_ISDIR(sb.st_mode)) {
if (rmdir(from) < 0) {
- syswarn(1, errno, "Unable to remove %s", from);
+ sys_warn(1, errno, "Unable to remove %s", from);
return(-1);
}
} else if (unlink(from) < 0) {
if (!ign) {
- syswarn(1, errno, "Unable to remove %s", from);
+ sys_warn(1, errno, "Unable to remove %s", from);
return(-1);
}
return(1);
@@ -358,7 +358,7 @@ mk_link(to, to_sb, from, ign)
if (chk_path(from, to_sb->st_uid, to_sb->st_gid) == 0)
continue;
if (!ign) {
- syswarn(1, oerrno, "Could not link to %s from %s", to,
+ sys_warn(1, oerrno, "Could not link to %s from %s", to,
from);
return(-1);
}
@@ -425,7 +425,7 @@ node_creat(arcn)
/*
* Skip sockets, operation has no meaning under BSD
*/
- warn(0,
+ pax_warn(0,
"%s skipped. Sockets cannot be copied or extracted",
arcn->name);
return(-1);
@@ -441,7 +441,7 @@ node_creat(arcn)
/*
* we should never get here
*/
- warn(0, "%s has an unknown file type, skipping",
+ pax_warn(0, "%s has an unknown file type, skipping",
arcn->name);
return(-1);
}
@@ -465,7 +465,7 @@ node_creat(arcn)
continue;
if (chk_path(arcn->name,arcn->sb.st_uid,arcn->sb.st_gid) < 0) {
- syswarn(1, oerrno, "Could not create: %s", arcn->name);
+ sys_warn(1, oerrno, "Could not create: %s", arcn->name);
return(-1);
}
}
@@ -500,7 +500,7 @@ node_creat(arcn)
*/
if (access(arcn->name, R_OK | W_OK | X_OK) < 0) {
if (lstat(arcn->name, &sb) < 0) {
- syswarn(0, errno,"Could not access %s (stat)",
+ sys_warn(0, errno,"Could not access %s (stat)",
arcn->name);
set_pmode(arcn->name,file_mode | S_IRWXU);
} else {
@@ -570,7 +570,7 @@ unlnk_exist(name, type)
if (rmdir(name) < 0) {
if (type == PAX_DIR)
return(1);
- syswarn(1,errno,"Unable to remove directory %s", name);
+ sys_warn(1,errno,"Unable to remove directory %s", name);
return(-1);
}
return(0);
@@ -580,7 +580,7 @@ unlnk_exist(name, type)
* try to get rid of all non-directory type nodes
*/
if (unlink(name) < 0) {
- syswarn(1, errno, "Could not unlink %s", name);
+ sys_warn(1, errno, "Could not unlink %s", name);
return(-1);
}
return(0);
@@ -720,14 +720,14 @@ set_ftime(fnm, mtime, atime, frc)
if (!pmtime)
tv[1].tv_sec = (long)sb.st_mtime;
} else
- syswarn(0,errno,"Unable to obtain file stats %s", fnm);
+ sys_warn(0,errno,"Unable to obtain file stats %s", fnm);
}
/*
* set the times
*/
if (utimes(fnm, tv) < 0)
- syswarn(1, errno, "Access/modification time set failed on: %s",
+ sys_warn(1, errno, "Access/modification time set failed on: %s",
fnm);
return;
}
@@ -751,7 +751,7 @@ set_ids(fnm, uid, gid)
#endif
{
if (chown(fnm, uid, gid) < 0) {
- syswarn(1, errno, "Unable to set file uid/gid of %s", fnm);
+ sys_warn(1, errno, "Unable to set file uid/gid of %s", fnm);
return(-1);
}
return(0);
@@ -774,7 +774,7 @@ set_pmode(fnm, mode)
{
mode &= ABITS;
if (chmod(fnm, mode) < 0)
- syswarn(1, errno, "Could not set permissions on %s", fnm);
+ sys_warn(1, errno, "Could not set permissions on %s", fnm);
return;
}
@@ -887,7 +887,7 @@ file_write(fd, str, cnt, rem, isempt, sz, name)
* skip, buf is empty so far
*/
if (lseek(fd, (off_t)wcnt, SEEK_CUR) < 0) {
- syswarn(1,errno,"File seek on %s",
+ sys_warn(1,errno,"File seek on %s",
name);
return(-1);
}
@@ -904,7 +904,7 @@ file_write(fd, str, cnt, rem, isempt, sz, name)
* have non-zero data in this file system block, have to write
*/
if (write(fd, st, wcnt) != wcnt) {
- syswarn(1, errno, "Failed write to file %s", name);
+ sys_warn(1, errno, "Failed write to file %s", name);
return(-1);
}
st += wcnt;
@@ -943,12 +943,12 @@ file_flush(fd, fname, isempt)
* move back one byte and write a zero
*/
if (lseek(fd, (off_t)-1, SEEK_CUR) < 0) {
- syswarn(1, errno, "Failed seek on file %s", fname);
+ sys_warn(1, errno, "Failed seek on file %s", fname);
return;
}
if (write(fd, blnk, 1) < 0)
- syswarn(1, errno, "Failed write to file %s", fname);
+ sys_warn(1, errno, "Failed write to file %s", fname);
return;
}
@@ -1041,13 +1041,13 @@ set_crc(arcn, fd)
* they can create inconsistant archive copies.
*/
if (cpcnt != arcn->sb.st_size)
- warn(1, "File changed size %s", arcn->org_name);
+ pax_warn(1, "File changed size %s", arcn->org_name);
else if (fstat(fd, &sb) < 0)
- syswarn(1, errno, "Failed stat on %s", arcn->org_name);
+ sys_warn(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 read", arcn->org_name);
+ pax_warn(1, "File %s was modified during read", arcn->org_name);
else if (lseek(fd, (off_t)0L, SEEK_SET) < 0)
- syswarn(1, errno, "File rewind failed on: %s", arcn->org_name);
+ sys_warn(1, errno, "File rewind failed on: %s", arcn->org_name);
else {
arcn->crc = crc;
return(0);
diff --git a/bin/pax/ftree.c b/bin/pax/ftree.c
index f6e7f6f..00dce37 100644
--- a/bin/pax/ftree.c
+++ b/bin/pax/ftree.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: ftree.c,v 1.7 1997/02/22 14:04:27 peter Exp $
*/
#ifndef lint
@@ -122,7 +122,7 @@ ftree_start()
ftsopts |= FTS_PHYSICAL;
if (Hflag)
# ifdef NET2_FTS
- warn(0, "The -H flag is not supported on this version");
+ pax_warn(0, "The -H flag is not supported on this version");
# else
ftsopts |= FTS_COMFOLLOW;
# endif
@@ -130,7 +130,7 @@ ftree_start()
ftsopts |= FTS_XDEV;
if ((fthead == NULL) && ((farray[0] = malloc(PAXPATHLEN+2)) == NULL)) {
- warn(1, "Unable to allocate memory for file name buffer");
+ pax_warn(1, "Unable to allocate memory for file name buffer");
return(-1);
}
@@ -165,7 +165,7 @@ ftree_add(str)
* simple check for bad args
*/
if ((str == NULL) || (*str == '\0')) {
- warn(0, "Invalid file name arguement");
+ pax_warn(0, "Invalid file name arguement");
return(-1);
}
@@ -175,7 +175,7 @@ ftree_add(str)
* trailing / the user may pass us. (watch out for / by itself).
*/
if ((ft = (FTREE *)malloc(sizeof(FTREE))) == NULL) {
- warn(0, "Unable to allocate memory for filename");
+ pax_warn(0, "Unable to allocate memory for filename");
return(-1);
}
@@ -263,7 +263,7 @@ ftree_chk()
if (ft->refcnt > 0)
continue;
if (wban == 0) {
- warn(1,"WARNING! These file names were not selected:");
+ pax_warn(1,"WARNING! These file names were not selected:");
++wban;
}
(void)fprintf(stderr, "%s\n", ft->fname);
@@ -423,30 +423,30 @@ next_file(arcn)
/*
* fts claims a file system cycle
*/
- warn(1,"File system cycle found at %s",ftent->fts_path);
+ pax_warn(1,"File system cycle found at %s",ftent->fts_path);
continue;
case FTS_DNR:
# ifdef NET2_FTS
- syswarn(1, errno,
+ sys_warn(1, errno,
# else
- syswarn(1, ftent->fts_errno,
+ sys_warn(1, ftent->fts_errno,
# endif
"Unable to read directory %s", ftent->fts_path);
continue;
case FTS_ERR:
# ifdef NET2_FTS
- syswarn(1, errno,
+ sys_warn(1, errno,
# else
- syswarn(1, ftent->fts_errno,
+ sys_warn(1, ftent->fts_errno,
# endif
"File system traversal error");
continue;
case FTS_NS:
case FTS_NSOK:
# ifdef NET2_FTS
- syswarn(1, errno,
+ sys_warn(1, errno,
# else
- syswarn(1, ftent->fts_errno,
+ sys_warn(1, ftent->fts_errno,
# endif
"Unable to access %s", ftent->fts_path);
continue;
@@ -508,7 +508,7 @@ next_file(arcn)
*/
if ((cnt = readlink(ftent->fts_path, arcn->ln_name,
PAXPATHLEN)) < 0) {
- syswarn(1, errno, "Unable to read symlink %s",
+ sys_warn(1, errno, "Unable to read symlink %s",
ftent->fts_path);
continue;
}
diff --git a/bin/pax/options.c b/bin/pax/options.c
index 3e0efa4..ef0b1c7 100644
--- a/bin/pax/options.c
+++ b/bin/pax/options.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: options.c,v 1.7 1997/02/22 14:04:33 peter Exp $
+ * $Id: options.c,v 1.8 1997/03/28 15:24:27 imp Exp $
*/
#ifndef lint
@@ -209,7 +209,7 @@ pax_options(argc, argv)
*/
flg |= BF;
if ((wrblksz = (int)str_offt(optarg)) <= 0) {
- warn(1, "Invalid block size %s", optarg);
+ pax_warn(1, "Invalid block size %s", optarg);
pax_usage();
}
break;
@@ -311,7 +311,7 @@ pax_options(argc, argv)
pmode = 1;
break;
default:
- warn(1, "Invalid -p string: %c", *pt);
+ pax_warn(1, "Invalid -p string: %c", *pt);
pax_usage();
break;
}
@@ -371,7 +371,7 @@ pax_options(argc, argv)
flg |= XF;
break;
}
- warn(1, "Unknown -x format: %s", optarg);
+ pax_warn(1, "Unknown -x format: %s", optarg);
(void)fputs("pax: Known -x formats are:", stderr);
for (i = 0; i < (sizeof(fsub)/sizeof(FSUB)); ++i)
(void)fprintf(stderr, " %s", fsub[i].name);
@@ -384,11 +384,11 @@ pax_options(argc, argv)
* single archive volume.
*/
if ((wrlimit = str_offt(optarg)) <= 0) {
- warn(1, "Invalid write limit %s", optarg);
+ pax_warn(1, "Invalid write limit %s", optarg);
pax_usage();
}
if (wrlimit % BLKMULT) {
- warn(1, "Write limit is not a %d byte multiple",
+ pax_warn(1, "Write limit is not a %d byte multiple",
BLKMULT);
pax_usage();
}
@@ -412,7 +412,7 @@ pax_options(argc, argv)
if (strcmp(NONE, optarg) == 0)
maxflt = -1;
else if ((maxflt = atoi(optarg)) < 0) {
- warn(1, "Error count value must be positive");
+ pax_warn(1, "Error count value must be positive");
pax_usage();
}
break;
@@ -547,7 +547,7 @@ pax_options(argc, argv)
break;
case COPY:
if (optind >= argc) {
- warn(0, "Destination directory was not supplied");
+ pax_warn(0, "Destination directory was not supplied");
pax_usage();
}
--argc;
@@ -604,11 +604,11 @@ tar_options(argc, argv)
* specify blocksize
*/
if (*argv == (char *)NULL) {
- warn(1,"blocksize must be specified with 'b'");
+ pax_warn(1,"blocksize must be specified with 'b'");
tar_usage();
}
if ((wrblksz = (int)str_offt(*argv)) <= 0) {
- warn(1, "Invalid block size %s", *argv);
+ pax_warn(1, "Invalid block size %s", *argv);
tar_usage();
}
++argv;
@@ -630,7 +630,7 @@ tar_options(argc, argv)
* filename where the archive is stored
*/
if (*argv == (char *)NULL) {
- warn(1, "filename must be specified with 'f'");
+ pax_warn(1, "filename must be specified with 'f'");
tar_usage();
}
if ((argv[0][0] == '-') && (argv[0][1]== '\0')) {
@@ -893,7 +893,7 @@ bad_opt()
/*
* print all we were given
*/
- warn(1,"These format options are not supported");
+ pax_warn(1,"These format options are not supported");
while ((opt = opt_next()) != NULL)
(void)fprintf(stderr, "\t%s = %s\n", opt->name, opt->value);
pax_usage();
@@ -924,7 +924,7 @@ opt_add(str)
register char *endpt;
if ((str == NULL) || (*str == '\0')) {
- warn(0, "Invalid option name");
+ pax_warn(0, "Invalid option name");
return(-1);
}
frpt = endpt = str;
@@ -938,11 +938,11 @@ opt_add(str)
if ((endpt = strchr(frpt, ',')) != NULL)
*endpt = '\0';
if ((pt = strchr(frpt, '=')) == NULL) {
- warn(0, "Invalid options format");
+ pax_warn(0, "Invalid options format");
return(-1);
}
if ((opt = (OPLIST *)malloc(sizeof(OPLIST))) == NULL) {
- warn(0, "Unable to allocate space for option list");
+ pax_warn(0, "Unable to allocate space for option list");
return(-1);
}
*pt++ = '\0';
diff --git a/bin/pax/pat_rep.c b/bin/pax/pat_rep.c
index 6519eb4..2933e1f 100644
--- a/bin/pax/pat_rep.c
+++ b/bin/pax/pat_rep.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pat_rep.c,v 1.8 1997/02/22 14:04:35 peter Exp $
+ * $Id: pat_rep.c,v 1.9 1997/06/02 06:30:06 charnier Exp $
*/
#ifndef lint
@@ -119,7 +119,7 @@ rep_add(str)
* throw out the bad parameters
*/
if ((str == NULL) || (*str == '\0')) {
- warn(1, "Empty replacement string");
+ pax_warn(1, "Empty replacement string");
return(-1);
}
@@ -128,7 +128,7 @@ rep_add(str)
* this expression
*/
if ((pt1 = strchr(str+1, *str)) == NULL) {
- warn(1, "Invalid replacement string %s", str);
+ pax_warn(1, "Invalid replacement string %s", str);
return(-1);
}
@@ -137,7 +137,7 @@ rep_add(str)
* and split out the regular expression and try to compile it
*/
if ((rep = (REPLACE *)malloc(sizeof(REPLACE))) == NULL) {
- warn(1, "Unable to allocate memory for replacement string");
+ pax_warn(1, "Unable to allocate memory for replacement string");
return(-1);
}
@@ -147,7 +147,7 @@ rep_add(str)
# else
if ((res = regcomp(&(rep->rcmp), str+1, 0)) != 0) {
regerror(res, &(rep->rcmp), rebuf, sizeof(rebuf));
- warn(1, "%s while compiling regular expression %s", rebuf, str);
+ pax_warn(1, "%s while compiling regular expression %s", rebuf, str);
# endif
(void)free((char *)rep);
return(-1);
@@ -166,7 +166,7 @@ rep_add(str)
regfree(&(rep->rcmp));
# endif
(void)free((char *)rep);
- warn(1, "Invalid replacement string %s", str);
+ pax_warn(1, "Invalid replacement string %s", str);
return(-1);
}
@@ -196,7 +196,7 @@ rep_add(str)
# endif
(void)free((char *)rep);
*pt1 = *str;
- warn(1, "Invalid replacement string option %s", str);
+ pax_warn(1, "Invalid replacement string option %s", str);
return(-1);
}
++pt2;
@@ -241,7 +241,7 @@ pat_add(str)
* throw out the junk
*/
if ((str == NULL) || (*str == '\0')) {
- warn(1, "Empty pattern string");
+ pax_warn(1, "Empty pattern string");
return(-1);
}
@@ -251,7 +251,7 @@ pat_add(str)
* node to the end of the pattern list
*/
if ((pt = (PATTERN *)malloc(sizeof(PATTERN))) == NULL) {
- warn(1, "Unable to allocate memory for pattern string");
+ pax_warn(1, "Unable to allocate memory for pattern string");
return(-1);
}
@@ -294,7 +294,7 @@ pat_chk()
if (pt->flgs & MTCH)
continue;
if (!wban) {
- warn(1, "WARNING! These patterns were not matched:");
+ pax_warn(1, "WARNING! These patterns were not matched:");
++wban;
}
(void)fprintf(stderr, "%s\n", pt->pstr);
@@ -373,7 +373,7 @@ pat_sel(arcn)
*pt->pend = '\0';
if ((pt->pstr = strdup(arcn->name)) == NULL) {
- warn(1, "Pattern select out of memory");
+ pax_warn(1, "Pattern select out of memory");
if (pt->pend != NULL)
*pt->pend = '/';
pt->pend = NULL;
@@ -421,7 +421,7 @@ pat_sel(arcn)
/*
* should never happen....
*/
- warn(1, "Pattern list inconsistant");
+ pax_warn(1, "Pattern list inconsistant");
return(-1);
}
*ppt = pt->fow;
@@ -856,7 +856,7 @@ fix_path(or_name, or_len, dir_name, dir_len)
--dest;
}
if ((len = dest - or_name) > PAXPATHLEN) {
- warn(1, "File name %s/%s, too long", dir_name, start);
+ pax_warn(1, "File name %s/%s, too long", dir_name, start);
return(-1);
}
*or_len = len;
@@ -983,7 +983,7 @@ rep_name(name, nlen, prnt)
< 0) {
# endif
if (prnt)
- warn(1, "Replacement name error %s",
+ pax_warn(1, "Replacement name error %s",
name);
return(1);
}
@@ -1034,7 +1034,7 @@ rep_name(name, nlen, prnt)
*outpt = '\0';
if ((outpt == endpt) && (*inpt != '\0')) {
if (prnt)
- warn(1,"Replacement name too long %s >> %s",
+ pax_warn(1,"Replacement name too long %s >> %s",
name, nname);
return(1);
}
diff --git a/bin/pax/pax.c b/bin/pax/pax.c
index 1fdefb2..7199f95 100644
--- a/bin/pax/pax.c
+++ b/bin/pax/pax.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: pax.c,v 1.8 1997/02/22 14:04:39 peter Exp $
*/
#ifndef lint
@@ -285,9 +285,9 @@ sig_cleanup(which_sig)
*/
vflag = vfpart = 1;
if (which_sig == SIGXCPU)
- warn(0, "Cpu time limit reached, cleaning up.");
+ pax_warn(0, "Cpu time limit reached, cleaning up.");
else
- warn(0, "Signal caught, cleaning up.");
+ pax_warn(0, "Signal caught, cleaning up.");
ar_close();
proc_dir();
@@ -365,7 +365,7 @@ gen_init()
(sigaddset(&s_mask,SIGINT) < 0)||(sigaddset(&s_mask,SIGHUP) < 0) ||
(sigaddset(&s_mask,SIGPIPE) < 0)||(sigaddset(&s_mask,SIGQUIT)<0) ||
(sigaddset(&s_mask,SIGXCPU) < 0)||(sigaddset(&s_mask,SIGXFSZ)<0)) {
- warn(1, "Unable to set up signal mask");
+ pax_warn(1, "Unable to set up signal mask");
return(-1);
}
n_hand.sa_mask = s_mask;
@@ -404,6 +404,6 @@ gen_init()
return(0);
out:
- syswarn(1, errno, "Unable to set up signal handler");
+ sys_warn(1, errno, "Unable to set up signal handler");
return(-1);
}
diff --git a/bin/pax/sel_subs.c b/bin/pax/sel_subs.c
index d3f1a92..b740aed 100644
--- a/bin/pax/sel_subs.c
+++ b/bin/pax/sel_subs.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: sel_subs.c,v 1.6 1997/02/22 14:04:41 peter Exp $
*/
#ifndef lint
@@ -129,7 +129,7 @@ usr_add(str)
return(-1);
if ((usrtb == NULL) &&
((usrtb = (USRT **)calloc(USR_TB_SZ, sizeof(USRT *))) == NULL)) {
- warn(1, "Unable to allocate memory for user selection table");
+ pax_warn(1, "Unable to allocate memory for user selection table");
return(-1);
}
@@ -143,7 +143,7 @@ usr_add(str)
if ((str[0] == '\\') && (str[1] == '#'))
++str;
if ((pw = getpwnam(str)) == NULL) {
- warn(1, "Unable to find uid for user: %s", str);
+ pax_warn(1, "Unable to find uid for user: %s", str);
return(-1);
}
uid = (uid_t)pw->pw_uid;
@@ -176,7 +176,7 @@ usr_add(str)
usrtb[indx] = pt;
return(0);
}
- warn(1, "User selection table out of memory");
+ pax_warn(1, "User selection table out of memory");
return(-1);
}
@@ -242,7 +242,7 @@ grp_add(str)
return(-1);
if ((grptb == NULL) &&
((grptb = (GRPT **)calloc(GRP_TB_SZ, sizeof(GRPT *))) == NULL)) {
- warn(1, "Unable to allocate memory fo group selection table");
+ pax_warn(1, "Unable to allocate memory fo group selection table");
return(-1);
}
@@ -256,7 +256,7 @@ grp_add(str)
if ((str[0] == '\\') && (str[1] == '#'))
++str;
if ((gr = getgrnam(str)) == NULL) {
- warn(1,"Cannot determine gid for group name: %s", str);
+ pax_warn(1,"Cannot determine gid for group name: %s", str);
return(-1);
}
gid = (gid_t)gr->gr_gid;
@@ -289,7 +289,7 @@ grp_add(str)
grptb[indx] = pt;
return(0);
}
- warn(1, "Group selection table out of memory");
+ pax_warn(1, "Group selection table out of memory");
return(-1);
}
@@ -375,7 +375,7 @@ trng_add(str)
* throw out the badly formed time ranges
*/
if ((str == NULL) || (*str == '\0')) {
- warn(1, "Empty time range string");
+ pax_warn(1, "Empty time range string");
return(-1);
}
@@ -402,7 +402,7 @@ trng_add(str)
++dot;
continue;
}
- warn(1, "Improperly specified time range: %s", str);
+ pax_warn(1, "Improperly specified time range: %s", str);
goto out;
}
@@ -410,7 +410,7 @@ trng_add(str)
* allocate space for the time range and store the limits
*/
if ((pt = (TIME_RNG *)malloc(sizeof(TIME_RNG))) == NULL) {
- warn(1, "Unable to allocate memory for time range");
+ pax_warn(1, "Unable to allocate memory for time range");
return(-1);
}
@@ -433,7 +433,7 @@ trng_add(str)
pt->flgs |= CMPCTME;
break;
default:
- warn(1, "Bad option %c with time range %s",
+ pax_warn(1, "Bad option %c with time range %s",
*flgpt, str);
goto out;
}
@@ -450,7 +450,7 @@ trng_add(str)
* add lower limit
*/
if (str_sec(str, &(pt->low_time)) < 0) {
- warn(1, "Illegal lower time range %s", str);
+ pax_warn(1, "Illegal lower time range %s", str);
(void)free((char *)pt);
goto out;
}
@@ -462,7 +462,7 @@ trng_add(str)
* add upper limit
*/
if (str_sec(up_pt, &(pt->high_time)) < 0) {
- warn(1, "Illegal upper time range %s", up_pt);
+ pax_warn(1, "Illegal upper time range %s", up_pt);
(void)free((char *)pt);
goto out;
}
@@ -473,7 +473,7 @@ trng_add(str)
*/
if (pt->flgs & HASLOW) {
if (pt->low_time > pt->high_time) {
- warn(1, "Upper %s and lower %s time overlap",
+ pax_warn(1, "Upper %s and lower %s time overlap",
up_pt, str);
(void)free((char *)pt);
return(-1);
@@ -491,7 +491,7 @@ trng_add(str)
return(0);
out:
- warn(1, "Time range format is: [yy[mm[dd[hh]]]]mm[.ss][/[c][m]]");
+ pax_warn(1, "Time range format is: [yy[mm[dd[hh]]]]mm[.ss][/[c][m]]");
return(-1);
}
diff --git a/bin/pax/tables.c b/bin/pax/tables.c
index b35bb99..619b5e9 100644
--- a/bin/pax/tables.c
+++ b/bin/pax/tables.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: tables.c,v 1.7 1997/02/22 14:04:43 peter Exp $
+ * $Id: tables.c,v 1.8 1997/06/02 06:30:06 charnier Exp $
*/
#ifndef lint
@@ -115,7 +115,7 @@ lnk_start()
if (ltab != NULL)
return(0);
if ((ltab = (HRDLNK **)calloc(L_TAB_SZ, sizeof(HRDLNK *))) == NULL) {
- warn(1, "Cannot allocate memory for hard link table");
+ pax_warn(1, "Cannot allocate memory for hard link table");
return(-1);
}
return(0);
@@ -215,7 +215,7 @@ chk_lnk(arcn)
(void)free((char *)pt);
}
- warn(1, "Hard link table out of memory");
+ pax_warn(1, "Hard link table out of memory");
return(-1);
}
@@ -364,7 +364,7 @@ ftime_start()
if (ftab != NULL)
return(0);
if ((ftab = (FTM **)calloc(F_TAB_SZ, sizeof(FTM *))) == NULL) {
- warn(1, "Cannot allocate memory for file time table");
+ pax_warn(1, "Cannot allocate memory for file time table");
return(-1);
}
@@ -377,7 +377,7 @@ ftime_start()
(void)unlink(pt);
if ((ffd = open(pt, O_RDWR | O_CREAT, S_IRWXU)) < 0) {
- syswarn(1, errno, "Unable to open temporary file: %s", pt);
+ sys_warn(1, errno, "Unable to open temporary file: %s", pt);
return(-1);
}
@@ -435,12 +435,12 @@ chk_ftime(arcn)
* from the scratch file.
*/
if (lseek(ffd,pt->seek,SEEK_SET) != pt->seek) {
- syswarn(1, errno,
+ sys_warn(1, errno,
"Failed ftime table seek");
return(-1);
}
if (read(ffd, ckname, namelen) != namelen) {
- syswarn(1, errno,
+ sys_warn(1, errno,
"Failed ftime table read");
return(-1);
}
@@ -492,11 +492,11 @@ chk_ftime(arcn)
ftab[indx] = pt;
return(0);
}
- syswarn(1, errno, "Failed write to file time table");
+ sys_warn(1, errno, "Failed write to file time table");
} else
- syswarn(1, errno, "Failed seek on file time table");
+ sys_warn(1, errno, "Failed seek on file time table");
} else
- warn(1, "File time table ran out of memory");
+ pax_warn(1, "File time table ran out of memory");
if (pt != NULL)
(void)free((char *)pt);
@@ -533,7 +533,7 @@ name_start()
if (ntab != NULL)
return(0);
if ((ntab = (NAMT **)calloc(N_TAB_SZ, sizeof(NAMT *))) == NULL) {
- warn(1, "Cannot allocate memory for interactive rename table");
+ pax_warn(1, "Cannot allocate memory for interactive rename table");
return(-1);
}
return(0);
@@ -566,7 +566,7 @@ add_name(oname, onamelen, nname)
/*
* should never happen
*/
- warn(0, "No interactive rename table, links may fail\n");
+ pax_warn(0, "No interactive rename table, links may fail\n");
return(0);
}
@@ -592,7 +592,7 @@ add_name(oname, onamelen, nname)
(void)free((char *)pt->nname);
if ((pt->nname = strdup(nname)) == NULL) {
- warn(1, "Cannot update rename table");
+ pax_warn(1, "Cannot update rename table");
return(-1);
}
return(0);
@@ -613,7 +613,7 @@ add_name(oname, onamelen, nname)
}
(void)free((char *)pt);
}
- warn(1, "Interactive rename table out of memory");
+ pax_warn(1, "Interactive rename table out of memory");
return(-1);
}
@@ -726,7 +726,7 @@ dev_start()
if (dtab != NULL)
return(0);
if ((dtab = (DEVT **)calloc(D_TAB_SZ, sizeof(DEVT *))) == NULL) {
- warn(1, "Cannot allocate memory for device mapping table");
+ pax_warn(1, "Cannot allocate memory for device mapping table");
return(-1);
}
return(0);
@@ -812,7 +812,7 @@ chk_dev(dev, add)
* list must be NULL.
*/
if ((pt = (DEVT *)malloc(sizeof(DEVT))) == NULL) {
- warn(1, "Device map table out of memory");
+ pax_warn(1, "Device map table out of memory");
return(NULL);
}
pt->dev = dev;
@@ -954,9 +954,9 @@ map_dev(arcn, dev_mask, ino_mask)
return(0);
bad:
- warn(1, "Unable to fix truncated inode/device field when storing %s",
+ pax_warn(1, "Unable to fix truncated inode/device field when storing %s",
arcn->name);
- warn(0, "Archive may create improper hard links when extracted");
+ pax_warn(0, "Archive may create improper hard links when extracted");
return(0);
}
@@ -995,7 +995,7 @@ atdir_start()
if (atab != NULL)
return(0);
if ((atab = (ATDIR **)calloc(A_TAB_SZ, sizeof(ATDIR *))) == NULL) {
- warn(1,"Cannot allocate space for directory access time table");
+ pax_warn(1,"Cannot allocate space for directory access time table");
return(-1);
}
return(0);
@@ -1102,7 +1102,7 @@ add_atdir(fname, dev, ino, mtime, atime)
(void)free((char *)pt);
}
- warn(1, "Directory access time reset table ran out of memory");
+ pax_warn(1, "Directory access time reset table ran out of memory");
return;
}
@@ -1224,7 +1224,7 @@ dir_start()
(void)unlink(pt);
return(0);
}
- warn(1, "Unable to create temporary file for directory times: %s", pt);
+ pax_warn(1, "Unable to create temporary file for directory times: %s", pt);
return(-1);
}
@@ -1263,7 +1263,7 @@ add_dir(name, nlen, psb, frc_mode)
* in the trailer
*/
if ((dblk.npos = lseek(dirfd, 0L, SEEK_CUR)) < 0) {
- warn(1,"Unable to store mode and times for directory: %s",name);
+ pax_warn(1,"Unable to store mode and times for directory: %s",name);
return;
}
@@ -1281,7 +1281,7 @@ add_dir(name, nlen, psb, frc_mode)
return;
}
- warn(1,"Unable to store mode and times for created directory: %s",name);
+ pax_warn(1,"Unable to store mode and times for created directory: %s",name);
return;
}
@@ -1337,7 +1337,7 @@ proc_dir()
(void)close(dirfd);
dirfd = -1;
if (cnt != dircnt)
- warn(1,"Unable to set mode and times for created directories");
+ pax_warn(1,"Unable to set mode and times for created directories");
return;
}
diff --git a/bin/pax/tar.c b/bin/pax/tar.c
index 15091a0..c528da9 100644
--- a/bin/pax/tar.c
+++ b/bin/pax/tar.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: tar.c,v 1.7 1997/02/22 14:04:45 peter Exp $
*/
#ifndef lint
@@ -397,9 +397,9 @@ tar_opt()
while ((opt = opt_next()) != NULL) {
if (strcmp(opt->name, TAR_OPTION) ||
strcmp(opt->value, TAR_NODIR)) {
- warn(1, "Unknown tar format -o option/value pair %s=%s",
+ pax_warn(1, "Unknown tar format -o option/value pair %s=%s",
opt->name, opt->value);
- warn(1,"%s=%s is the only supported tar format option",
+ pax_warn(1,"%s=%s is the only supported tar format option",
TAR_OPTION, TAR_NODIR);
return(-1);
}
@@ -408,7 +408,7 @@ tar_opt()
* we only support one option, and only when writing
*/
if ((act != APPND) && (act != ARCHIVE)) {
- warn(1, "%s=%s is only supported when writing.",
+ pax_warn(1, "%s=%s is only supported when writing.",
opt->name, opt->value);
return(-1);
}
@@ -574,23 +574,23 @@ tar_wr(arcn)
return(1);
break;
case PAX_CHR:
- warn(1, "Tar cannot archive a character device %s",
+ pax_warn(1, "Tar cannot archive a character device %s",
arcn->org_name);
return(1);
case PAX_BLK:
- warn(1, "Tar cannot archive a block device %s", arcn->org_name);
+ pax_warn(1, "Tar cannot archive a block device %s", arcn->org_name);
return(1);
case PAX_SCK:
- warn(1, "Tar cannot archive a socket %s", arcn->org_name);
+ pax_warn(1, "Tar cannot archive a socket %s", arcn->org_name);
return(1);
case PAX_FIF:
- warn(1, "Tar cannot archive a fifo %s", arcn->org_name);
+ pax_warn(1, "Tar cannot archive a fifo %s", arcn->org_name);
return(1);
case PAX_SLK:
case PAX_HLK:
case PAX_HRG:
if (arcn->ln_nlen > sizeof(hd->linkname)) {
- warn(1,"Link name too long for tar %s", arcn->ln_name);
+ pax_warn(1,"Link name too long for tar %s", arcn->ln_name);
return(1);
}
break;
@@ -607,7 +607,7 @@ tar_wr(arcn)
if (arcn->type == PAX_DIR)
++len;
if (len > sizeof(hd->name)) {
- warn(1, "File name too long for tar %s", arcn->name);
+ pax_warn(1, "File name too long for tar %s", arcn->name);
return(1);
}
@@ -663,7 +663,7 @@ tar_wr(arcn)
if (uqd_oct((u_quad_t)arcn->sb.st_size, hd->size,
sizeof(hd->size), 1)) {
# endif
- warn(1,"File is too large for tar %s", arcn->org_name);
+ pax_warn(1,"File is too large for tar %s", arcn->org_name);
return(1);
}
arcn->pad = TAR_PAD(arcn->sb.st_size);
@@ -698,7 +698,7 @@ tar_wr(arcn)
/*
* header field is out of range
*/
- warn(1, "Tar header field is too small for %s", arcn->org_name);
+ pax_warn(1, "Tar header field is too small for %s", arcn->org_name);
return(1);
}
@@ -968,7 +968,7 @@ ustar_wr(arcn)
* check for those file system types ustar cannot store
*/
if (arcn->type == PAX_SCK) {
- warn(1, "Ustar cannot archive a socket %s", arcn->org_name);
+ pax_warn(1, "Ustar cannot archive a socket %s", arcn->org_name);
return(1);
}
@@ -977,7 +977,7 @@ ustar_wr(arcn)
*/
if (((arcn->type == PAX_SLK) || (arcn->type == PAX_HLK) ||
(arcn->type == PAX_HRG)) && (arcn->ln_nlen > sizeof(hd->linkname))){
- warn(1, "Link name too long for ustar %s", arcn->ln_name);
+ pax_warn(1, "Link name too long for ustar %s", arcn->ln_name);
return(1);
}
@@ -986,7 +986,7 @@ ustar_wr(arcn)
* pt != arcn->name, the name has to be split
*/
if ((pt = name_split(arcn->name, arcn->nlen)) == NULL) {
- warn(1, "File name too long for ustar %s", arcn->name);
+ pax_warn(1, "File name too long for ustar %s", arcn->name);
return(1);
}
hd = (HD_USTAR *)hdblk;
@@ -1080,7 +1080,7 @@ ustar_wr(arcn)
if (uqd_oct((u_quad_t)arcn->sb.st_size, hd->size,
sizeof(hd->size), 3)) {
# endif
- warn(1,"File is too long for ustar %s",arcn->org_name);
+ pax_warn(1,"File is too long for ustar %s",arcn->org_name);
return(1);
}
break;
@@ -1121,7 +1121,7 @@ ustar_wr(arcn)
/*
* header field is out of range
*/
- warn(1, "Ustar header field is too small for %s", arcn->org_name);
+ pax_warn(1, "Ustar header field is too small for %s", arcn->org_name);
return(1);
}
diff --git a/bin/pax/tty_subs.c b/bin/pax/tty_subs.c
index 5aadb2b..51272ac 100644
--- a/bin/pax/tty_subs.c
+++ b/bin/pax/tty_subs.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: tty_subs.c,v 1.6 1997/02/22 14:04:47 peter Exp $
*/
#ifndef lint
@@ -93,7 +93,7 @@ tty_init()
}
if (iflag) {
- warn(1, "Fatal error, cannot open %s", DEVTTY);
+ pax_warn(1, "Fatal error, cannot open %s", DEVTTY);
return(-1);
}
return(0);
@@ -161,17 +161,17 @@ tty_read(str, len)
}
/*
- * warn()
- * write a warning message to stderr. if "set" the exit value of pax
+ * pax_warn()
+ * write a pax_warning message to stderr. if "set" the exit value of pax
* will be non-zero.
*/
#if __STDC__
void
-warn(int set, char *fmt, ...)
+pax_warn(int set, char *fmt, ...)
#else
void
-warn(set, fmt, va_alist)
+pax_warn(set, fmt, va_alist)
int set;
char *fmt;
va_dcl
@@ -200,17 +200,17 @@ warn(set, fmt, va_alist)
}
/*
- * syswarn()
- * write a warning message to stderr. if "set" the exit value of pax
+ * sys_warn()
+ * write a pax_warning message to stderr. if "set" the exit value of pax
* will be non-zero.
*/
#if __STDC__
void
-syswarn(int set, int errnum, char *fmt, ...)
+sys_warn(int set, int errnum, char *fmt, ...)
#else
void
-syswarn(set, errnum, fmt, va_alist)
+sys_warn(set, errnum, fmt, va_alist)
int set;
int errnum;
char *fmt;
OpenPOWER on IntegriCloud