summaryrefslogtreecommitdiffstats
path: root/bin/pax/tables.c
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/tables.c
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/tables.c')
-rw-r--r--bin/pax/tables.c48
1 files changed, 24 insertions, 24 deletions
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;
}
OpenPOWER on IntegriCloud