Date: Sat, 31 Oct 1998 22:47:39 +0900 (JST) From: junichi@jp.FreeBSD.ORG To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/8523: libdisk problem. Message-ID: <199810311347.WAA06615@atlantis.junichi.org>
next in thread | raw e-mail | index | archive | help
>Number: 8523
>Category: bin
>Synopsis: The Write_Disk() doesn't support any length of device name.
>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: Sat Oct 31 21:50:00 PST 1998
>Last-Modified:
>Originator: Junichi Satoh
>Organization:
>Release: FreeBSD 3.0-CURRENT i386
>Environment:
FreeBSD-2.2.x, FreeBSD-3.0-current
>Description:
The Write_Disk() doesn't support any length of device names.
It supports only two characters, wd, da, etc...
>How-To-Repeat:
On /stand/sysinsatll, we can not create slices on 'wfd' devices.
>Fix:
Apply following patch to /usr/lib/libdisk/write_disk.c.
It's for -current.
*** write_disk.c.org Tue Oct 6 20:57:08 1998
--- write_disk.c Thu Oct 22 21:46:09 1998
***************
*** 64,73 ****
for(c2=c1->part;c2;c2=c2->next) {
if (c2->type == unused) continue;
if (!strcmp(c2->name,"X")) continue;
! j = c2->name[5] - 'a';
if (j < 0 || j >= MAXPARTITIONS || j == RAW_PART) {
#ifdef DEBUG
! warn("Weird parititon letter %c",c2->name[5]);
#endif
continue;
}
--- 64,73 ----
for(c2=c1->part;c2;c2=c2->next) {
if (c2->type == unused) continue;
if (!strcmp(c2->name,"X")) continue;
! j = c2->name[strlen(new->name) + 2] - 'a';
if (j < 0 || j >= MAXPARTITIONS || j == RAW_PART) {
#ifdef DEBUG
! warn("Weird parititon letter %c",c2->name[strlen(new->name) + 2]);
#endif
continue;
}
***************
*** 172,178 ****
for (c1=d1->chunks->part; c1 ; c1 = c1->next) {
if (c1->type == unused) continue;
if (!strcmp(c1->name,"X")) continue;
! j = c1->name[4] - '1';
if (j < 0 || j > 3)
continue;
s[j]++;
--- 172,178 ----
for (c1=d1->chunks->part; c1 ; c1 = c1->next) {
if (c1->type == unused) continue;
if (!strcmp(c1->name,"X")) continue;
! j = c1->name[strlen(d1->name) + 1] - '1';
if (j < 0 || j > 3)
continue;
s[j]++;
>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?199810311347.WAA06615>
