Commit 9d5ed1ee authored by Adam Wujek's avatar Adam Wujek 💬

lib/netconsole: add choice for default value for netconsole status

Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 2930499d
......@@ -400,9 +400,26 @@ config NETCONSOLE
help
Include netconsole to be run via UDP
choice
prompt "Default mode of netconsole"
depends on NETCONSOLE
default NETCONSOLE_DEF_DISABLE
config NETCONSOLE_DEF_WAIT
boolean "Netconsole is waiting for peer"
help
Netconsole is waiting for peer to send a command
config NETCONSOLE_DEF_DISABLE
boolean "Netconsole is disabled"
help
Use SNMP or shell command to enable netconsole
endchoice
config CMD_NETCONSOLE
depends on NETCONSOLE
boolean "Include command to configure netconsole"
boolean "Include shell command to configure netconsole"
default y
help
Include command to configure netconsole
......
......@@ -889,6 +889,10 @@ To exit from \texttt{gui} when using the netconsole, please type
\texttt{<Esc>} followed by \texttt{<Enter>}.}
using UDP packets (port 55) to a remote host in the network via WR port. To use such
functionality WRPC has to have compiled in option \texttt{CONFIG\_NETCONSOLE}.
If option \texttt{NETCONSOLE\_DEF\_WAIT} is enabled WRPC after the start will
wait for peer to comunicate with it. On the other hand if option
\texttt{NETCONSOLE\_DEF\_DISABLE} is activated, then WRPC will not respond
to any netconsole requests.
To be able to configure netconsole from WRPC's command line the option
\texttt{CONFIG\_CMD\_NETCONSOLE} has to be set in the dot-config.
......
......@@ -15,6 +15,12 @@
#include "shell.h"
#include "netconsole.h"
#ifdef CONFIG_NETCONSOLE_DEF_WAIT
#define NETCONSOLE_DEF_VAL NETCONSOLE_WAIT
#else
#define NETCONSOLE_DEF_VAL NETCONSOLE_DISABLED
#endif
static uint8_t __netconsole_queue[152];
static struct wrpc_socket __static_netconsole_socket = {
.queue.buff = __netconsole_queue,
......@@ -27,7 +33,7 @@ static unsigned char *cmd_rx_p = NULL;
static uint8_t tx_buf[UDP_END + SH_MAX_LINE_LEN + 1];
static uint8_t rx_buf[UDP_END + SH_MAX_LINE_LEN + 1];
struct wr_sockaddr netconsole_sock_addr;
int netconsole_status = NETCONSOLE_WAIT;
int netconsole_status = NETCONSOLE_DEF_VAL;
struct wr_udp_addr netconsole_udp_addr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment