Make a place to store the devfs hook for the block device, as the same
specinfo is used to identify both raw and block version sof a device.
This commit is contained in:
parent
d253d56215
commit
2a1be8333d
@ -24,7 +24,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: devfs_tree.c,v 1.60 1999/08/24 20:30:15 julian Exp $
|
||||
* $Id: devfs_tree.c,v 1.61 1999/08/25 04:55:18 julian Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -1058,11 +1058,10 @@ devfs_add_to_tree(dev_t dev, uid_t uid, gid_t gid, int perms)
|
||||
uid, gid, perms, "%s", dev->si_name );
|
||||
|
||||
/* XXX HACK .. name may not start in 'r' */
|
||||
/* Also Hack.. no place to store Block cookie */
|
||||
if ((devsw->d_bmaj != -1)
|
||||
&& (dev->si_name[0] == 'r')
|
||||
&& ((devsw->d_flags & D_TYPEMASK) == D_DISK)) {
|
||||
/* dev->si_devfs =*/ devfs_add_devswf(devsw, minor(dev), DV_BLK,
|
||||
dev->si_bdevfs = devfs_add_devswf(devsw, minor(dev), DV_BLK,
|
||||
uid, gid, perms, dev->si_name + 1);
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)conf.h 8.5 (Berkeley) 1/9/95
|
||||
* $Id: conf.h,v 1.76 1999/08/20 20:24:59 julian Exp $
|
||||
* $Id: conf.h,v 1.77 1999/08/23 20:59:17 phk Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_CONF_H_
|
||||
@ -58,6 +58,7 @@ struct specinfo {
|
||||
void *si_drv1, *si_drv2;
|
||||
struct cdevsw *si_devsw;
|
||||
void *si_devfs; /* save cookie for devfs operations */
|
||||
void *si_bdevfs; /* XXX block device (should go away) */
|
||||
union {
|
||||
struct {
|
||||
struct tty *__sit_tty;
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)conf.h 8.5 (Berkeley) 1/9/95
|
||||
* $Id: conf.h,v 1.76 1999/08/20 20:24:59 julian Exp $
|
||||
* $Id: conf.h,v 1.77 1999/08/23 20:59:17 phk Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_CONF_H_
|
||||
@ -58,6 +58,7 @@ struct specinfo {
|
||||
void *si_drv1, *si_drv2;
|
||||
struct cdevsw *si_devsw;
|
||||
void *si_devfs; /* save cookie for devfs operations */
|
||||
void *si_bdevfs; /* XXX block device (should go away) */
|
||||
union {
|
||||
struct {
|
||||
struct tty *__sit_tty;
|
||||
|
Loading…
Reference in New Issue
Block a user