Re: Why side-effects on open(2) are evil. (was Re: [RFD w/info-PATCH]device arguments from lookup)

Jeff Garzik
2001-05-19T23:32:07Z

Are we talking about device arguments just for chrdevs and blkdevs?
(ie. drivers) or for regular files too?

Speaking about drivers specifically, a controlling miscdev, one per
device or one per group of devices depending on your needs, is a much
more clean solution for passing ioctl-type data. You are free to come
up with whatever method of communication with the driver is most
efficient for your needs -- without perverting open(2).

Notice also a "metadata miscdev" solves the problem of passing options
on open -- just pass those options to the miscdev before you open it...

metadata miscdevs are a clean solution to what procfs hacks and ioctls
are trying to accomplish.

Jeff

--
Jeff Garzik | "Do you have to make light of everything?!"
Building 1024 | "I'm extremely serious about nailing your
MandrakeSoft | step-daughter, but other than that, yes."