Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 1998 15:46:15 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, pst@juniper.net
Cc:        bde@FreeBSD.ORG, dg@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: isdisk() kludge in kernel
Message-ID:  <199801190446.PAA27810@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> >I was looking at isdisk and wanted to hurl chunks.
>> >
>> >This is used by spec_open to determine if we should be allowed to open a
>> >disk device when securelevel >= 1.
>> 
>> It isn't even used in -current.
>
>I think it is, the flag gets set elsewhere.

No it isn't.  Individual device drivers know whether they are for disks
and set the flag accordingly.  This should be fairly easy to merge
into 2.2.  The d_flags field is in both 2.2 and -current, although
it seems to be unused in 2.2 and is bogusly refered to as d_type in a
comment in conf.h in -current (*), so you just need to set it in all
the disk drivers and check it in isdisk() or inline.

(*) We got the comment but not the code from Lite2.  d_flags is only in
the bdevsw; the flags for cdevs are assumed to be the same as for bdevs.
We're missing Lite2's fix for dead_read() on ttys because there is
nowhere to set D_TTY for ttys.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801190446.PAA27810>