← Commit list

894f0a323

Denys Vlasenko
Denys Vlasenko
2019-06-09
SUCCESS Duration: 153s

Subject

tftp: allow -lc and -cl options

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/tftp.c+9 -1
@@ -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) {