diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-06-11 06:41:56 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-06-11 06:41:56 +0000 |
commit | 8a9719310ac5463126ef3eec984d2d38f58e851e (patch) | |
tree | 7eeb0f7c13108018057e83b9666bc315c747c21e /bin/pax/file_subs.c | |
parent | 8db8a379747ee056c46b16e020c29c8a5829e357 (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/file_subs.c')
-rw-r--r-- | bin/pax/file_subs.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/bin/pax/file_subs.c b/bin/pax/file_subs.c index f37ef0d68ab..3727e0fc1ee 100644 --- a/bin/pax/file_subs.c +++ b/bin/pax/file_subs.c @@ -53,7 +53,6 @@ static char rcsid[] = "$NetBSD: file_subs.c,v 1.4 1995/03/21 09:07:18 cgd Exp $" #include <fcntl.h> #include <string.h> #include <stdio.h> -#include <ctype.h> #include <errno.h> #include <sys/uio.h> #include <stdlib.h> @@ -211,7 +210,7 @@ lnk_creat(arcn) } if (S_ISDIR(sb.st_mode)) { - warn(1, "A hard link to the directory %s is not allowed", + paxwarn(1, "A hard link to the directory %s is not allowed", arcn->ln_name); return(-1); } @@ -283,7 +282,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", + paxwarn(1, "Unable to copy %s, file would overwrite itself", arcn->name); return(0); } @@ -330,7 +329,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); + paxwarn(1, "Unable to link file %s to itself", to); return(-1);; } @@ -430,7 +429,7 @@ node_creat(arcn) /* * Skip sockets, operation has no meaning under BSD */ - warn(0, + paxwarn(0, "%s skipped. Sockets cannot be copied or extracted", arcn->name); return(-1); @@ -446,7 +445,7 @@ node_creat(arcn) /* * we should never get here */ - warn(0, "%s has an unknown file type, skipping", + paxwarn(0, "%s has an unknown file type, skipping", arcn->name); return(-1); } @@ -1046,11 +1045,11 @@ 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); + paxwarn(1, "File changed size %s", arcn->org_name); else if (fstat(fd, &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 read", arcn->org_name); + paxwarn(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); else { |