From owner-freebsd-current Wed Nov 1 12:54:44 2000 Delivered-To: freebsd-current@freebsd.org Received: from palrel1.hp.com (palrel1.hp.com [156.153.255.242]) by hub.freebsd.org (Postfix) with ESMTP id D143137B4C5 for ; Wed, 1 Nov 2000 12:54:40 -0800 (PST) Received: from adlmail.cup.hp.com (adlmail.cup.hp.com [15.0.100.30]) by palrel1.hp.com (Postfix) with ESMTP id 3F535232D; Wed, 1 Nov 2000 12:54:40 -0800 (PST) Received: from cup.hp.com (gauss.cup.hp.com [15.28.97.152]) by adlmail.cup.hp.com (8.9.3 (PHNE_18546)/8.9.3 SMKit7.02) with ESMTP id MAA10365; Wed, 1 Nov 2000 12:54:39 -0800 (PST) Message-ID: <3A00830F.70D9CC14@cup.hp.com> Date: Wed, 01 Nov 2000 15:54:39 -0500 From: Marcel Moolenaar Organization: Hewlett-Packard X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Poul-Henning Kamp Cc: Andrew Gallatin , freebsd-current@FreeBSD.ORG Subject: Re: linux emulation References: <22796.973109819@critter> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Poul-Henning Kamp wrote: > > So, where do the programs that call this syscall have the udev_t from ? Most likely from stat, lstat and fstat. > Do they know it to be a mountpoint ? That is implied by the way they get the dev_t. > Do the know it to be a bmajor > or cmajor style udev_t ? AFAICT, filesystems are always on block-devices in Linux. > Being Linux they only know one kind, right ? Linux has the distinction between block and character devices. I don't see any evidence that block devices can be accessed as character devices as well (ie: there's /dev/fd0, but no /dev/rfd0). > In that case, makebdev() has been wrong ever since we changed to > mount cdevs in FreeBSD. In the sense that we would never find the vnode and thus always return zero stats, right? > You should simply change the makebdev() to makedev() and VBLK to VCHR > in the vfinddev() right after. Right-o :-) > It's still mightily bogus though... Yes. A more dynamic solution needs to be used that creates mappings (and dev_t values) on the fly. -- Marcel Moolenaar mail: marcel@cup.hp.com / marcel@FreeBSD.org tel: (408) 447-4222 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message