← Commit list

7dd906a38

Denys Vlasenko
Denys Vlasenko
2017-01-25
SUCCESS Duration: 203s

Subject

xxd: make -p output lines actually end with a newline

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/hexdump_xxd.c+3 -1
@@ -129,7 +129,7 @@ int xxd_main(int argc UNUSED_PARAM, char **argv)
}
// for -g3, this results in B B BS B B BS... B = "xxxxxx xxxxxx .....xx"
// todo: can be more clever and use
- // one "cols-1/B" format instead of many "B B B..." formats
+ // one 'bytes-1/1 "%02x"' format instead of many "B B B..." formats
//bb_error_msg("ADDED:'%s'", bigbuf);
bb_dump_add(dumper, bigbuf);
free(bigbuf);
@@ -138,6 +138,8 @@ int xxd_main(int argc UNUSED_PARAM, char **argv)
if (!(opt & OPT_p)) {
sprintf(buf, "\" \"%u/1 \"%%_p\"\"\n\"", cols); // " ASCII\n"
bb_dump_add(dumper, buf);
+ } else {
+ bb_dump_add(dumper, "\"\n\"");
}
return bb_dump_dump(dumper, argv);