Skip to content

Commit

Permalink
extfs: modify the iso9660 extfs helper to support testing (xorriso part)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
  • Loading branch information
slowpeek authored and aborodin committed May 18, 2024
1 parent bbcfda3 commit 094a140
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/vfs/extfs/helpers/iso9660.in
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ xorriso_list() {
local temp_ls
temp_ls=$(mktemp "${MC_TMPDIR:-/tmp}"/mc-iso9660.XXXXXX) || return 1

"$XORRISO" -abort_on FATAL -dev stdio:"$1" -find / -exec lsdl 2>/dev/null >"$temp_ls"
# $XORRISO must be unquoted here to hook into the testing framework
$XORRISO -abort_on FATAL -dev stdio:"$1" -find / -exec lsdl 2>/dev/null >"$temp_ls"
local r=$?

if [ "$r" != 0 ]; then
Expand Down Expand Up @@ -245,6 +246,20 @@ shift

case "$cmd" in
list)
if [ -n "${MC_TEST_EXTFS_LIST_CMD:-}" ]; then
case "${MC_TEST_EXTFS_ISO9660_TOOL}" in
xorriso)
XORRISO="$MC_TEST_EXTFS_LIST_CMD"
xorriso_list "$@" || exit 1
;;
*)
exit 1
;;
esac

exit 0
fi

xorriso_list "$@" || {
test_iso "$@" || exit 1
mcisofs_list "$@" || exit 1
Expand Down

0 comments on commit 094a140

Please sign in to comment.