diff options
-rw-r--r-- | coreutils/dd.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c index 34a325ea6..3011e005d 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c | |||
@@ -85,19 +85,22 @@ int dd_main(int argc, char **argv) | |||
85 | #endif | 85 | #endif |
86 | NULL | 86 | NULL |
87 | }; | 87 | }; |
88 | #define OP_bs 0 + 1 | 88 | enum { |
89 | #define OP_count OP_bs + 1 | 89 | OP_bs = 1, |
90 | #define OP_seek OP_count + 1 | 90 | OP_count, |
91 | #define OP_skip OP_seek + 1 | 91 | OP_seek, |
92 | #define OP_if OP_skip + 1 | 92 | OP_skip, |
93 | #define OP_of OP_if + 1 | 93 | OP_if, |
94 | #define OP_ibs OP_of + ENABLE_FEATURE_DD_IBS_OBS | 94 | OP_of, |
95 | #define OP_obs OP_ibs + ENABLE_FEATURE_DD_IBS_OBS | 95 | USE_FEATURE_DD_IBS_OBS( |
96 | #define OP_conv OP_obs + ENABLE_FEATURE_DD_IBS_OBS | 96 | OP_ibs, |
97 | #define OP_conv_notrunc OP_conv + ENABLE_FEATURE_DD_IBS_OBS | 97 | OP_obs, |
98 | #define OP_conv_sync OP_conv_notrunc + ENABLE_FEATURE_DD_IBS_OBS | 98 | OP_conv, |
99 | #define OP_conv_noerror OP_conv_sync + ENABLE_FEATURE_DD_IBS_OBS | 99 | OP_conv_notrunc, |
100 | 100 | OP_conv_sync, | |
101 | OP_conv_noerror, | ||
102 | ) | ||
103 | }; | ||
101 | int flags = trunc_flag; | 104 | int flags = trunc_flag; |
102 | size_t oc = 0, ibs = 512, obs = 512; | 105 | size_t oc = 0, ibs = 512, obs = 512; |
103 | ssize_t n, w; | 106 | ssize_t n, w; |
@@ -117,7 +120,8 @@ int dd_main(int argc, char **argv) | |||
117 | } | 120 | } |
118 | 121 | ||
119 | for (n = 1; n < argc; n++) { | 122 | for (n = 1; n < argc; n++) { |
120 | smalluint key_len, what; | 123 | smalluint key_len; |
124 | smalluint what; | ||
121 | char *key; | 125 | char *key; |
122 | char *arg = argv[n]; | 126 | char *arg = argv[n]; |
123 | 127 | ||