Date: Wed, 25 Mar 1998 22:51:24 +0900 (JST) From: matutaka@osa.att.ne.jp To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/6129: Fsck's disk recognization algorithm is out of date. Message-ID: <199803251351.WAA00750@osa.att.ne.jp>
next in thread | raw e-mail | index | archive | help
>Number: 6129 >Category: bin >Synopsis: Fsck's disk recognization algorithm is out of date. >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: Wed Mar 25 06:00:01 PST 1998 >Last-Modified: >Originator: Yuichi MATSUTAKA >Organization: >Release: FreeBSD 2.2.5-RELEASE i386 >Environment: FreeBSD 2.2.5-RELEASE #0: Tue Oct 21 14:33:00 GMT 1997 jkh@time.cdrom.com:/usr/src/sys/compile/GENERIC >Description: When multiple FreeBSD slices exist on one disk drive, fsck recognizes each slice as separate disk drives. As a result, fsck -p checks each slice concurrently. In addition, this causes kernel panic reported as PR4265. >How-To-Repeat: Make multiple FreeBSD slices on one disk drive and describe these slices in /etc/fstab. >Fix: Following patch makes fsck's disk recognization algorithm properly. *** sbin/fsck/preen.c.orig Mon Oct 28 03:28:39 1996 --- sbin/fsck/preen.c Sat Mar 14 19:01:07 1998 *************** *** 206,217 **** register char *p; size_t len = 0; ! for (p = name + strlen(name) - 1; p >= name; --p) ! if (isdigit(*p)) { ! len = p - name + 1; ! break; ! } ! if (p < name) len = strlen(name); for (dk = disks, dkp = &disks; dk; dkp = &dk->next, dk = dk->next) { --- 206,216 ---- register char *p; size_t len = 0; ! if ((p = rindex(name, '/')) != 0) { ! while (*p && !isdigit(*p)) ! p++; ! len = p - name; ! } else len = strlen(name); for (dk = disks, dkp = &disks; dk; dkp = &dk->next, dk = dk->next) { >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?199803251351.WAA00750>