aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/ssl.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2019-05-25 00:08:43 +0200
committerRichard Weinberger <richard@nod.at>2020-01-19 22:41:50 +0100
commitf1dc67d0e7df21b3d27beb3ec7b2c9e2b721daff (patch)
tree1fab249f28cc096a60b453278567b0b3ca581cad /arch/um/drivers/ssl.c
parentLinux 5.5-rc6 (diff)
downloadlinux-dev-f1dc67d0e7df21b3d27beb3ec7b2c9e2b721daff.tar.xz
linux-dev-f1dc67d0e7df21b3d27beb3ec7b2c9e2b721daff.zip
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 <johannes.berg@intel.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to '')
-rw-r--r--arch/um/drivers/ssl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c
index b213201b8a3b..26c5716fac0f 100644
--- a/arch/um/drivers/ssl.c
+++ b/arch/um/drivers/ssl.c
@@ -196,3 +196,11 @@ static int ssl_chan_setup(char *str)
__setup("ssl", ssl_chan_setup);
__channel_help(ssl_chan_setup, "ssl");
+
+static int ssl_non_raw_setup(char *str)
+{
+ opts.raw = 0;
+ return 1;
+}
+__setup("ssl-non-raw", ssl_non_raw_setup);
+__channel_help(ssl_non_raw_setup, "set serial lines to non-raw mode");