modernize backfire 10.03 so it can be operational again
[openwrt-10.03/.git] / package / quagga / not-patches / patches-pgbgp / 170-use-supported-pagers.patch
1 --- a/vtysh/vtysh.c
2 +++ b/vtysh/vtysh.c
3 @@ -268,7 +268,7 @@ vtysh_pager_init (void)
4    if (pager_defined)
5      vtysh_pager_name = strdup (pager_defined);
6    else
7 -    vtysh_pager_name = strdup ("more");
8 +    vtysh_pager_name = strdup ("cat");
9  }
10  
11  /* Command execution over the vty interface. */
12 @@ -1885,7 +1885,7 @@ DEFUN (vtysh_terminal_length,
13  {
14    int lines;
15    char *endptr = NULL;
16 -  char default_pager[10];
17 +  char default_pager[12];
18  
19    lines = strtol (argv[0], &endptr, 10);
20    if (lines < 0 || lines > 512 || *endptr != '\0')
21 @@ -1902,7 +1902,7 @@ DEFUN (vtysh_terminal_length,
22  
23    if (lines != 0)
24      {
25 -      snprintf(default_pager, 10, "more -%i", lines);
26 +      snprintf(default_pager, 12, "head -n %i", lines);
27        vtysh_pager_name = strdup (default_pager);
28      }
29