Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Nov 2000 15:54:39 -0500
From:      Marcel Moolenaar <marcel@cup.hp.com>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Andrew Gallatin <gallatin@cs.duke.edu>, freebsd-current@FreeBSD.ORG
Subject:   Re: linux emulation
Message-ID:  <3A00830F.70D9CC14@cup.hp.com>
References:  <22796.973109819@critter>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A00830F.70D9CC14>