[Glibc-bsd-commits] r5254 - in trunk/freebsd-utils/debian: . patches
rmh at alioth.debian.org
rmh at alioth.debian.org
Thu Dec 19 16:54:24 UTC 2013
Author: rmh
Date: 2013-12-19 16:54:24 +0000 (Thu, 19 Dec 2013)
New Revision: 5254
Added:
trunk/freebsd-utils/debian/patches/route_list.diff
Modified:
trunk/freebsd-utils/debian/changelog
trunk/freebsd-utils/debian/patches/014_route.diff
trunk/freebsd-utils/debian/patches/series
Log:
route_list.diff: When route is invoked with no arguments, fallback to "netstat -r" to list existing routes (for compatibility with Linux route(8)).
Modified: trunk/freebsd-utils/debian/changelog
===================================================================
--- trunk/freebsd-utils/debian/changelog 2013-12-19 16:51:25 UTC (rev 5253)
+++ trunk/freebsd-utils/debian/changelog 2013-12-19 16:54:24 UTC (rev 5254)
@@ -14,6 +14,9 @@
* Leave -lbsdxml untouched (latest freebsd-glue supports it).
* netstat_numeric_default.diff: Honor -n flag when listing the default
route (for compatibility with Linux route(8)).
+ * route_list.diff: When route is invoked with no arguments, fallback
+ to "netstat -r" to list existing routes (for compatibility with
+ Linux route(8)).
-- Robert Millan <rmh at debian.org> Sun, 01 Dec 2013 20:31:39 +0100
Modified: trunk/freebsd-utils/debian/patches/014_route.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/014_route.diff 2013-12-19 16:51:25 UTC (rev 5253)
+++ trunk/freebsd-utils/debian/patches/014_route.diff 2013-12-19 16:54:24 UTC (rev 5254)
@@ -9,7 +9,7 @@
switch(ch) {
case 'n':
nflag = 1;
-@@ -243,6 +243,11 @@
+@@ -247,6 +249,11 @@
if (fib < 0)
return (0);
Added: trunk/freebsd-utils/debian/patches/route_list.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/route_list.diff (rev 0)
+++ trunk/freebsd-utils/debian/patches/route_list.diff 2013-12-19 16:54:24 UTC (rev 5254)
@@ -0,0 +1,25 @@
+
+When route is invoked with no arguments, fallback to "netstat -r"
+to list existing routes.
+
+--- a/src/sbin/route/route.c
++++ b/src/sbin/route/route.c
+@@ -152,9 +152,16 @@
+ {
+ if (cp != NULL)
+ warnx("bad keyword: %s", cp);
++
+ (void) fprintf(stderr,
+- "usage: route [-dnqtv] command [[modifiers] args]\n");
+- exit(EX_USAGE);
++ "warning: route invoked with no arguments. fallback to \"netstat -r\"\n");
++
++ /* For compatibility with the Linux version of route. */
++ char *opt = nflag ? "-n" : NULL;
++ char *netstat_args[] = { "netstat", "-r", opt, NULL };
++ execvp("netstat", netstat_args);
++ err(1, "netstat");
++
+ /* NOTREACHED */
+ }
+
Modified: trunk/freebsd-utils/debian/patches/series
===================================================================
--- trunk/freebsd-utils/debian/patches/series 2013-12-19 16:51:25 UTC (rev 5253)
+++ trunk/freebsd-utils/debian/patches/series 2013-12-19 16:54:24 UTC (rev 5254)
@@ -10,6 +10,7 @@
mount_cli_compat.diff
ppp_macros.diff
netstat_numeric_default.diff
+route_list.diff
# Other patches that might or might not be mergeable
001_dmesg.diff
More information about the Glibc-bsd-commits
mailing list