summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMike Pechkin <mpech@cvs.openbsd.org>2002-03-14 06:51:43 +0000
committerMike Pechkin <mpech@cvs.openbsd.org>2002-03-14 06:51:43 +0000
commit589df74d6e3673fb8255ea0f6dbe205b69a73683 (patch)
tree90364789fc8ae5e67b30350658fc5c2e2b0fb4dd /sbin
parent50aefd34a9b151f57aa0a541ca4600e9269c8290 (diff)
Remove \n from err/errx/warn/warnx().
millert@ ok
Diffstat (limited to 'sbin')
-rw-r--r--sbin/atactl/atactl.c4
-rw-r--r--sbin/fsck/preen.c8
-rw-r--r--sbin/fsdb/fsdb.c10
-rw-r--r--sbin/fsdb/fsdbutil.c8
-rw-r--r--sbin/mount_tcfs/mount_tcfs.c4
-rw-r--r--sbin/ncheck_ffs/ncheck_ffs.c18
6 files changed, 26 insertions, 26 deletions
diff --git a/sbin/atactl/atactl.c b/sbin/atactl/atactl.c
index c491927ac31..e4f3ef4beaf 100644
--- a/sbin/atactl/atactl.c
+++ b/sbin/atactl/atactl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atactl.c,v 1.10 2002/02/16 21:27:33 millert Exp $ */
+/* $OpenBSD: atactl.c,v 1.11 2002/03/14 06:51:41 mpech Exp $ */
/* $NetBSD: atactl.c,v 1.4 1999/02/24 18:49:14 jwise Exp $ */
/*-
@@ -241,7 +241,7 @@ main(argc, argv)
if (strcmp(cmdname, commands[i].cmd_name) == 0)
break;
if (commands[i].cmd_name == NULL)
- errx(1, "unknown command: %s\n", cmdname);
+ errx(1, "unknown command: %s", cmdname);
(*commands[i].cmd_func)(argc, argv);
diff --git a/sbin/fsck/preen.c b/sbin/fsck/preen.c
index d19b4174a29..746e85c614f 100644
--- a/sbin/fsck/preen.c
+++ b/sbin/fsck/preen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: preen.c,v 1.8 2002/02/17 19:42:27 millert Exp $ */
+/* $OpenBSD: preen.c,v 1.9 2002/03/14 06:51:41 mpech Exp $ */
/* $NetBSD: preen.c,v 1.15 1996/09/28 19:21:42 christos Exp $ */
/*
@@ -105,7 +105,7 @@ checkfstab(flags, maxrun, docheck, checkit)
for (passno = 1; passno <= 2; passno++) {
if (setfsent() == 0) {
- warnx("Can't open checklist file: %s\n", _PATH_FSTAB);
+ warnx("Can't open checklist file: %s", _PATH_FSTAB);
return (8);
}
while ((fs = getfsent()) != 0) {
@@ -165,7 +165,7 @@ checkfstab(flags, maxrun, docheck, checkit)
break;
if (d == NULL) {
- warnx("Unknown pid %d\n", pid);
+ warnx("Unknown pid %d", pid);
continue;
}
@@ -307,7 +307,7 @@ addpart(type, devname, mntpt, auxarg)
for (p = d->d_part.tqh_first; p != NULL; p = p->p_entries.tqe_next)
if (strcmp(p->p_devname, devname) == 0) {
- warnx("%s in fstab more than once!\n", devname);
+ warnx("%s in fstab more than once!", devname);
return;
}
diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c
index 12d55d3f7eb..ec4c4e5ac55 100644
--- a/sbin/fsdb/fsdb.c
+++ b/sbin/fsdb/fsdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fsdb.c,v 1.9 2002/02/16 21:27:34 millert Exp $ */
+/* $OpenBSD: fsdb.c,v 1.10 2002/03/14 06:51:41 mpech Exp $ */
/* $NetBSD: fsdb.c,v 1.7 1997/01/11 06:50:53 lukem Exp $ */
/*-
@@ -598,7 +598,7 @@ CMDFUNCSTART(chname)
if ((rval & (FOUND|ALTERED)) == (FOUND|ALTERED))
return 0;
else if (rval & FOUND) {
- warnx("new name `%s' does not fit in slot %s\n", argv[2], argv[1]);
+ warnx("new name `%s' does not fit in slot %s", argv[2], argv[1]);
return 1;
} else {
warnx("no %sth slot in current directory", argv[1]);
@@ -704,7 +704,7 @@ CMDFUNCSTART(chaflags)
}
if (flags > UINT_MAX) {
- warnx("flags set beyond 32-bit range of field (%lx)\n", flags);
+ warnx("flags set beyond 32-bit range of field (%lx)", flags);
return(1);
}
curinode->di_flags = flags;
@@ -729,7 +729,7 @@ CMDFUNCSTART(chgen)
}
if (gen > INT_MAX || gen < INT_MIN) {
- warnx("gen set beyond 32-bit range of field (%lx)\n", gen);
+ warnx("gen set beyond 32-bit range of field (%lx)", gen);
return(1);
}
curinode->di_gen = gen;
@@ -753,7 +753,7 @@ CMDFUNCSTART(linkcount)
return 1;
}
if (lcnt > USHRT_MAX || lcnt < 0) {
- warnx("max link count is %d\n", USHRT_MAX);
+ warnx("max link count is %d", USHRT_MAX);
return 1;
}
diff --git a/sbin/fsdb/fsdbutil.c b/sbin/fsdb/fsdbutil.c
index f31b9b2695f..713b128ad59 100644
--- a/sbin/fsdb/fsdbutil.c
+++ b/sbin/fsdb/fsdbutil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fsdbutil.c,v 1.6 2001/07/07 18:26:13 deraadt Exp $ */
+/* $OpenBSD: fsdbutil.c,v 1.7 2002/03/14 06:51:41 mpech Exp $ */
/* $NetBSD: fsdbutil.c,v 1.5 1996/09/28 19:30:37 christos Exp $ */
/*-
@@ -38,7 +38,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: fsdbutil.c,v 1.6 2001/07/07 18:26:13 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: fsdbutil.c,v 1.7 2002/03/14 06:51:41 mpech Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -171,7 +171,7 @@ int
checkactive()
{
if (!curinode) {
- warnx("no current inode\n");
+ warnx("no current inode");
return 0;
}
return 1;
@@ -181,7 +181,7 @@ int
checkactivedir()
{
if (!curinode) {
- warnx("no current inode\n");
+ warnx("no current inode");
return 0;
}
if ((curinode->di_mode & IFMT) != IFDIR) {
diff --git a/sbin/mount_tcfs/mount_tcfs.c b/sbin/mount_tcfs/mount_tcfs.c
index de3df97ad60..46eb1264d6d 100644
--- a/sbin/mount_tcfs/mount_tcfs.c
+++ b/sbin/mount_tcfs/mount_tcfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount_tcfs.c,v 1.5 2002/02/16 21:27:36 millert Exp $ */
+/* $OpenBSD: mount_tcfs.c,v 1.6 2002/03/14 06:51:41 mpech Exp $ */
/*
* Copyright (c) 1992, 1993, 1994
@@ -107,7 +107,7 @@ main(argc, argv)
argv[0], target, argv[1]);
if (args.cipher_num == -1)
- errx(1, "cipher number not found for filesystem %s\n",
+ errx(1, "cipher number not found for filesystem %s",
argv[1]);
args.target = target;
diff --git a/sbin/ncheck_ffs/ncheck_ffs.c b/sbin/ncheck_ffs/ncheck_ffs.c
index 3d1bf1fef86..9ec14c08258 100644
--- a/sbin/ncheck_ffs/ncheck_ffs.c
+++ b/sbin/ncheck_ffs/ncheck_ffs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncheck_ffs.c,v 1.9 2002/02/16 21:27:36 millert Exp $ */
+/* $OpenBSD: ncheck_ffs.c,v 1.10 2002/03/14 06:51:41 mpech Exp $ */
/*-
* Copyright (c) 1995, 1996 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
@@ -31,7 +31,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: ncheck_ffs.c,v 1.9 2002/02/16 21:27:36 millert Exp $";
+static char rcsid[] = "$OpenBSD: ncheck_ffs.c,v 1.10 2002/03/14 06:51:41 mpech Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -223,7 +223,7 @@ bread(blkno, buf, size)
loop:
if (lseek(diskfd, ((off_t)blkno << dev_bshift), 0) < 0)
- warnx("bread: lseek fails\n");
+ warnx("bread: lseek fails");
if ((cnt = read(diskfd, buf, size)) == size)
return;
if (blkno + (size / dev_bsize) > fsbtodb(sblock, sblock->fs_size)) {
@@ -241,28 +241,28 @@ loop:
goto loop;
}
if (cnt == -1)
- warnx("read error from %s: %s: [block %d]: count=%d\n",
+ warnx("read error from %s: %s: [block %d]: count=%d",
disk, strerror(errno), blkno, size);
else
- warnx("short read error from %s: [block %d]: count=%d, got=%d\n",
+ warnx("short read error from %s: [block %d]: count=%d, got=%d",
disk, blkno, size, cnt);
if (++breaderrors > BREADEMAX)
- errx(1, "More than %d block read errors from %s\n", BREADEMAX, disk);
+ errx(1, "More than %d block read errors from %s", BREADEMAX, disk);
/*
* Zero buffer, then try to read each sector of buffer separately.
*/
memset(buf, 0, size);
for (i = 0; i < size; i += dev_bsize, buf += dev_bsize, blkno++) {
if (lseek(diskfd, ((off_t)blkno << dev_bshift), 0) < 0)
- warnx("bread: lseek2 fails!\n");
+ warnx("bread: lseek2 fails!");
if ((cnt = read(diskfd, buf, (int)dev_bsize)) == dev_bsize)
continue;
if (cnt == -1) {
- warnx("read error from %s: %s: [sector %d]: count=%ld\n",
+ warnx("read error from %s: %s: [sector %d]: count=%ld",
disk, strerror(errno), blkno, dev_bsize);
continue;
}
- warnx("short read error from %s: [sector %d]: count=%ld, got=%d\n",
+ warnx("short read error from %s: [sector %d]: count=%ld, got=%d",
disk, blkno, dev_bsize, cnt);
}
}