Page MenuHomeFreeBSD

linux: Partially implement TCSBRK
ClosedPublic

Authored by trasz on Oct 4 2021, 12:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 12, 7:31 AM
Unknown Object (File)
Tue, May 7, 9:54 PM
Unknown Object (File)
Apr 8 2024, 10:46 AM
Unknown Object (File)
Apr 8 2024, 9:55 AM
Unknown Object (File)
Apr 8 2024, 8:54 AM
Unknown Object (File)
Feb 22 2024, 3:49 PM
Unknown Object (File)
Feb 17 2024, 6:11 AM
Unknown Object (File)
Feb 10 2024, 10:29 PM
Subscribers

Details

Summary

This fixes tcflush(3), unbreaking cheribuild.py under arm64 Focal.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

trasz requested review of this revision.Oct 4 2021, 12:42 PM
emaste added inline comments.
sys/compat/linux/linux_ioctl.c
763

arg == 0 means break, should this not be ioctl TCSBRK (arg=0) not implemented or something like that?

sys/compat/linux/linux_ioctl.c
763

I think so too... I noticed that.

The implementation, though, wouldn't be hard, since it's just a ioctl(TIOCSBRK), pause_sbt(0.4s), ioctl(TIOCCBRK)

sys/compat/linux/linux_ioctl.c
763

My thinking was, this is additional information that doesn't help the user in any way. The point of this message is to spot the problem and to be able to grep for it, not to explain the actual situation.

And yes, implementation is trivial; it's the real-world testcase I don't have. From my experience it's better to leave a (loud) stub than commit simple, but untested code.

sys/compat/linux/linux_ioctl.c
763

Sigh, now I see what you mean - I thought it was about the additional arg, not the wrong ioctl name.

trasz marked an inline comment as done.Oct 8 2021, 2:45 PM

Minor wording tweak, but now it's fine.

sys/compat/linux/linux_ioctl.c
763

s/arg 0/arg == 0/ here for clarity.

This revision is now accepted and ready to land.Oct 8 2021, 2:49 PM
sys/compat/linux/linux_ioctl.c
763

I think I prefer the current version, due to consistency of how the rest of Linuxulator uses it.

This revision was automatically updated to reflect the committed changes.