From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 23 Mar 2014 20:53:02 +0100 Message-ID: From: Gorka Guardiola To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] usb/serial control open Topicbox-Message-UUID: cea09de4-ead8-11e9-9d60-3106f5b1d025 > What do you return on read if you don=B4t know the state? > For some devices if you don=B4t 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=B4t > 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.