Index: coreutils/dd.c =================================================================== --- coreutils/dd.c (revision 18379) +++ coreutils/dd.c (working copy) @@ -82,19 +82,22 @@ int dd_main(int argc, char **argv) #endif NULL }; -#define OP_bs 0 + 1 -#define OP_count OP_bs + 1 -#define OP_seek OP_count + 1 -#define OP_skip OP_seek + 1 -#define OP_if OP_skip + 1 -#define OP_of OP_if + 1 -#define OP_ibs OP_of + ENABLE_FEATURE_DD_IBS_OBS -#define OP_obs OP_ibs + ENABLE_FEATURE_DD_IBS_OBS -#define OP_conv OP_obs + ENABLE_FEATURE_DD_IBS_OBS -#define OP_conv_notrunc OP_conv + ENABLE_FEATURE_DD_IBS_OBS -#define OP_conv_sync OP_conv_notrunc + ENABLE_FEATURE_DD_IBS_OBS -#define OP_conv_noerror OP_conv_sync + ENABLE_FEATURE_DD_IBS_OBS - + enum { + OP_bs, + OP_count, + OP_seek, + OP_skip, + OP_if, + OP_of, +USE_FEATURE_DD_IBS_OBS( + OP_ibs, + OP_obs, + OP_conv, + OP_conv_notrunc, + OP_conv_sync, + OP_conv_noerror, +) + }; int flags = trunc_flag; size_t oc = 0, ibs = 512, obs = 512; ssize_t n, w; @@ -114,7 +117,8 @@ int dd_main(int argc, char **argv) } for (n = 1; n < argc; n++) { - smalluint key_len, what; + smalluint key_len; + int what; char *key; char *arg = argv[n]; @@ -125,7 +129,7 @@ int dd_main(int argc, char **argv) bb_show_usage(); key_len = key - arg + 1; key = xstrndup(arg, key_len); - what = index_in_str_array(keywords, key) + 1; + what = index_in_str_array(keywords, key); if (ENABLE_FEATURE_CLEAN_UP) free(key); if (what == 0) @@ -150,7 +154,7 @@ int dd_main(int argc, char **argv) key = strstr(arg, ","); if (key) *key = '\0'; - what = index_in_str_array(keywords, arg) + 1; + what = index_in_str_array(keywords, arg); if (what < OP_conv_notrunc) bb_error_msg_and_die(bb_msg_invalid_arg, arg, "conv"); if (what == OP_conv_notrunc)