diff options
author | Joe Hershberger | 2012-07-31 06:09:17 +0000 |
---|---|---|
committer | Joe Hershberger | 2012-09-24 13:55:43 -0500 |
commit | 2c8fe5120f8da013cbd789be2f10cce880972836 (patch) | |
tree | 477b12f8a78a22f22750dfc600caf00b48b1d492 /drivers/net/netconsole.c | |
parent | dcd5a593f59b58da4875e3e78d7c74501bc319c4 (diff) |
net: Make the netconsole buffer size configurable
Allow a board to configure a larger buffer for netconsole, but leave
the default.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'drivers/net/netconsole.c')
-rw-r--r-- | drivers/net/netconsole.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 86f5301141a..8fcf31c4e9b 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -28,7 +28,11 @@ DECLARE_GLOBAL_DATA_PTR; -static char input_buffer[512]; +#ifndef CONFIG_NETCONSOLE_BUFFER_SIZE +#define CONFIG_NETCONSOLE_BUFFER_SIZE 512 +#endif + +static char input_buffer[CONFIG_NETCONSOLE_BUFFER_SIZE]; static int input_size; /* char count in input buffer */ static int input_offset; /* offset to valid chars in input buffer */ static int input_recursion; @@ -214,7 +218,7 @@ static void nc_puts(const char *s) len = strlen(s); while (len) { - int send_len = min(len, 512); + int send_len = min(len, sizeof(input_buffer)); nc_send_packet(s, send_len); len -= send_len; s += send_len; |