[patch] testsuite/cpio.tests: fixes half of it

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Fri May 2 21:14:18 UTC 2008


On Fri, 2 May 2008, Denys Vlasenko wrote:

> On Friday 02 May 2008 19:33, Cristian Ionescu-Idbohrn wrote:
> > hexdump on my system (part of the bsdmainutils v6.1.10) does not support
> > the '-R' option, so I need to use busybox hexdump with
> > FEATURE_HEXDUMP_REVERSE enabled.
>
> # check if hexdump supports the '-R' option
> echo "x" | hexdump -R >/dev/null 2>&1 || optional FEATURE_HEXDUMP_REVERSE
> [ -z "$SKIP" ] || {
>         echo "'hexdump -R' not available" >&2
>         exit 1
> }
>
> "If hexdump -R fails, die with "'hexdump -R' not available".
> Else check FEATURE_HEXDUMP_REVERSE, and if it is not set,
> die with "'hexdump -R' not available". "
>
> I don't understand. If hexdump -R works, then FEATURE_HEXDUMP_REVERSE
> is set. optional FEATURE_HEXDUMP_REVERSE will always return SKIP="".
>
> IOW: this will work:
>
> hexdump -R </dev/null >/dev/null 2>&1 || {
>         echo "'hexdump -R' is not available" >&2
>         exit 1
> }
>
> Am I missing something?

No, that's better.


Cheers,

-- 
Cristian



More information about the busybox mailing list