[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pass-through linux ioctl for mfi(4)
On Tue, Sep 18, 2012 at 02:01:25AM +0700, Robert Elz wrote:
> | Sorry but I can't see how a kernel with COMPAT_LINUX but without
> | mfi would compile.
> The way I proposed it, it wouldn't, but given that we have control
> of the mfi driver, we can do "interesting stuff" to its cdevsw.
> As a storage device driver (that's what it is, right?) it wouldn't
> normally have a d_tty, so you could give it one, and fill the
> struct tty with identifying info (values that would make no sense
> for a real tty device), and then test that instead.
> eg; Its t_dev field could be absurd, its t_oproc could be set to
> the same value as the d_stop in cdevsw (safe to call as long as the
> 2nd arg that d_stop is called with is ignored) and more...
Hacks like this have a short shelf life, so let's not...
> In any case, there are certainly things that can be done to allow you
> to directly test whether the driver you're using is a particular one
> without building in knowledge of device numbers.
> Even better might be to extend cdevsw with a field that gives the
> driver name, that would probably be useful in all kinds of places.
David A. Holland
Main Index |
Thread Index |