mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Jaydeep Patil <Jaydeep.Patil@imgtec.com>
To: Szabolcs Nagy <nsz@port70.net>,
	"musl@lists.openwall.com" <musl@lists.openwall.com>
Subject: RE: mips64/n32 struct termios
Date: Wed, 27 Apr 2016 04:44:56 +0000	[thread overview]
Message-ID: <BD7773622145634B952E5B54ACA8E349AA24F89C@PUMAIL01.pu.imgtec.org> (raw)
In-Reply-To: <20160426184425.GN22574@port70.net>

>-----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 <dalias@libc.org> [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 done in
>the other direction fixing mips64,n32)
>
>termios struct is special on mips and ppc:
>
>mips glibc: NCCS = 32, no speed fields
>mips linux: NCCS = 23
>
>ppc glibc: NCCS = 32, speed fields
>ppc linux: NCCS = 19, c_line swapped, only termios, no termios2
>
>other glibc: NCCS = 32, speed fields
>other linux: NCCS = 19
>
>the kernel side only has speed fields in termios2 except on ppc where termios
>has them, in glibc termios has speed fields except on mips.  (the __ prefixed
>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 practice,
>but e.g. util-linux ldattach seems to use them with BOTHER cflag and probably
>one can query them with TCGETS(2).
>
>glibc tcsetattr/tcgetattr translates glibc termios to kernel termios, so one can
>set/get the fields that way too and there is further powerpc specific magic in
>that translation.

I don't see any significance/reference to input/output speed fields of the struct termios in mips linux/glibc. 
We can omit these fields.

>>
>> Rich


      reply	other threads:[~2016-04-27  4:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26 17:27 Rich Felker
2016-04-26 18:44 ` Szabolcs Nagy
2016-04-27  4:44   ` Jaydeep Patil [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BD7773622145634B952E5B54ACA8E349AA24F89C@PUMAIL01.pu.imgtec.org \
    --to=jaydeep.patil@imgtec.com \
    --cc=musl@lists.openwall.com \
    --cc=nsz@port70.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).