diff options
Diffstat (limited to 'util-linux/hexdump_xxd.c')
-rw-r--r-- | util-linux/hexdump_xxd.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/util-linux/hexdump_xxd.c b/util-linux/hexdump_xxd.c index 9173f5d43..9738a76ad 100644 --- a/util-linux/hexdump_xxd.c +++ b/util-linux/hexdump_xxd.c | |||
@@ -41,7 +41,7 @@ | |||
41 | // -u use upper case hex letters. | 41 | // -u use upper case hex letters. |
42 | 42 | ||
43 | //usage:#define xxd_trivial_usage | 43 | //usage:#define xxd_trivial_usage |
44 | //usage: "[-pri] [-g N] [-c N] [-n LEN] [-s OFS] [-o OFS] [FILE]" | 44 | //usage: "[-pri] [-g N] [-c N] [-l LEN] [-s OFS] [-o OFS] [FILE]" |
45 | //usage:#define xxd_full_usage "\n\n" | 45 | //usage:#define xxd_full_usage "\n\n" |
46 | //usage: "Hex dump FILE (or stdin)\n" | 46 | //usage: "Hex dump FILE (or stdin)\n" |
47 | //usage: "\n -g N Bytes per group" | 47 | //usage: "\n -g N Bytes per group" |
@@ -78,7 +78,7 @@ static void write_zeros(off_t count) | |||
78 | do { | 78 | do { |
79 | unsigned sz = count < COMMON_BUFSIZE ? (unsigned)count : COMMON_BUFSIZE; | 79 | unsigned sz = count < COMMON_BUFSIZE ? (unsigned)count : COMMON_BUFSIZE; |
80 | if (fwrite(fillbuf, 1, sz, stdout) != sz) | 80 | if (fwrite(fillbuf, 1, sz, stdout) != sz) |
81 | bb_perror_msg_and_die("write error"); | 81 | bb_simple_perror_msg_and_die("write error"); |
82 | count -= sz; | 82 | count -= sz; |
83 | } while (count != 0); | 83 | } while (count != 0); |
84 | } | 84 | } |
@@ -120,7 +120,7 @@ static void reverse(unsigned opt, const char *filename, char *opt_s) | |||
120 | if (ofs != cur) { | 120 | if (ofs != cur) { |
121 | if (fseeko(stdout, ofs, SEEK_SET) != 0) { | 121 | if (fseeko(stdout, ofs, SEEK_SET) != 0) { |
122 | if (ofs < cur) | 122 | if (ofs < cur) |
123 | bb_perror_msg_and_die("cannot seek"); | 123 | bb_simple_perror_msg_and_die("cannot seek"); |
124 | write_zeros(ofs - cur); | 124 | write_zeros(ofs - cur); |
125 | } | 125 | } |
126 | cur = ofs; | 126 | cur = ofs; |
@@ -229,11 +229,8 @@ int xxd_main(int argc UNUSED_PARAM, char **argv) | |||
229 | { | 229 | { |
230 | char buf[80]; | 230 | char buf[80]; |
231 | dumper_t *dumper; | 231 | dumper_t *dumper; |
232 | #if !ENABLE_PLATFORM_MINGW32 | 232 | char *opt_l, *opt_o; |
233 | char *opt_l, *opt_s, *opt_o; | 233 | char *opt_s = NULL; |
234 | #else | ||
235 | char *opt_l, *opt_s = NULL, *opt_o; | ||
236 | #endif | ||
237 | unsigned bytes = 2; | 234 | unsigned bytes = 2; |
238 | unsigned cols = 0; | 235 | unsigned cols = 0; |
239 | unsigned opt; | 236 | unsigned opt; |