[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <789b9d92-8110-d9e6-796e-e372d440fe51@geanix.com>
Date: Wed, 10 Jul 2019 11:51:15 +0200
From: Martin Hundebøll <martin@...nix.com>
To: Alan Cox <gnomes@...rguk.ukuu.org.uk>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>, linux-kernel@...r.kernel.org,
Sean Nyekjær <sean@...nix.com>,
Esben Haabendal <esben@...nix.com>
Subject: Re: [PATCH 4/4] tty: n_gsm: add ioctl to map serial device to mux'ed
tty
On 09/07/2019 17.22, Alan Cox wrote:
>> + int base;
>>
>> /* open the serial port connected to the modem */
>> fd = open(SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY);
>> @@ -58,6 +61,11 @@ Major parts of the initialization program :
>> c.mtu = 127;
>> /* set the new configuration */
>> ioctl(fd, GSMIOC_SETCONF, &c);
>> + /* get and print base gsmtty device node */
>> + ioctl(fd, GSMIOC_GETBASE, &base);
> Can we at least use a specific sized type ? uint32_t or whatever is fine.
Sure.
I am also considering whether returning the base (i.e. the unexposed
control line) just confuses users. It might be better to use
GSMIOC_GETFIRST instead, which would then return 1 for the first mux,
and 65 for the second, and so forth.
// Martin
Powered by blists - more mailing lists