]> git.ipfire.org Git - thirdparty/util-linux.git/commit
hexdump: revert global exitval variable change
authorSami Kerola <kerolasa@iki.fi>
Sun, 8 Sep 2013 16:09:09 +0000 (17:09 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 10 Sep 2013 10:57:31 +0000 (12:57 +0200)
commit4ccf1137046d3f28bf2f2781a095ecd225294fd8
treee1284eff2f74cdcb29e08e5718f4bae029744c5b
parent0a2c1e8ed72547571eb3ed6d492c89b136993d11
hexdump: revert global exitval variable change

The change f2a037fb7b153954d5d34cca48182b6d8832fcfa had unfavorable
effect of making hexdump to return non-zero exit value always.

This happen because oversight when 'exitval' gets to be set.  By clance,
one might expect main() to call next() which will return value for
'exitval'.  That assessment misses later call chain main() -> display()
-> get() -> next(), which in reverse should return correct value for
'exitval'.

It was mentioned in util-linux maillist that Ondrej Oprala is working on
major renewal of the hexdump .  That in mind it seems best to simply to
revert the global 'exitval' and avoid conflict with Ondrej's work.

Reference: http://markmail.org/message/sbnvuhkboreujj5p
Reported-by: Dave Reisner <d@falconindy.com>
CC: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
text-utils/display.c
text-utils/hexdump.c
text-utils/hexdump.h