Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2019-06-09 13:41:17 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2019-06-09 13:41:17 +0300
commit894f0a32351fe6c28fe86958e5f4e21422394183 (patch)
tree37f81d1afcf838bb83a59e9b945abf38f0ca37df
parent94ce1c0ebbdb59caaa2a91206ae98edf778ff556 (diff)
tftp: allow -lc and -cl options
function old new delta tftp_main 394 396 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/tftp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/networking/tftp.c b/networking/tftp.c
index 848645552..d551c861f 100644
--- 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) {