bin/132591: "dump W" uses %c instead of %d for reporting dump level

Henric Jungheim henric at comcast.net
Thu Mar 12 21:30:02 PDT 2009


>Number:         132591
>Category:       bin
>Synopsis:       "dump W" uses %c instead of %d for reporting dump level
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 13 04:30:01 UTC 2009
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:


More information about the freebsd-bugs mailing list