Skip to content

Commit

Permalink
linux: support IUTF8
Browse files Browse the repository at this point in the history
Make Linuxulator support the recently added IUTF8 termios(4) flag.

Reviewed By:	dchagin, emaste, imp
Differential Revision:	https://reviews.freebsd.org/D44525
  • Loading branch information
trasz committed Oct 21, 2024
1 parent 525a177 commit 31eec6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sys/compat/linux/linux_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ bsd_to_linux_termios(struct termios *bios, struct linux_termios *lios)
lios->c_iflag |= LINUX_IXOFF;
if (bios->c_iflag & IMAXBEL)
lios->c_iflag |= LINUX_IMAXBEL;
if (bios->c_iflag & IUTF8)
lios->c_iflag |= LINUX_IUTF8;

lios->c_oflag = 0;
if (bios->c_oflag & OPOST)
Expand Down Expand Up @@ -538,6 +540,8 @@ linux_to_bsd_termios(struct linux_termios *lios, struct termios *bios)
bios->c_iflag |= IXOFF;
if (lios->c_iflag & LINUX_IMAXBEL)
bios->c_iflag |= IMAXBEL;
if (lios->c_iflag & LINUX_IUTF8)
bios->c_iflag |= IUTF8;

bios->c_oflag = 0;
if (lios->c_oflag & LINUX_OPOST)
Expand Down
1 change: 1 addition & 0 deletions sys/compat/linux/linux_ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@
#define LINUX_IXOFF 0x0001000

#define LINUX_IMAXBEL 0x0002000
#define LINUX_IUTF8 0x0004000

/* Linux c_oflag masks */
#define LINUX_OPOST 0x0000001
Expand Down

0 comments on commit 31eec6f

Please sign in to comment.