diff --git a/dd.c b/dd.c index 85cb7f7..c6f3258 100644 --- a/dd.c +++ b/dd.c @@ -239,19 +239,19 @@ main(int argc, char *argv[]) /* emulate 'dd' argument parsing */ for (i = 1; i < argc; ++i) { memset(buf, 0, sizeof(buf)); - if (sscanf(argv[i], "if=%1023c", buf) == 1) + if (sscanf(argv[i], "if=%1023s", buf) == 1) config.in = strdup(buf); - else if (sscanf(argv[i], "of=%1023c", buf) == 1) + else if (sscanf(argv[i], "of=%1023s", buf) == 1) config.out = strdup(buf); - else if (sscanf(argv[i], "skip=%1023c", buf) == 1) + else if (sscanf(argv[i], "skip=%1023s", buf) == 1) config.skip = estrtoul(buf, 0); - else if (sscanf(argv[i], "seek=%1023c", buf) == 1) + else if (sscanf(argv[i], "seek=%1023s", buf) == 1) config.seek = estrtoul(buf, 0); - else if (sscanf(argv[i], "count=%1023c", buf) == 1) + else if (sscanf(argv[i], "count=%1023s", buf) == 1) config.count = estrtoul(buf, 0); else if (strcmp(argv[i], "direct") == 0) config.direct = 1; - else if (sscanf(argv[i], "bs=%1023c", buf) == 1) + else if (sscanf(argv[i], "bs=%1023s", buf) == 1) config.bs = estrtoul(buf, 0); else if (strcmp(argv[i], "bs") == 0) config.bs = 0;