Date: Fri, 13 Mar 2009 04:29:48 GMT From: Henric Jungheim <henric@comcast.net> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/132591: "dump W" uses %c instead of %d for reporting dump level Message-ID: <200903130429.n2D4TmC7016275@www.freebsd.org> Resent-Message-ID: <200903130430.n2D4U18T007981@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903130429.n2D4TmC7016275>