Subject: bin/17884: \n in err/warn
To: None <>
From: Martin J. Laubach <>
List: netbsd-bugs
Date: 08/08/2002 23:45:09
>Number:         17884
>Category:       bin
>Synopsis:       There are \n in warn/err/warnx/errx
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 08 14:46:00 PDT 2002
>Originator:     Martin J. Laubach
>Release:        NetBSD 1.6D
System: NetBSD 1.6D NetBSD 1.6D (CELERY) #8: Mon Aug 5 04:53:51 CEST 2002 macppc
Architecture: powerpc
Machine: macppc

  An automated audit of our source tree brought the list below
of err/warn() calls with \n in the text.

  This PR is mainly to remind me to do that, but if someone
beats me to it, feel free! Also I'm not sure whether some programs
don't use their own versions of warn/err().

! ./dist/dhcp/common/parse.c: warn((cfile, "Unexpected integer size: %d\n", size))
! ./dist/dhcp/common/parse.c: warn((cfile, "Unexpected integer size: %d\n", size))
! ./dist/dhcp/server/confpars.c: warn((cfile, "Too many %s parameters in lease %s\n", tbuf, piaddr (lease -> ip_addr)))
! ./lib/libedit/TEST/test.c: err((1, "%d: %s\n", lastevent, ev.str))
! ./libexec/ld.elf_so/rtld.c: errx((1, "%s\n", msg))
! ./libexec/utmp_update/utmp_update.c: errx((1, "Invalid utmpx type %d\n", (int)utx->ut_type))
! ./regress/sys/fs/lfs/9994/9994_f.c: errx((1, "usage: %s [-b bsize] [-c control-dir] [-n count] [-pq] [-s randseed]\n", prog))
! ./sbin/fsck_lfs/main.c: warn(("-i given, skipping free list check\n"))
! ./sbin/fsck_lfs/pass0.c: warn(("! Ino %d free, but not on the free list\n", ino))
! ./sbin/fsck_lfs/pass0.c: warn(("WARNING: segment begins at 0x%llx, should be 0x%llx\n", (long long unsigned)addr, (long long unsigned)(segnum * db_ssize + fs->lfs_sboffs[0])))
! ./sbin/fsck_lfs/pass0.c: warn(("SEGMENT %d has %d ninos, not %d\n", segnum, ninos, su_ninos))
! ./sbin/fsck_lfs/pass0.c: warn(("SEGMENT %d has %d summaries, not %d\n", segnum, psegnum, su_nsums))
! ./sbin/fsck_lfs/pass0.c: warn(("Not enough inode blocks in pseg at 0x%x: found %d, wanted %d\n", pseg_addr, j, howmany(sp->ss_ninos, INOPB(fs))))
! ./sbin/fsck_lfs/pass0.c: warn(("*idp=%x, daddr=%x\n", *idp, daddr))
! ./sbin/fsck_lfs/pass0.c: warn(("Partial segment at 0x%x data checksum mismatch: got 0x%x, expected 0x%x\n", pseg_addr, sp->ss_datasum, ccksum))
! ./sbin/fsck_lfs/pass1.c: warn(("mode=o%o, ifmt=o%o\n", dp->di_mode, mode))
! ./sbin/fsck_lfs/pass5.c: warn(("dmeta given as %d, should be %ld\n", sblock.lfs_dmeta, dmeta))
! ./sbin/fsck_lfs/pass5.c: warn(("avail given as %d, should be %ld\n", sblock.lfs_avail, avail))
! ./sbin/fsck_lfs/pass5.c: warn(("nclean given as %d, should be %d\n", sblock.lfs_nclean, nclean))
! ./sbin/fsck_lfs/pass5.c: warn(("bfree given as %d, should be between %ld and %ld\n", sblock.lfs_bfree, sblock.lfs_dsize - ubb - labelskew, sblock.lfs_dsize - bb - labelskew))
! ./sbin/fsck_lfs/setup.c: warn(("sb0 sn=%lld, sb1 sn=%lld\n", (long long)sb0->lfs_serial, (long long)sblock.lfs_serial))
! ./sbin/fsck_lfs/setup.c: warn(("sb0 %lld, sb1 %lld\n", (long long)sb0->lfs_otstamp, (long long)sblock.lfs_otstamp))
! ./sbin/fsck_lfs/setup.c: warn(("Checkpoint verified, recovered %lld seconds of data\n", (long long)nsb->lfs_tstamp - (long long)osb->lfs_tstamp))
! ./sbin/fsck_lfs/setup.c: warn(("Checkpoint invalid, lost %lld seconds of data\n", (long long)nsb->lfs_tstamp - (long long)osb->lfs_tstamp))
! ./sbin/fsck_msdos/check.c: warn(("%d files, %d free (%d clusters)\n", boot.NumFiles, boot.NumFree * boot.ClusterSize / 1024, boot.NumFree))
! ./sbin/fsck_msdos/dir.c: warn(("size of %s is %u, should at most be %u\n", fullpath(dir), dir->size, physicalSize))
! ./sbin/fsck_msdos/dir.c: warn(("%s has clusters, but size 0\n", fullpath(&dirent)))
! ./sbin/fsck_msdos/fat.c: warn(("Cluster %u is marked %s in FAT 0, %s in FAT %d\n", cl, rsrvdcltype(*cp1), rsrvdcltype(*cp2), fatnum))
! ./sbin/fsck_msdos/fat.c: warn(("Cluster %u is marked %s in FAT 0, but continues with cluster %u in FAT %d\n", cl, rsrvdcltype(*cp1), *cp2, fatnum))
! ./sbin/fsck_msdos/fat.c: warn(("Cluster %u continues with cluster %u in FAT 0, but is marked %s in FAT %d\n", cl, *cp1, rsrvdcltype(*cp2), fatnum))
! ./sbin/fsck_msdos/fat.c: warn(("Cluster %u continues with cluster %u in FAT 0, but with cluster %u in FAT %d\n", cl, *cp1, *cp2, fatnum))
! ./gnu/dist/sendmail/sendmail/map.c: err(("too many fields, %d max\n", blen))
! ./gnu/dist/sendmail/sendmail/map.c: err(("too many substrings, %d max\n", MAX_MATCH))
! ./gnu/dist/sendmail/sendmail/readcf.c: err(("M%s: P=[TCP] is deprecated, use P=[IPC] instead\n", m->m_name))
! ./sys/arch/amiga/stand/bootblock/aout2bb/aout2bb.c: err((1, "Unable to allocate memory\n"))
! ./sys/arch/amiga/stand/loadbsd/loadbsd.c: err((20, "unable to read kernel image\n"))
! ./sys/arch/amiga/stand/loadbsd/loadbsd.c: err((20, "newer loadbsd required: %d\n", *kvers))
! ./sys/arch/atari/stand/installboot/installboot.c: warnx(("Cannot stat %s, no bootversion check done\n", _PATH_UNIX))