- } else if (strncmp(*argv, "seek", 4) == 0) {
- seekBlocks = getNum((strchr(*argv, '=')) + 1);
- if (seekBlocks <= 0) {
- errorMsg("Bad seek value %s\n", *argv);
- goto usage;
+ for (i = 1; i < argc; i++) {
+ if (strncmp("bs=", argv[i], 3) == 0)
+ bs = bb_xparse_number(argv[i]+3, dd_suffixes);
+ else if (strncmp("count=", argv[i], 6) == 0)
+ count = bb_xparse_number(argv[i]+6, dd_suffixes);
+ else if (strncmp("seek=", argv[i], 5) == 0)
+ seek = bb_xparse_number(argv[i]+5, dd_suffixes);
+ else if (strncmp("skip=", argv[i], 5) == 0)
+ skip = bb_xparse_number(argv[i]+5, dd_suffixes);
+ else if (strncmp("if=", argv[i], 3) == 0)
+ infile = argv[i]+3;
+ else if (strncmp("of=", argv[i], 3) == 0)
+ outfile = argv[i]+3;
+ else if (strncmp("conv=", argv[i], 5) == 0) {
+ buf = argv[i]+5;
+ while (1) {
+ if (strncmp("notrunc", buf, 7) == 0) {
+ trunc = FALSE;
+ buf += 7;
+ } else if (strncmp("sync", buf, 4) == 0) {
+ sync_flag = TRUE;
+ buf += 4;
+ } else if (strncmp("noerror", buf, 7) == 0) {
+ noerror = TRUE;
+ buf += 7;
+ } else {
+ bb_error_msg_and_die("invalid conversion `%s'", argv[i]+5);
+ }
+ if (buf[0] == '\0')
+ break;
+ if (buf[0] == ',')
+ buf++;