commit ba3366646ac558920be4c91ec7f0256cce4013f9
parent 8441c95a2fbdab43f3ed6efdd80388fee4d27850
Author: sin <sin@2f30.org>
Date: Wed, 4 Jun 2014 15:31:25 +0100
Use %1023s as opposed to %1023c
Using %1023c doesn't work with musl.
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git 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;