mirror of
https://github.com/topjohnwu/ndk-busybox.git
synced 2024-11-24 20:29:55 +00:00
SUSv3 -q compatibily exit status correction for grep again
This commit is contained in:
parent
c96b703ab0
commit
bf4497406f
@ -398,7 +398,9 @@ extern int grep_main(int argc, char **argv)
|
||||
}
|
||||
#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 */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user