linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arch: um: add an option to make serial driver non-raw
@ 2019-05-24 22:08 Johannes Berg
  2020-01-19 21:27 ` Richard Weinberger
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2019-05-24 22:08 UTC (permalink / raw)
  To: linux-um; +Cc: j, Richard Weinberger, Jeff Dike, Johannes Berg, Anton Ivanov

From: Johannes Berg <johannes.berg@intel.com>

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>
---
 arch/um/drivers/chan_user.h | 2 +-
 arch/um/drivers/ssl.c       | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/um/drivers/chan_user.h b/arch/um/drivers/chan_user.h
index 03f1b565c5f9..3ae1ff6e3822 100644
--- a/arch/um/drivers/chan_user.h
+++ b/arch/um/drivers/chan_user.h
@@ -11,7 +11,7 @@
 struct chan_opts {
 	void (*const announce)(char *dev_name, int dev);
 	char *xterm_title;
-	const int raw;
+	int raw;
 };
 
 struct chan_ops {
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c
index 7ae407d5337e..cd91c70568c9 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");
-- 
2.17.2


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] arch: um: add an option to make serial driver non-raw
  2019-05-24 22:08 [PATCH v2] arch: um: add an option to make serial driver non-raw Johannes Berg
@ 2020-01-19 21:27 ` Richard Weinberger
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Weinberger @ 2020-01-19 21:27 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Johannes Berg, j, Richard Weinberger, Jeff Dike, linux-um,
	Anton Ivanov

On Sat, May 25, 2019 at 12:08 AM Johannes Berg
<johannes@sipsolutions.net> wrote:
>
> From: Johannes Berg <johannes.berg@intel.com>
>
> 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>
> ---
>  arch/um/drivers/chan_user.h | 2 +-
>  arch/um/drivers/ssl.c       | 8 ++++++++

Applied. Thanks,
//richard

-- 
Thanks,
//richard

_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-19 21:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-24 22:08 [PATCH v2] arch: um: add an option to make serial driver non-raw Johannes Berg
2020-01-19 21:27 ` Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).