From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 10:44:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 103B01065672; Mon, 19 Jan 2009 10:44:17 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F25708FC18; Mon, 19 Jan 2009 10:44:16 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0JAiGwr008053; Mon, 19 Jan 2009 10:44:16 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0JAiGVF008052; Mon, 19 Jan 2009 10:44:16 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200901191044.n0JAiGVF008052@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 19 Jan 2009 10:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187431 - stable/7/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 10:44:17 -0000 Author: ru Date: Mon Jan 19 10:44:16 2009 New Revision: 187431 URL: http://svn.freebsd.org/changeset/base/187431 Log: MFC: - Fix crash with "netstat -m -N foo". PR: bin/124724 - Sync usage() with SYNOPSIS. Modified: stable/7/usr.bin/netstat/ (props changed) stable/7/usr.bin/netstat/main.c Modified: stable/7/usr.bin/netstat/main.c ============================================================================== --- stable/7/usr.bin/netstat/main.c Mon Jan 19 08:51:20 2009 (r187430) +++ stable/7/usr.bin/netstat/main.c Mon Jan 19 10:44:16 2009 (r187431) @@ -503,7 +503,7 @@ main(int argc, char *argv[]) exit(0); } if (mflag) { - if (memf != NULL) { + if (!live) { if (kread(0, NULL, 0) == 0) mbpr(kvmd, nl[N_MBSTAT].n_value); } else @@ -768,15 +768,16 @@ usage(void) (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", "usage: netstat [-AaLnSW] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", -" netstat -i | -I interface [-abdhnt] [-f address_family]\n" +" netstat -i | -I interface [-abdhntW] [-f address_family]\n" " [-M core] [-N system]", " netstat -w wait [-I interface] [-d] [-M core] [-N system]", -" netstat -s [-s] [-z] [-f protocol_family | -p protocol] [-M core]", +" netstat -s [-s] [-z] [-f protocol_family | -p protocol]\n" +" [-M core] [-N system]", " netstat -i | -I interface -s [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", " netstat -m [-M core] [-N system]", -" netstat -B [ -I interface]", -" netstat -r [-AenW] [-f address_family] [-M core] [-N system]", +" netstat -B [-I interface]", +" netstat -r [-AanW] [-f address_family] [-M core] [-N system]", " netstat -rs [-s] [-M core] [-N system]", " netstat -g [-W] [-f address_family] [-M core] [-N system]", " netstat -gs [-s] [-f address_family] [-M core] [-N system]");