Skip to content

Commit f1dc67d

Browse files
jmberg-intelrichardweinberger
authored andcommitted
um: Add an option to make serial driver non-raw
In some cases, for example when the program(s) running inside UML isn't/aren't interactive (like the hwsim tests for wpa_supplicant) there's really no value in having the serial lines configured to be raw as they are now by default. Setting them to non-raw lets one abort the whole UML with Ctrl-C, which is really the right thing to do in these cases, basically the whole UML instance is more like a single (testing) program. Add a "ssl-non-raw" option to UML to support such a mode. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent b3a987b commit f1dc67d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

arch/um/drivers/chan_user.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
struct chan_opts {
1212
void (*const announce)(char *dev_name, int dev);
1313
char *xterm_title;
14-
const int raw;
14+
int raw;
1515
};
1616

1717
struct chan_ops {

arch/um/drivers/ssl.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,11 @@ static int ssl_chan_setup(char *str)
196196

197197
__setup("ssl", ssl_chan_setup);
198198
__channel_help(ssl_chan_setup, "ssl");
199+
200+
static int ssl_non_raw_setup(char *str)
201+
{
202+
opts.raw = 0;
203+
return 1;
204+
}
205+
__setup("ssl-non-raw", ssl_non_raw_setup);
206+
__channel_help(ssl_non_raw_setup, "set serial lines to non-raw mode");

0 commit comments

Comments
 (0)