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