From owner-svn-src-stable@freebsd.org Thu Jan 18 21:35:19 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE247EC491C; Thu, 18 Jan 2018 21:35:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C868E827B0; Thu, 18 Jan 2018 21:35:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC05724251; Thu, 18 Jan 2018 21:35:18 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0ILZI3P010532; Thu, 18 Jan 2018 21:35:18 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0ILZIhC010530; Thu, 18 Jan 2018 21:35:18 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201801182135.w0ILZIhC010530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 18 Jan 2018 21:35:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r328140 - stable/11/bin/df X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/bin/df X-SVN-Commit-Revision: 328140 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2018 21:35:20 -0000 Author: kevans Date: Thu Jan 18 21:35:18 2018 New Revision: 328140 URL: https://svnweb.freebsd.org/changeset/base/328140 Log: MFC r322293: df(1): Add --si as an alias for -H Modified: stable/11/bin/df/df.1 stable/11/bin/df/df.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/df/df.1 ============================================================================== --- stable/11/bin/df/df.1 Thu Jan 18 21:32:50 2018 (r328139) +++ stable/11/bin/df/df.1 Thu Jan 18 21:35:18 2018 (r328140) @@ -29,7 +29,7 @@ .\" @(#)df.1 8.3 (Berkeley) 5/8/95 .\" $FreeBSD$ .\" -.Dd December 1, 2015 +.Dd August 8, 2017 .Dt DF 1 .Os .Sh NAME @@ -97,7 +97,7 @@ output. Use unit suffixes: Byte, Kibibyte, Mebibyte, Gibibyte, Tebibyte and Pebibyte (based on powers of 1024) in order to reduce the number of digits to four or fewer. -.It Fl H +.It Fl H , Fl Fl si .Dq Human-readable output. Use unit suffixes: Byte, Kilobyte, Megabyte, Modified: stable/11/bin/df/df.c ============================================================================== --- stable/11/bin/df/df.c Thu Jan 18 21:32:50 2018 (r328139) +++ stable/11/bin/df/df.c Thu Jan 18 21:35:18 2018 (r328140) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #endif #include +#include #include #include #ifdef MOUNT_CHAR_DEVS @@ -107,6 +108,12 @@ static int thousands; static struct ufs_args mdev; #endif +static const struct option long_options[] = +{ + { "si", no_argument, NULL, 'H' }, + { NULL, no_argument, NULL, 0 }, +}; + int main(int argc, char *argv[]) { @@ -142,7 +149,8 @@ main(int argc, char *argv[]) if (argc < 0) exit(1); - while ((ch = getopt(argc, argv, "abcgHhiklmnPt:T,")) != -1) + while ((ch = getopt_long(argc, argv, "+abcgHhiklmnPt:T,", long_options, + NULL)) != -1) switch (ch) { case 'a': aflag = 1;