Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/route print prefixlen on -show
details: https://anonhg.NetBSD.org/src/rev/6e3fef96bc5e
branches: trunk
changeset: 552727:6e3fef96bc5e
user: itojun <itojun%NetBSD.org@localhost>
date: Wed Oct 01 06:24:19 2003 +0000
description:
print prefixlen on -show
diffstat:
sbin/route/route.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 4bb1f29ec062 -r 6e3fef96bc5e sbin/route/route.c
--- a/sbin/route/route.c Wed Oct 01 06:14:57 2003 +0000
+++ b/sbin/route/route.c Wed Oct 01 06:24:19 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.69 2003/09/16 09:34:48 cube Exp $ */
+/* $NetBSD: route.c,v 1.70 2003/10/01 06:24:19 itojun Exp $ */
/*
* Copyright (c) 1983, 1989, 1991, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: route.c,v 1.69 2003/09/16 09:34:48 cube Exp $");
+__RCSID("$NetBSD: route.c,v 1.70 2003/10/01 06:24:19 itojun Exp $");
#endif
#endif /* not lint */
@@ -681,7 +681,10 @@
C(i >> 24), C(i >> 16), C(i >> 8), C(i));
#undef C
#else /* XXX */
- (void)strlcpy(line, inet_ntoa(in), sizeof(line));
+ if (nml == 0)
+ strlcpy(line, inet_ntoa(in), sizeof(line));
+ else
+ snprintf(line, sizeof(line), "%s/%d", inet_ntoa(in), nml);
#endif /* XXX */
}
break;
Home |
Main Index |
Thread Index |
Old Index