packages/net/quagga/patches/170-use-supported-pagers.patch
acinonyx bb574a905a [packages] quagga: Bump to v0.99.21
git-svn-id: svn://svn.openwrt.org/openwrt/packages@31987 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-29 13:01:43 +00:00

30 lines
791 B
Diff

--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -269,7 +269,7 @@ vtysh_pager_init (void)
if (pager_defined)
vtysh_pager_name = strdup (pager_defined);
else
- vtysh_pager_name = strdup ("more");
+ vtysh_pager_name = strdup ("cat");
}
/* Command execution over the vty interface. */
@@ -1885,7 +1885,7 @@ DEFUN (vtysh_terminal_length,
{
int lines;
char *endptr = NULL;
- char default_pager[10];
+ char default_pager[12];
lines = strtol (argv[0], &endptr, 10);
if (lines < 0 || lines > 512 || *endptr != '\0')
@@ -1902,7 +1902,7 @@ DEFUN (vtysh_terminal_length,
if (lines != 0)
{
- snprintf(default_pager, 10, "more -%i", lines);
+ snprintf(default_pager, 12, "head -n %i", lines);
vtysh_pager_name = strdup (default_pager);
}