aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2019-06-09 12:41:17 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2019-06-09 12:41:17 +0200
commit894f0a32351fe6c28fe86958e5f4e21422394183 (patch)
tree37f81d1afcf838bb83a59e9b945abf38f0ca37df
parent94ce1c0ebbdb59caaa2a91206ae98edf778ff556 (diff)
downloadbusybox-w32-894f0a32351fe6c28fe86958e5f4e21422394183.tar.gz
busybox-w32-894f0a32351fe6c28fe86958e5f4e21422394183.tar.bz2
busybox-w32-894f0a32351fe6c28fe86958e5f4e21422394183.zip
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)
776 */ 776 */
777 unsigned i = 1; 777 unsigned i = 1;
778 while (argv[i]) { 778 while (argv[i]) {
779 if (strcmp(argv[i], "-c") == 0) { 779 /* Accept not only -c, but also
780 * -lc, -cl, -llcclcllcc etc:
781 * "-l Literal mode (do not recognize HOST:FILE)"
782 * since we do not recognize that syntax anyway,
783 * might as well allow the option.
784 */
785 if (argv[i][0] == '-' && strchr(argv[i], 'c')
786 /*&& argv[i][1+strspn(argv[i]+1, "lc")] == '\0'*/
787 ) {
780 if (!argv[++i]) 788 if (!argv[++i])
781 break; 789 break;
782 if (strcmp(argv[i], "get") == 0) { 790 if (strcmp(argv[i], "get") == 0) {