[ale] Kernel Question: unlink?

linuxhat at mailandnews.com linuxhat at mailandnews.com
Fri Jul 30 18:50:51 EDT 1999


OK.  big evil nassssty hairy kernel question for you (I'm doing a semi-hairy
device driver).  I want to do dynamic allocation of the device major number
(by register_chrdev(0...)), then create the device file on the fly.  This is
all well and good until unload time, at which point I want to call unlink().
There's a kernel version of mknod (do_mknod) that links up just fine.... but
there's no unlink with the usual semantics (char *pathname).  I found a
do_unlink in the kernel source, but it's inlined, not exported.  Do I have
to rip that off, or is there another entry point I can use to blow away that
device file when I exit?  Or am I totally barking up the wrong tree?  Or do
I just need to go get a static number for this device and satisfy myself
with that?  (I'd really rather not if I could....)

-- Glenn
The five minutes after 9am are far more valuable 
than the five HOURS after 5pm.  -- me, been there, done that






More information about the Ale mailing list