From owner-freebsd-audit Tue May 28 1:37: 2 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 1A42837B400 for ; Tue, 28 May 2002 01:36:59 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id SAA25374; Tue, 28 May 2002 18:36:46 +1000 Date: Tue, 28 May 2002 18:40:02 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Dima Dorfman Cc: Dag-Erling Smorgrav , Subject: Re: %j for printf(9) In-Reply-To: <20020528001227.E5D3E3E5E@turbine.trit.org> Message-ID: <20020528182851.G19885-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 28 May 2002, Dima Dorfman wrote: > Dag-Erling Smorgrav wrote: > > Dima Dorfman writes: > > > I would also like to solicit comments on what to do with %z; C99 says > > > this is the length modifier for size_t, but the kernel treats it as > > > signed hex. This patch implements the C99 length modifier as %Z, but > > > that probably shouldn't stay. IIRC, I couldn't find any place in the > > > kernel that we actually use %z; can it perhaps be removed? > > > > des@des ~% egrep -r '%[^\" dious]+z' /sec/freebsd/current/src/sys > > /sec/freebsd/current/src/sys/ddb/db_examine.c: db_printf("%-*lz", width, (long)value); > > /sec/freebsd/current/src/sys/ddb/db_examine.c: db_printf("%8lz", (long)addr); > > As far as I can tell, these are just implementing %z for the examine > command. If we remove %z from printf(9), we can probably remove it > from ddb examine, too. I've already said to rename %z. Its functionality can't be removed since ddb depends on it. ddb's %n has already been renamed to %r, but not completely removed. This together with -fformat-extensions not turning off non-extensions that aren't in the kernel printf() causes bugs if %n is actually used. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message