Whamcloud - gitweb
LU-843 iokit: get_ec_devno returns trash
Some commands leak output to stdout and get_ec_devno returns
its results via stdout. Redirect fd 8 to stdout and redirect
stdout to stderr. Echo final results to fd 8. Since this
only works when run as a subshell, invoke "exit" instead of
"return" when done.
Inside create_objects() function, stdin is redirected for a
shell "while" command. Though this is done in the current
environment (process) for current BASH, it is not required
and there is no committment that BASH will always behave
this way. Instead, set fd 3 to be reading from that file
and read from fd 3 insted of stdin.
While there, also test for "is object id" lines and extract
values using shell constructs instead of fork-ed commands.
Also while there, ensure that "ERROR" is always printed on
every error exit.
Also while there, ensure that the libecho file comes from
the same directory as the obdfilter-survey script.
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: If6dec690d3aa96f6ddb7fa2994330aae4f89fec0
Reviewed-on: http://review.whamcloud.com/1967
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>