Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Dec 1995 03:36:11 -0800 (PST)
From:      Julian Elischer <julian@ref.tfs.com>
To:        hackers@freebsd.org
Subject:   VIP for DEVICE MAINTAINERS..PLZ READ
Message-ID:  <199512081136.DAA05733@ref.tfs.com>

next in thread | raw e-mail | index | archive | help
IF you maintain a device please read this..
(assuming it had a devsw entry)

The latest changes make the changes testted under the JREMOD ifdef  
a permenant  fact.

They Also add DEVFS support for most devices (though they don't show up
in devfs yet due to a bug in devfs)



The call that adds an entry into devfs is:
devfs_add_devsw()

it returns a token (void *) that can be used to:
1/ link another name to the same device
2/ destroy the device

it's argumants are:
1/ the path to the device within DEVFS
2/ the name of the device
3/ the address of the devsw entry the name should access
4/ the minor number
5/ whether the device is CHAR or BLK
6/ Owner UID
7/ Owner GID
8/ Permissions (e.g. rwxr--r-- = 0744)


Why am I telling you this?
because if you 'OWN' an device.. It will probably be worth your while
to 'Fix' what I've done with devfs naming  so that it fits what you
think it shold look like in /dev.
I have been very 'quick' and dirty
with devices where it was hard for me to figure out
what it was SUPPOSED to look like..

If in doubt look at a few other devices to see what I did..
scsi/st.c is probably the most comprehensive,
and most likely to be correct.. :)

a second function 
dev_link ()
allows a second name ot be linked to the token returned from an existing
name.. see st.c for an example..

julian
+----------------------------------+       ______ _  __
|   __--_|\  Julian Elischer       |       \     U \/ / On assignment
|  /       \ julian@ref.tfs.com    +------>x   USA    \ in a very strange
| (   OZ    ) 300 lakeside Dr. oakland CA. \___   ___ | country !
+- X_.---._/  USA+(510) 645-3137(wk)           \_/   \\            
          v






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