diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-07-18 05:49:05 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-07-18 05:49:05 +0000 |
commit | 5cf4c19e580959337edd9b18ca93c1bc69d25b81 (patch) | |
tree | c9ce2399efd662a3ccbc5a0214da8aed2801c446 | |
parent | 746f76d401703e14909551c837fbeb052487791d (diff) |
err() -> error() so we don't conflict with err(3).
-rw-r--r-- | usr.sbin/mtree/compare.c | 6 | ||||
-rw-r--r-- | usr.sbin/mtree/create.c | 24 | ||||
-rw-r--r-- | usr.sbin/mtree/extern.h | 4 | ||||
-rw-r--r-- | usr.sbin/mtree/misc.c | 8 | ||||
-rw-r--r-- | usr.sbin/mtree/mtree.c | 12 | ||||
-rw-r--r-- | usr.sbin/mtree/spec.c | 46 | ||||
-rw-r--r-- | usr.sbin/mtree/verify.c | 6 |
7 files changed, 53 insertions, 53 deletions
diff --git a/usr.sbin/mtree/compare.c b/usr.sbin/mtree/compare.c index 16ab1d9494c..f353d5f04ff 100644 --- a/usr.sbin/mtree/compare.c +++ b/usr.sbin/mtree/compare.c @@ -1,5 +1,5 @@ /* $NetBSD: compare.c,v 1.11 1996/09/05 09:56:48 mycroft Exp $ */ -/* $OpenBSD: compare.c,v 1.8 1997/07/18 05:46:11 millert Exp $ */ +/* $OpenBSD: compare.c,v 1.9 1997/07/18 05:49:02 millert Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: compare.c,v 1.8 1997/07/18 05:46:11 millert Exp $"; +static char rcsid[] = "$OpenBSD: compare.c,v 1.9 1997/07/18 05:49:02 millert Exp $"; #endif #endif /* not lint */ @@ -340,7 +340,7 @@ rlink(name) register int len; if ((len = readlink(name, lbuf, sizeof(lbuf))) == -1) - err("%s: %s", name, strerror(errno)); + error("%s: %s", name, strerror(errno)); lbuf[len] = '\0'; return (lbuf); } diff --git a/usr.sbin/mtree/create.c b/usr.sbin/mtree/create.c index d458f4cef92..b2997e6cf46 100644 --- a/usr.sbin/mtree/create.c +++ b/usr.sbin/mtree/create.c @@ -1,5 +1,5 @@ /* $NetBSD: create.c,v 1.11 1996/09/05 09:24:19 mycroft Exp $ */ -/* $OpenBSD: create.c,v 1.8 1997/07/18 05:46:12 millert Exp $ */ +/* $OpenBSD: create.c,v 1.9 1997/07/18 05:49:02 millert Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: create.c,v 1.8 1997/07/18 05:46:12 millert Exp $"; +static char rcsid[] = "$OpenBSD: create.c,v 1.9 1997/07/18 05:49:02 millert Exp $"; #endif #endif /* not lint */ @@ -95,7 +95,7 @@ cwalk() argv[0] = "."; argv[1] = NULL; if ((t = fts_open(argv, ftsoptions, dsort)) == NULL) - err("fts_open: %s", strerror(errno)); + error("fts_open: %s", strerror(errno)); while ((p = fts_read(t))) { if (iflag) indent = p->fts_level * 4; @@ -161,7 +161,7 @@ statf(indent, p) if ((pw = getpwuid(p->fts_statp->st_uid)) != NULL) { output(indent, &offset, "uname=%s", pw->pw_name); } else { - err("could not get uname for uid=%u", + error("could not get uname for uid=%u", p->fts_statp->st_uid); } } @@ -173,7 +173,7 @@ statf(indent, p) if ((gr = getgrgid(p->fts_statp->st_gid)) != NULL) { output(indent, &offset, "gname=%s", gr->gr_name); } else { - err("could not get gname for gid=%u", + error("could not get gname for gid=%u", p->fts_statp->st_gid); } } @@ -193,7 +193,7 @@ statf(indent, p) if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) { if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0 || crc(fd, &val, &len)) - err("%s: %s", p->fts_accpath, strerror(errno)); + error("%s: %s", p->fts_accpath, strerror(errno)); (void)close(fd); output(indent, &offset, "cksum=%lu", val); } @@ -202,7 +202,7 @@ statf(indent, p) md5digest = MD5File(p->fts_accpath,buf); if (!md5digest) - err("%s: %s", p->fts_accpath, strerror(errno)); + error("%s: %s", p->fts_accpath, strerror(errno)); else output(indent, &offset, "md5digest=%s", md5digest); } @@ -211,7 +211,7 @@ statf(indent, p) rmd160digest = RMD160File(p->fts_accpath,buf); if (!rmd160digest) - err("%s: %s", p->fts_accpath, strerror(errno)); + error("%s: %s", p->fts_accpath, strerror(errno)); else output(indent, &offset, "rmd160digest=%s", rmd160digest); } @@ -220,7 +220,7 @@ statf(indent, p) sha1digest = SHA1File(p->fts_accpath,buf); if (!sha1digest) - err("%s: %s", p->fts_accpath, strerror(errno)); + error("%s: %s", p->fts_accpath, strerror(errno)); else output(indent, &offset, "sha1digest=%s", sha1digest); } @@ -261,7 +261,7 @@ statd(t, parent, puid, pgid, pmode) if ((p = fts_children(t, 0)) == NULL) { if (errno) - err("%s: %s", RP(parent), strerror(errno)); + error("%s: %s", RP(parent), strerror(errno)); return (1); } @@ -306,14 +306,14 @@ statd(t, parent, puid, pgid, pmode) if ((pw = getpwuid(saveuid)) != NULL) (void)printf(" uname=%s", pw->pw_name); else - err("could not get uname for uid=%u", saveuid); + error("could not get uname for uid=%u", saveuid); if (keys & F_UID) (void)printf(" uid=%u", saveuid); if (keys & F_GNAME) if ((gr = getgrgid(savegid)) != NULL) (void)printf(" gname=%s", gr->gr_name); else - err("could not get gname for gid=%u", savegid); + error("could not get gname for gid=%u", savegid); if (keys & F_GID) (void)printf(" gid=%u", savegid); if (keys & F_MODE) diff --git a/usr.sbin/mtree/extern.h b/usr.sbin/mtree/extern.h index 456d6da9217..eea6c805b73 100644 --- a/usr.sbin/mtree/extern.h +++ b/usr.sbin/mtree/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.2 1996/12/08 01:13:39 niklas Exp $ */ +/* $OpenBSD: extern.h,v 1.3 1997/07/18 05:49:03 millert Exp $ */ /* $NetBSD: extern.h,v 1.3 1995/03/07 21:12:07 cgd Exp $ */ /*- @@ -39,7 +39,7 @@ int compare __P((char *, NODE *, FTSENT *)); int crc __P((int, u_int32_t *, u_int32_t *)); void cwalk __P((void)); -void err __P((const char *, ...)); +void error __P((const char *, ...)); char *inotype __P((u_int)); u_int parsekey __P((char *, int *)); char *rlink __P((char *)); diff --git a/usr.sbin/mtree/misc.c b/usr.sbin/mtree/misc.c index 030614e154b..7ce6ba40cbe 100644 --- a/usr.sbin/mtree/misc.c +++ b/usr.sbin/mtree/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.6 1997/07/18 05:46:12 millert Exp $ */ +/* $OpenBSD: misc.c,v 1.7 1997/07/18 05:49:03 millert Exp $ */ /* $NetBSD: misc.c,v 1.4 1995/03/07 21:26:23 cgd Exp $ */ /*- @@ -85,7 +85,7 @@ parsekey(name, needvaluep) k = (KEY *)bsearch(&tmp, keylist, sizeof(keylist) / sizeof(KEY), sizeof(KEY), keycompare); if (k == NULL) - err("unknown keyword %s", name); + error("unknown keyword %s", name); if (needvaluep) *needvaluep = k->flags & NEEDVALUE ? 1 : 0; @@ -107,9 +107,9 @@ keycompare(a, b) void #if __STDC__ -err(const char *fmt, ...) +error(const char *fmt, ...) #else -err(fmt, va_alist) +error(fmt, va_alist) char *fmt; va_dcl #endif diff --git a/usr.sbin/mtree/mtree.c b/usr.sbin/mtree/mtree.c index 6276bfd053d..7167e63fc3c 100644 --- a/usr.sbin/mtree/mtree.c +++ b/usr.sbin/mtree/mtree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mtree.c,v 1.6 1997/07/18 05:46:13 millert Exp $ */ +/* $OpenBSD: mtree.c,v 1.7 1997/07/18 05:49:03 millert Exp $ */ /* $NetBSD: mtree.c,v 1.7 1996/09/05 23:29:22 thorpej Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mtree.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: mtree.c,v 1.6 1997/07/18 05:46:13 millert Exp $"; +static char rcsid[] = "$OpenBSD: mtree.c,v 1.7 1997/07/18 05:49:03 millert Exp $"; #endif #endif /* not lint */ @@ -92,7 +92,7 @@ main(argc, argv) break; case 'f': if (!(freopen(optarg, "r", stdin))) - err("%s: %s", optarg, strerror(errno)); + error("%s: %s", optarg, strerror(errno)); break; case 'i': iflag = 1; @@ -121,7 +121,7 @@ main(argc, argv) sflag = 1; crc_total = ~strtol(optarg, &p, 0); if (*p) - err("illegal seed value -- %s", optarg); + error("illegal seed value -- %s", optarg); case 't': tflag = 1; break; @@ -146,10 +146,10 @@ main(argc, argv) usage(); if (dir && chdir(dir)) - err("%s: %s", dir, strerror(errno)); + error("%s: %s", dir, strerror(errno)); if ((cflag || sflag) && !getwd(fullpath)) - err("%s", fullpath); + error("%s", fullpath); if (cflag) { cwalk(); diff --git a/usr.sbin/mtree/spec.c b/usr.sbin/mtree/spec.c index 463024fca92..d5e3655c5f5 100644 --- a/usr.sbin/mtree/spec.c +++ b/usr.sbin/mtree/spec.c @@ -1,5 +1,5 @@ /* $NetBSD: spec.c,v 1.6 1995/03/07 21:12:12 cgd Exp $ */ -/* $OpenBSD: spec.c,v 1.8 1997/07/18 05:46:14 millert Exp $ */ +/* $OpenBSD: spec.c,v 1.9 1997/07/18 05:49:04 millert Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)spec.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: spec.c,v 1.8 1997/07/18 05:46:14 millert Exp $"; +static char rcsid[] = "$OpenBSD: spec.c,v 1.9 1997/07/18 05:49:04 millert Exp $"; #endif #endif /* not lint */ @@ -79,7 +79,7 @@ spec() /* Find end of line. */ if ((p = strchr(buf, '\n')) == NULL) - err("line %d too long", lineno); + error("line %d too long", lineno); /* See if next line is continuation line. */ if (p[-1] == '\\') { @@ -107,7 +107,7 @@ spec() /* Grab file name, "$", "set", or "unset". */ if ((p = strtok(p, "\n\t ")) == NULL) - err("missing field"); + error("missing field"); if (p[0] == '/') switch(p[1]) { @@ -124,7 +124,7 @@ spec() } if (strchr(p, '/')) - err("slash character in file name"); + error("slash character in file name"); if (!strcmp(p, "..")) { /* Don't go up, if haven't gone down. */ @@ -138,11 +138,11 @@ spec() last->flags |= F_DONE; continue; -noparent: err("no parent node"); +noparent: error("no parent node"); } if ((centry = calloc(1, sizeof(NODE) + strlen(p))) == NULL) - err("%s", strerror(errno)); + error("%s", strerror(errno)); *centry = ginfo; (void)strcpy(centry->name, p); #define MAGIC "?*[" @@ -181,26 +181,26 @@ set(t, ip) for (; (kw = strtok(t, "= \t\n")); t = NULL) { ip->flags |= type = parsekey(kw, &value); if (value && (val = strtok(NULL, " \t\n")) == NULL) - err("missing value"); + error("missing value"); switch(type) { case F_CKSUM: ip->cksum = strtoul(val, &ep, 10); if (*ep) - err("invalid checksum %s", val); + error("invalid checksum %s", val); break; case F_MD5: ip->md5digest = strdup(val); if (!ip->md5digest) - err("%s", strerror(errno)); + error("%s", strerror(errno)); break; case F_GID: ip->st_gid = strtoul(val, &ep, 10); if (*ep) - err("invalid gid %s", val); + error("invalid gid %s", val); break; case F_GNAME: if ((gr = getgrnam(val)) == NULL) - err("unknown group %s", val); + error("unknown group %s", val); ip->st_gid = gr->gr_gid; break; case F_IGN: @@ -208,41 +208,41 @@ set(t, ip) break; case F_MODE: if ((m = setmode(val)) == NULL) - err("invalid file mode %s", val); + error("invalid file mode %s", val); ip->st_mode = getmode(m, 0); break; case F_NLINK: ip->st_nlink = strtoul(val, &ep, 10); if (*ep) - err("invalid link count %s", val); + error("invalid link count %s", val); break; case F_RMD160: ip->rmd160digest = strdup(val); if (!ip->rmd160digest) - err("%s", strerror(errno)); + error("%s", strerror(errno)); break; case F_SHA1: ip->sha1digest = strdup(val); if (!ip->sha1digest) - err("%s", strerror(errno)); + error("%s", strerror(errno)); break; case F_SIZE: ip->st_size = strtouq(val, &ep, 10); if (*ep) - err("invalid size %s", val); + error("invalid size %s", val); break; case F_SLINK: if ((ip->slink = strdup(val)) == NULL) - err("%s", strerror(errno)); + error("%s", strerror(errno)); break; case F_TIME: ip->st_mtimespec.tv_sec = strtoul(val, &ep, 10); if (*ep != '.') - err("invalid time %s", val); + error("invalid time %s", val); val = ep + 1; ip->st_mtimespec.tv_nsec = strtoul(val, &ep, 10); if (*ep) - err("invalid time %s", val); + error("invalid time %s", val); break; case F_TYPE: switch(*val) { @@ -273,17 +273,17 @@ set(t, ip) ip->type = F_SOCK; break; default: - err("unknown file type %s", val); + error("unknown file type %s", val); } break; case F_UID: ip->st_uid = strtoul(val, &ep, 10); if (*ep) - err("invalid uid %s", val); + error("invalid uid %s", val); break; case F_UNAME: if ((pw = getpwnam(val)) == NULL) - err("unknown user %s", val); + error("unknown user %s", val); ip->st_uid = pw->pw_uid; break; } diff --git a/usr.sbin/mtree/verify.c b/usr.sbin/mtree/verify.c index 01e991f853f..93cd6a6d076 100644 --- a/usr.sbin/mtree/verify.c +++ b/usr.sbin/mtree/verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: verify.c,v 1.4 1996/12/20 18:13:44 millert Exp $ */ +/* $OpenBSD: verify.c,v 1.5 1997/07/18 05:49:04 millert Exp $ */ /* $NetBSD: verify.c,v 1.10 1995/03/07 21:26:28 cgd Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: verify.c,v 1.4 1996/12/20 18:13:44 millert Exp $"; +static char rcsid[] = "$OpenBSD: verify.c,v 1.5 1997/07/18 05:49:04 millert Exp $"; #endif #endif /* not lint */ @@ -87,7 +87,7 @@ vwalk() argv[0] = "."; argv[1] = NULL; if ((t = fts_open(argv, ftsoptions, NULL)) == NULL) - err("fts_open: %s", strerror(errno)); + error("fts_open: %s", strerror(errno)); level = root; specdepth = rval = 0; while ((p = fts_read(t))) { |