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:
94ce1c0
)
tftp: allow -lc and -cl options
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 9 Jun 2019 10:41:17 +0000
(12:41 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 9 Jun 2019 10:41:17 +0000
(12:41 +0200)
function old new delta
tftp_main 394 396 +2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/tftp.c
patch
|
blob
|
history
diff --git
a/networking/tftp.c
b/networking/tftp.c
index 8486455520afae40d76f52b5a85e4f99a1e8e120..d551c861f05fe926e32e37a6a286b9c1c07d39cd 100644
(file)
--- a/
networking/tftp.c
+++ b/
networking/tftp.c
@@
-776,7
+776,15
@@
int tftp_main(int argc UNUSED_PARAM, char **argv)
*/
unsigned i = 1;
while (argv[i]) {
- if (strcmp(argv[i], "-c") == 0) {
+ /* Accept not only -c, but also
+ * -lc, -cl, -llcclcllcc etc:
+ * "-l Literal mode (do not recognize HOST:FILE)"
+ * since we do not recognize that syntax anyway,
+ * might as well allow the option.
+ */
+ if (argv[i][0] == '-' && strchr(argv[i], 'c')
+ /*&& argv[i][1+strspn(argv[i]+1, "lc")] == '\0'*/
+ ) {
if (!argv[++i])
break;
if (strcmp(argv[i], "get") == 0) {