From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9957 Path: news.gmane.org!not-for-mail From: Jaydeep Patil Newsgroups: gmane.linux.lib.musl.general Subject: RE: mips64/n32 struct termios Date: Wed, 27 Apr 2016 04:44:56 +0000 Message-ID: References: <20160426172703.GP21636@brightrain.aerifal.cx> <20160426184425.GN22574@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1461732316 17990 80.91.229.3 (27 Apr 2016 04:45:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2016 04:45:16 +0000 (UTC) To: Szabolcs Nagy , "musl@lists.openwall.com" Original-X-From: musl-return-9970-gllmg-musl=m.gmane.org@lists.openwall.com Wed Apr 27 06:45:15 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1avHLe-0001AR-JL for gllmg-musl@m.gmane.org; Wed, 27 Apr 2016 06:45:14 +0200 Original-Received: (qmail 3108 invoked by uid 550); 27 Apr 2016 04:45:12 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 3090 invoked from network); 27 Apr 2016 04:45:11 -0000 Thread-Topic: [musl] mips64/n32 struct termios Thread-Index: AQHRn+DluHYf0F4fpECZXASy/tcgQZ+cO1qAgAEBbOA= In-Reply-To: <20160426184425.GN22574@port70.net> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.93.60] Xref: news.gmane.org gmane.linux.lib.musl.general:9957 Archived-At: >-----Original Message----- >From: Szabolcs Nagy [mailto:nsz@port70.net] >Sent: 27 April 2016 AM 12:14 >To: musl@lists.openwall.com >Cc: Jaydeep Patil >Subject: Re: [musl] mips64/n32 struct termios > >* Rich Felker [2016-04-26 13:27:04 -0400]: >> I noticed that the mips64/n32 versions of struct termios have omitted >> the two speed_t fields at the end, which other archs (including mips) >> all have. It's dubious whether these make sense or are useful for >> anything, and I don't even recall the whole history of why we have >> them, but as long as we do have them for all the other archs I kind of >> think it makes sense to put them back for mips64/n32 in case we ever >> need them for something (or for expansion) or want generic code to be >> able to access them. >> >> Was there a reason they were omitted in the new ports? Any objection >> to adding them back? > >see my [PATCH 16/16] fix struct termios in mips termios.h (that can be don= e in >the other direction fixing mips64,n32) > >termios struct is special on mips and ppc: > >mips glibc: NCCS =3D 32, no speed fields >mips linux: NCCS =3D 23 > >ppc glibc: NCCS =3D 32, speed fields >ppc linux: NCCS =3D 19, c_line swapped, only termios, no termios2 > >other glibc: NCCS =3D 32, speed fields >other linux: NCCS =3D 19 > >the kernel side only has speed fields in termios2 except on ppc where term= ios >has them, in glibc termios has speed fields except on mips. (the __ prefi= xed >fields are only present in musl probably to match the termios struct size = on >x86.) > >i don't know why there are these differences and how it can work in practi= ce, >but e.g. util-linux ldattach seems to use them with BOTHER cflag and proba= bly >one can query them with TCGETS(2). > >glibc tcsetattr/tcgetattr translates glibc termios to kernel termios, so o= ne can >set/get the fields that way too and there is further powerpc specific magi= c in >that translation. I don't see any significance/reference to input/output speed fields of the = struct termios in mips linux/glibc.=20 We can omit these fields. >> >> Rich