From owner-svn-src-head@FreeBSD.ORG Sat Jun 4 21:59:55 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA2341065670; Sat, 4 Jun 2011 21:59:55 +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 CAB488FC19; Sat, 4 Jun 2011 21:59:55 +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 p54Lxt7t027791; Sat, 4 Jun 2011 21:59:55 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p54LxtxG027789; Sat, 4 Jun 2011 21:59:55 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201106042159.p54LxtxG027789@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 4 Jun 2011 21:59:55 +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: r222697 - head/usr.bin/find X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jun 2011 21:59:56 -0000 Author: jilles Date: Sat Jun 4 21:59:55 2011 New Revision: 222697 URL: http://svn.freebsd.org/changeset/base/222697 Log: find: Exit if there is an unknown option. Ignoring the parameter with the unknown options is unlikely to be what was intended. Example: find -n . Note that things like find -n already caused an exit, equivalent to "find" by itself. Modified: head/usr.bin/find/main.c Modified: head/usr.bin/find/main.c ============================================================================== --- head/usr.bin/find/main.c Sat Jun 4 20:40:24 2011 (r222696) +++ head/usr.bin/find/main.c Sat Jun 4 21:59:55 2011 (r222697) @@ -120,7 +120,7 @@ main(int argc, char *argv[]) break; case '?': default: - break; + usage(); } argc -= optind;