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
diff --git a/package/quagga/not-patches/patches-pgbgp/170-use-supported-pagers.patch b/package/quagga/not-patches/patches-pgbgp/170-use-supported-pagers.patch
new file mode 100644 (file)
index 0000000..0a7d7f9
--- /dev/null
@@ -0,0 +1,29 @@
+--- a/vtysh/vtysh.c
++++ b/vtysh/vtysh.c
+@@ -268,7 +268,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);
+     }