util: update termios to replace nl with cr-nl
This change enables OPOST to enable output post-processing. It then enables ONLCR to prepend newline characters with carriage return so that start of each line is always left aligned. Note that on some terminals this might display a redundant ^M. Change-Id: Ia0b4c61725ab7478e7341273a8279b96e53d9f26 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65152 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -302,8 +302,8 @@ raw_term()
|
||||
memcpy(&saved_ios, &ios, sizeof(struct termios));
|
||||
|
||||
ios.c_iflag &= ~(ISTRIP|ICRNL|IGNCR|ICRNL|IXOFF|IXON);
|
||||
ios.c_oflag &= ~(OPOST);
|
||||
ios.c_oflag &= (ONLCR);
|
||||
ios.c_oflag |= OPOST;
|
||||
ios.c_oflag |= ONLCR;
|
||||
ios.c_lflag &= ~(ISIG|ICANON|ECHO);
|
||||
ios.c_cc[VMIN] = 1;
|
||||
ios.c_cc[VTIME] = 0;
|
||||
|
||||
Reference in New Issue
Block a user