projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5dfced
)
Fixed option parsing. Grep would continue grepping, even when given a bad /
author
Mark Whitley
<markw@lineo.com>
Mon, 9 Apr 2001 23:00:07 +0000
(23:00 -0000)
committer
Mark Whitley
<markw@lineo.com>
Mon, 9 Apr 2001 23:00:07 +0000
(23:00 -0000)
invalid option. Closes bug #1146.
findutils/grep.c
patch
|
blob
|
history
grep.c
patch
|
blob
|
history
diff --git
a/findutils/grep.c
b/findutils/grep.c
index 475b4ef212c1e79950609fc990331587df785638..8c67976470682f7e61b027d657f4d8259faeeafc 100644
(file)
--- a/
findutils/grep.c
+++ b/
findutils/grep.c
@@
-232,6
+232,8
@@
extern int grep_main(int argc, char **argv)
before_buf = (char **)calloc(lines_before, sizeof(char *));
break;
#endif /* BB_FEATURE_GREP_CONTEXT */
+ default:
+ show_usage();
}
}
diff --git
a/grep.c
b/grep.c
index 475b4ef212c1e79950609fc990331587df785638..8c67976470682f7e61b027d657f4d8259faeeafc 100644
(file)
--- a/
grep.c
+++ b/
grep.c
@@
-232,6
+232,8
@@
extern int grep_main(int argc, char **argv)
before_buf = (char **)calloc(lines_before, sizeof(char *));
break;
#endif /* BB_FEATURE_GREP_CONTEXT */
+ default:
+ show_usage();
}
}