summaryrefslogtreecommitdiff
path: root/usr.bin/netstat/main.c
diff options
context:
space:
mode:
authorpooka <pooka@NetBSD.org>2010-02-24 11:00:27 +0000
committerpooka <pooka@NetBSD.org>2010-02-24 11:00:27 +0000
commitbc1cf39b94f8dccb618d7db00a74615434ec3cd8 (patch)
treef76c00cb812c8e9851733f56a7b36927b7d01a3c /usr.bin/netstat/main.c
parent2897183305a2e3ab73574b3a0e558a1ac06fafaa (diff)
Add -h, which makes output of bytes counts "humanized" (e.g. -bih)
(netstat had -h some 15 years ago, but since then it has been just a fancy way of calling usage())
Diffstat (limited to 'usr.bin/netstat/main.c')
-rw-r--r--usr.bin/netstat/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c
index 3cefd4ce83b..7d7ff11df90 100644
--- a/usr.bin/netstat/main.c
+++ b/usr.bin/netstat/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.73 2009/09/14 10:36:51 degroote Exp $ */
+/* $NetBSD: main.c,v 1.74 2010/02/24 11:00:27 pooka Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1988, 1993\
#if 0
static char sccsid[] = "from: @(#)main.c 8.4 (Berkeley) 3/1/94";
#else
-__RCSID("$NetBSD: main.c,v 1.73 2009/09/14 10:36:51 degroote Exp $");
+__RCSID("$NetBSD: main.c,v 1.74 2010/02/24 11:00:27 pooka Exp $");
#endif
#endif /* not lint */
@@ -471,6 +471,9 @@ main(argc, argv)
gflag = 1;
break;
#endif
+ case 'h':
+ hflag = 1;
+ break;
case 'I':
iflag = 1;
interface = optarg;