>
> When a clone open occurs the initial open is to {clone,maj} with the
> driver's open routine being called with {maj,0} and the clone flag
> set. The driver returns an updated {maj,min} to use. If this {maj,min} is
> currently not open then STREAMS simply uses the stream head structure that
> was originally for {clone,maj} to operate {maj,min}.
>
> So far, so good.
>
> But what happens if a clone open returns a {maj,min} that is already
> open? At the moment, LiS does NOT call the open routine of the driver that
> owns {maj,min}, on the theory that the driver open routine was already
> called via the clone driver.
You've lost me here. How could a clone open return a (maj,min) that is already open WITHOUT calling the open routine
of the driver that owns {maj} (never mind minor). I'm under the impression that selection of minor in a cloneopen is entirely
up to the specific driver.
I am just supposing that a driver handling a clone open MIGHT decide to select a minor device that happens to be open already. LiS handles this case, but does not call the open routine for the {maj,min} stream so designated (it was called originally when it was first opened).
A glance at Solaris source code suggests that they will just create a second stream head to the {maj,min}, which will probably lead to trouble later.
So maybe LiS is unique in considering this to be a sensible case.
-- Dave
_______________________________________________ Linux-streams mailing list [EMAIL PROTECTED] http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams
