From owner-svn-src-all@FreeBSD.ORG Sat Jun 18 23:43:29 2011 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 3490E106564A; Sat, 18 Jun 2011 23:43:29 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23C468FC0C; Sat, 18 Jun 2011 23:43:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5INhT3f068784; Sat, 18 Jun 2011 23:43:29 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5INhTvI068781; Sat, 18 Jun 2011 23:43:29 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201106182343.p5INhTvI068781@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 18 Jun 2011 23:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223281 - head/bin/sh 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: Sat, 18 Jun 2011 23:43:29 -0000 Author: jilles Date: Sat Jun 18 23:43:28 2011 New Revision: 223281 URL: http://svn.freebsd.org/changeset/base/223281 Log: sh: Add do-nothing -h option. POSIX requires a -h option to sh and set, to locate and remember utilities invoked by functions as they are defined. Given that this locate-and-remember process is optional elsewhere, it seems safe enough to make this option do nothing. POSIX does not specify a long name for this option. Follow ksh in calling it "trackall". Modified: head/bin/sh/options.h head/bin/sh/sh.1 Modified: head/bin/sh/options.h ============================================================================== --- head/bin/sh/options.h Sat Jun 18 23:02:53 2011 (r223280) +++ head/bin/sh/options.h Sat Jun 18 23:43:28 2011 (r223281) @@ -62,8 +62,9 @@ struct shparam { #define privileged optlist[15].val #define Tflag optlist[16].val #define Pflag optlist[17].val +#define hflag optlist[18].val -#define NOPTS 18 +#define NOPTS 19 struct optent { const char *name; @@ -91,6 +92,7 @@ struct optent optlist[NOPTS] = { { "privileged", 'p', 0 }, { "trapsasync", 'T', 0 }, { "physical", 'P', 0 }, + { "trackall", 'h', 0 }, }; #else extern struct optent optlist[NOPTS]; Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sat Jun 18 23:02:53 2011 (r223280) +++ head/bin/sh/sh.1 Sat Jun 18 23:43:28 2011 (r223281) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd June 17, 2011 +.Dd June 18, 2011 .Dt SH 1 .Os .Sh NAME @@ -241,6 +241,10 @@ tested, all commands of the function are well. .It Fl f Li noglob Disable pathname expansion. +.It Fl h Li trackall +A do-nothing option for +.Tn POSIX +compliance. .It Fl I Li ignoreeof Ignore .Dv EOF Ap s