From: Johannes Berg Date: Thu, 24 Mar 2022 12:13:44 +0000 (+0100) Subject: um: daemon: Make default socket configurable X-Git-Tag: v5.19-rc1~34^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0cbccf4480bd251d7911e7fa1913e47769dc724;p=thirdparty%2Fkernel%2Flinux.git um: daemon: Make default socket configurable Even if daemon network is deprecated, some configurations may still use it (e.g. Debian), and not want to default to the /tmp/uml.ctl socket location. Allow configuring the default socket location. Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Tested-by: Ritesh Raj Sarraf Signed-off-by: Richard Weinberger --- diff --git a/arch/um/drivers/Kconfig b/arch/um/drivers/Kconfig index 521ae0d460763..914da774bd390 100644 --- a/arch/um/drivers/Kconfig +++ b/arch/um/drivers/Kconfig @@ -238,6 +238,14 @@ config UML_NET_DAEMON If unsure, say N. +config UML_NET_DAEMON_DEFAULT_SOCK + string "Default socket for daemon transport" + default "/tmp/uml.ctl" + depends on UML_NET_DAEMON + help + This option allows setting the default socket for the daemon + transport, normally it defaults to /tmp/uml.ctl. + config UML_NET_VECTOR bool "Vector I/O high performance network devices" depends on UML_NET diff --git a/arch/um/drivers/daemon_kern.c b/arch/um/drivers/daemon_kern.c index fd2402669c49b..afde1e82c056b 100644 --- a/arch/um/drivers/daemon_kern.c +++ b/arch/um/drivers/daemon_kern.c @@ -65,7 +65,7 @@ static int daemon_setup(char *str, char **mac_out, void *data) *init = ((struct daemon_init) { .sock_type = "unix", - .ctl_sock = "/tmp/uml.ctl" }); + .ctl_sock = CONFIG_UML_NET_DAEMON_DEFAULT_SOCK }); remain = split_if_spec(str, mac_out, &init->sock_type, &init->ctl_sock, NULL);