Subject: bin/799: "savecore -v" prints wrong values; fix included
To: None <gnats-admin@NetBSD.ORG>
From: Lon Willett <lon%softt.uucp@math.utah.edu>
List: netbsd-bugs
Date: 02/14/1995 18:20:08
>Number: 799
>Category: bin
>Synopsis: "savecore -v" prints wrong values; fix included
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 14 18:20:07 1995
>Originator: Lon Willett
>Organization:
>Release: NetBSD-current 14 Feb 95
>Environment:
System: NetBSD hilly 1.0A NetBSD 1.0A (HILLY) #106: Mon Feb 13 16:14:32 MST 1995 lon@hilly:/usr/src/sys/arch/i386/compile/HILLY i386
>Description:
"savecore -v" prints the wrong value for "dumplo" (it scales it
down by DEV_BSIZE bytes). It looks like a few lines of code got
rearranged, and this requires a minor change.
>How-To-Repeat:
Run "savecore -v" with a valid dump available.
>Fix:
Here the "diff -u".
--- usr/src/sbin/savecore/savecore.c.orig Wed Jan 4 04:14:29 1995
+++ usr/src/sbin/savecore/savecore.c Mon Feb 13 01:07:20 1995
@@ -242,7 +242,7 @@
(void)Read(kmem, &dumplo, sizeof(dumplo));
if (verbose)
(void)printf("dumplo = %d (%d * %d)\n",
- dumplo, dumplo/DEV_BSIZE, DEV_BSIZE);
+ dumplo*DEV_BSIZE, dumplo, DEV_BSIZE);
Lseek(kmem, (off_t)current_nl[X_DUMPMAG].n_value, L_SET);
(void)Read(kmem, &dumpmag, sizeof(dumpmag));
dumplo *= DEV_BSIZE;
>Audit-Trail:
>Unformatted: