dcantrell / bsdutils

Alternative to GNU coreutils using software from FreeBSD
Other
169 stars 9 forks source link

Fix build of stty(1) on musl + fix baud/speed distinction #20

Closed q66 closed 3 years ago

q66 commented 3 years ago

Turns out ttydefchars is just not needed at all because c_cc is never copied into struct info in that function (which is good, because it does not exist on musl)

q66 commented 3 years ago

Also, the program prints baud 15 for me on both glibc (with or without the changes) and musl; I don't think this is correct (it should print 38400)

q66 commented 3 years ago

added a commit which ensures baud rates are translated to speed when provided on input, and speeds are translated back to baud rates for printing; now it behaves like freebsd (tested both getting and setting, and compared with coreutils stty as well as native freebsd environment)

dcantrell commented 3 years ago

Great fixes, thank you. I did notice stty was printing the wrong baud rate, but I wanted to push what I had so far to see where things landed for musl (I don't have a musl-based system installed locally, so I am relying on CI).

Though this PR appears to also include your work for tail. Is that correct? I think there are too many commits in this PR.

q66 commented 3 years ago

it's because of your force-push, it confused github

dcantrell commented 3 years ago

Thanks.