svn commit: trunk/busybox/findutils

vodz at busybox.net vodz at busybox.net
Fri Sep 23 13:50:25 UTC 2005


Author: vodz
Date: 2005-09-23 06:50:24 -0700 (Fri, 23 Sep 2005)
New Revision: 11593

Log:
SUSv3 -q compatibily exit status correction for grep again

Modified:
   trunk/busybox/findutils/grep.c


Changeset:
Modified: trunk/busybox/findutils/grep.c
===================================================================
--- trunk/busybox/findutils/grep.c	2005-09-23 13:44:03 UTC (rev 11592)
+++ trunk/busybox/findutils/grep.c	2005-09-23 13:50:24 UTC (rev 11593)
@@ -398,7 +398,9 @@
 	}
 #endif
 
-	if(be_quiet)
-		return error_open_count ? 2 : 0;
+	if(be_quiet && matched)
+		return 0;
+	if(error_open_count)
+		return 2;
 	return !matched; /* invert return value 0 = success, 1 = failed */
 }




More information about the busybox-cvs mailing list