Commit Graph

17 Commits

Author SHA1 Message Date
Sami Kerola 4ccf113704 hexdump: revert global exitval variable change
The change f2a037fb7b 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>
2013-09-10 12:57:31 +02:00
Sami Kerola f2a037fb7b hexdump: remove unnecessary global variables
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-07-01 11:08:01 +02:00
Benno Schulenberg b50945d4ac textual: spell and encode the name of Arkadiusz Miśkiewicz correctly
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-02-06 11:15:02 +01:00
Sami Kerola 89a13b46bd hexdump: fix shadow declaration
text-utils/hexdump.h:84:5: warning: shadowed declaration is here [-Wshadow]
./include/xalloc.h:23:28: warning: declaration of 'size' shadows a global declaration [-Wshadow]
./include/xalloc.h:33:40: warning: declaration of 'size' shadows a global declaration [-Wshadow]
./include/xalloc.h:43:49: warning: declaration of 'size' shadows a global declaration [-Wshadow]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-26 13:51:22 +02:00
Karel Zak b6b0ea094b hexdump: fix comparison of distinct pointer types
display.c: In function ‘get’:
display.c:262:117: warning: comparison of distinct pointer types lacks
a cast [enabled by default]

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-23 10:20:19 +02:00
Sami Kerola b87cbe8486 text-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-04 19:45:41 +02:00
Karel Zak 807e40c655 hexdump: use strtosize() for -n and -s
strtosize() is based on uintmax_t and supports all possible suffixes
(B,M,G,T ...)

Reported-by: Simon de Vlieger <simon@ikanobori.jp>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-21 19:35:22 +01:00
Karel Zak 0a0803460c hexdump: don't include err.h directly 2011-04-12 12:58:17 +02:00
Sami Kerola 85bf44b714 hexdump: new usage(), xalloc and err.h stuff
New usage help screen and print version switch. Also fixes to
exit codes, util linux xmalloc replaced emalloc and every error
print is using libc error function.

[kzak@redhat.com: - minor changes in formatting and coding style]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 14:38:23 +01:00
Sami Kerola 604eb2602c hexdump: remove od functionality in favor to GNU coreutils od
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2010-12-30 23:11:43 +01:00
Karel Zak ffc4374869 Imported from util-linux-2.11o tarball. 2006-12-07 00:25:53 +01:00
Karel Zak c07ebfa1e0 Imported from util-linux-2.11b tarball. 2006-12-07 00:25:46 +01:00
Karel Zak 22853e4a82 Imported from util-linux-2.10m tarball. 2006-12-07 00:25:43 +01:00
Karel Zak 7eda085c41 Imported from util-linux-2.9v tarball. 2006-12-07 00:25:39 +01:00
Karel Zak 2b6fc908bc Imported from util-linux-2.8 tarball. 2006-12-07 00:25:35 +01:00
Karel Zak fd6b7a7ffc Imported from util-linux-2.7.1 tarball. 2006-12-07 00:25:34 +01:00
Karel Zak 6dbe3af945 Imported from util-linux-2.2 tarball. 2006-12-07 00:25:32 +01:00