Subject: bin/14468: pcictl(8) is broken by a change to opendisk(3) that constrains iscooked=1 to block devices
To: None <gnats-bugs@gnats.netbsd.org>
From: None <uwe@ptc.spbu.ru>
List: netbsd-bugs
Date: 11/05/2001 07:04:04
>Number: 14468
>Category: bin
>Synopsis: pcictl(8) is broken by a change to opendisk(3) that constrains iscooked=1 to block devices
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 05 07:05:02 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Valeriy E. Ushakov
>Release: -current as of 2001-11-03
>Organization:
>Environment:
NetBSD krups 1.5Y NetBSD 1.5Y (KRUPS) #30: Mon Nov 5 03:05:20 MSK 2001 uwe@
brick:/usr/src/sys/arch/sparc/compile/KRUPS sparc
(yes, it's sparc, it's an uncomitted port to microSPARC-IIep
with on-board PCI controller)
>Description:
pcictl(8) uses opendisk(3) to open the /dev/pci* device and passes
iscooked = 1 to avoid prepending of the 'r' prefix to the device name.
opendisk(3) was recently changed (rev 1.8 of basesrc/lib/libutil/opendisk.c)
to check that the device opened with iscooked=1 is a block device.
This change breaks pcictl(8) since /dev/pci* are character devices.
>How-To-Repeat:
Run
$ pcictl pci0 list
pcictl: pci0: Operation not supported by device
on a -curent with rev 1.8 of opendisk.c
>Fix:
pcictl(8) shouldn't (ab)use opendisk(3) to open the device.
>Release-Note:
>Audit-Trail:
>Unformatted: