Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Oct 1998 21:39:22 -0700 (PDT)
From:      Don Lewis <Don.Lewis@tsc.tdk.com>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   bin/8427: [PATCH] fsdb buglet
Message-ID:  <199810240439.VAA14919@w3.gv.tsc.tdk.com>

next in thread | raw e-mail | index | archive | help

>Number:         8427
>Category:       bin
>Synopsis:       [PATCH] fsdb buglet
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 23 21:50:00 PDT 1998
>Last-Modified:
>Originator:     Don Lewis
>Organization:
TDK Semiconductor
>Release:        FreeBSD 3.0-CURRENT
>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;
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810240439.VAA14919>