From gdonl@tsc.tdk.com  Fri Oct 23 21:40:18 1998
Received: from gatekeeper.tsc.tdk.com (gatekeeper.tsc.tdk.com [207.113.159.21])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA13450
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 Oct 1998 21:40:16 -0700 (PDT)
          (envelope-from gdonl@tsc.tdk.com)
Received: from sunrise.gv.tsc.tdk.com (root@sunrise.gv.tsc.tdk.com [192.168.241.191])
	by gatekeeper.tsc.tdk.com (8.8.8/8.8.8) with ESMTP id VAA22897
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 Oct 1998 21:39:45 -0700 (PDT)
	(envelope-from gdonl@tsc.tdk.com)
Received: from w3.gv.tsc.tdk.com (gdonl@w3.gv.tsc.tdk.com [192.168.240.195])
	by sunrise.gv.tsc.tdk.com (8.8.5/8.8.5) with ESMTP id VAA10612
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 Oct 1998 21:39:43 -0700 (PDT)
Received: (from gdonl@localhost)
	by w3.gv.tsc.tdk.com (8.8.8/8.8.5) id VAA14919;
	Fri, 23 Oct 1998 21:39:22 -0700 (PDT)
Message-Id: <199810240439.VAA14919@w3.gv.tsc.tdk.com>
Date: Fri, 23 Oct 1998 21:39:22 -0700 (PDT)
From: Don Lewis <Don.Lewis@tsc.tdk.com>
Reply-To: gdonl@tsc.tdk.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] fsdb buglet
X-Send-Pr-Version: 3.2

>Number:         8427
>Category:       bin
>Synopsis:       [PATCH] fsdb buglet
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 23 21:50:00 PDT 1998
>Closed-Date:    Sun Nov 8 19:44:05 PST 1998
>Last-Modified:  Sun Nov  8 19:47:23 PST 1998
>Originator:     Don Lewis
>Release:        FreeBSD 3.0-CURRENT
>Organization:
TDK Semiconductor
>Environment:

	FreeBSD 2.1 through 3.0

>Description:

	There is a minor bug in the CMDFUNCSTART() routine in fsdb.
	The code accidentally happens to compile and run correctly because
	it finds an unrelated variable declaration in fsck.h that just
	happens to have a type that makes the code work.

	This bug needs to be fixed before Kirk McKusick's softupdates
	aware fsck can be integrated.

>How-To-Repeat:


>Fix:
	

--- fsdb/fsdb.c.orig	Mon Jun 15 00:12:19 1998
+++ fsdb/fsdb.c	Fri Oct 23 18:12:24 1998
@@ -617,7 +617,7 @@
 	return 1;
     type = curinode->di_mode & IFMT;
     for (tp = typenamemap;
-	 tp < &typenamemap[sizeof(typemap)/sizeof(*typemap)];
+	 tp < &typenamemap[sizeof(typenamemap)/sizeof(*typenamemap)];
 	 tp++) {
 	if (!strcmp(argv[1], tp->typename)) {
 	    printf("setting type to %s\n", tp->typename);
@@ -625,7 +625,7 @@
 	    break;
 	}
     }
-    if (tp == &typenamemap[sizeof(typemap)/sizeof(*typemap)]) {
+    if (tp == &typenamemap[sizeof(typenamemap)/sizeof(*typenamemap)]) {
 	warnx("type `%s' not known", argv[1]);
 	warnx("try one of `file', `dir', `socket', `fifo'");
 	return 1;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: truckman 
State-Changed-When: Sun Nov 8 19:44:05 PST 1998 
State-Changed-Why:  
Patch was applied in fsdb.c version 1.10.  It is not necessary to apply 
this patch to the 2.x branches because they do not run on the alpha 
and are not likely to get the new fsck. 
>Unformatted:
