From nobody@FreeBSD.org  Fri Mar 13 04:29:48 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 93D72106567B
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 13 Mar 2009 04:29:48 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 81EB68FC26
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 13 Mar 2009 04:29:48 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n2D4TmYl016276
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 13 Mar 2009 04:29:48 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n2D4TmC7016275;
	Fri, 13 Mar 2009 04:29:48 GMT
	(envelope-from nobody)
Message-Id: <200903130429.n2D4TmC7016275@www.freebsd.org>
Date: Fri, 13 Mar 2009 04:29:48 GMT
From: Henric Jungheim <henric@comcast.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: "dump W" uses %c instead of %d for reporting dump level
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         132591
>Category:       bin
>Synopsis:       [patch] dump(8): "dump W" uses %c instead of %d for reporting dump level
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 13 04:30:01 UTC 2009
>Closed-Date:    Sat Apr 24 13:35:21 UTC 2010
>Last-Modified:  Sat Apr 24 13:35:21 UTC 2010
>Originator:     Henric Jungheim
>Release:        8.0-CURRENT
>Organization:
>Environment:
FreeBSD sark 8.0-CURRENT FreeBSD 8.0-CURRENT #8: Sat Feb 28 19:26:57 PST 2009     root@sark:/backup/obj/usr/src/sys/SARK  amd64
>Description:
"dump W" reports the dump level integer as a char.  Both the FDEBUG code in itime.c/getrecord() and the sscanf() in itime.c/makedumpdate() use %d.  However, optr.c/lastdump() uses %c.
>How-To-Repeat:
run "dump W"
>Fix:
Attached (use %d instead of %c).

Patch attached with submission follows:

Index: optr.c
===================================================================
RCS file: /share/anoncvs/cvs/freebsd/src/sbin/dump/optr.c,v
retrieving revision 1.36
diff -p -u -r1.36 optr.c
--- optr.c	2 Mar 2009 03:08:46 -0000	1.36
+++ optr.c	13 Mar 2009 04:15:03 -0000
@@ -406,7 +406,7 @@ lastdump(int arg)	/* w ==> just what to 
 		};
 		if (arg != 'w' || dumpme)
 			(void) printf(
-			    "%c %8s\t(%6s) Last dump: Level %c, Date %s\n",
+			    "%c %8s\t(%6s) Last dump: Level %d, Date %s\n",
 			    dumpme && (arg != 'w') ? '>' : ' ',
 			    dtwalk->dd_name,
 			    dt ? dt->fs_file : "",


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: jh 
State-Changed-When: Sat Apr 24 13:35:20 UTC 2010 
State-Changed-Why:  
Duplicate of bin/129110. Fixed in r193022. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132591 
>Unformatted:
