Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jun 2011 21:59:55 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r222697 - head/usr.bin/find
Message-ID:  <201106042159.p54LxtxG027789@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106042159.p54LxtxG027789>