> What do you return on read if you don´t know the state?
> For some devices if you don´t set the state, you have no idea.
> You can do it in read, but it seemed more intuitive in open at the
> time, (and you don´t
> set the state on every read).
>

What I meant, is if you
write then read, the read does not set the state.
if you read then write, it does.
It is cleaner to set it on open.

The rule is simple, the first open sets the state.
As I said, the "first" part is missing :-).

G.

Reply via email to