From 0a6c496e40df4f8327ee02f1f071d23ba0a33537 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 29 Apr 2003 18:21:40 +0000 Subject: [PATCH] * extfs/iso9660.in: Determine presence of Rock Ridge and Joliet extensions by running "isoinfo -R". Use current charset for Joliet extensions. --- vfs/ChangeLog | 6 ++++++ vfs/extfs/iso9660.in | 24 ++++++++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index aab983efb..493b9ec87 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,9 @@ +2003-04-29 Michael Shigorin + + * extfs/iso9660.in: Determine presence of Rock Ridge and Joliet + extensions by running "isoinfo -R". Use current charset for + Joliet extensions. + 2003-04-29 Pavel Roskin * extfs/iso9660.in: New filesystem for ISO-9660 images. diff --git a/vfs/extfs/iso9660.in b/vfs/extfs/iso9660.in index af5edc98e..c65ee0b08 100644 --- a/vfs/extfs/iso9660.in +++ b/vfs/extfs/iso9660.in @@ -1,19 +1,29 @@ #! /bin/sh -# ISO9660 VFS for MC by Michael Shigorin April 2003 +# ISO9660 VFS for MC by Michael Shigorin , +# modifications by Grigory Milev +# and Kachalov Anton April 2003 # based on lslR by Tomas Novak April 2000 # -- look there for additional parsing comments if needed # tested to comply with isoinfo 2.0's output test_iso () { - for i in '-J -R' '-J' '-R'; do - ISOINFO="isoinfo $i" - $ISOINFO "$1" >/dev/null 2>&1 && break - done + CHARSET=`echo $save_ctype | sed -n -e 's/.*\.\(.*\)"$/\1/p' |tr '[A-Z]' '[a-z]'` + if test -n "$CHARSET"; then + isoinfo -j $CHARSET 2>&1 | grep "Unknown charset" >/dev/null && CHARSET= + fi + if test -n "$CHARSET"; then + JOLIET_OPT="-j $CHARSET -J" + else + JOLIET_OPT="-J" + fi + ISOINFO="isoinfo -R" + isoinfo -d -i "$1" | grep "NO Joliet" > /dev/null || ISOINFO="$ISOINFO $JOLIET_OPT" } mcisofs_list () { +# left as a reminder to implement compressed image support =) case "$1" in *.bz2) MYCAT="bzip2 -dc";; *.gz) MYCAT="gzip -dc";; @@ -44,6 +54,7 @@ BEGIN { sub(irx, "", name) sub("^---------- 0 0 0", "-r--r--r-- 1 root root", attr) sub(" $", "", name) + ## sub(";[0-9]+$", "", name) ## would break copyout # skip . and .. if (name ~ /^\.\.?/) next; printf "%s%s%s\n", attr, dir, name @@ -54,7 +65,8 @@ mcisofs_copyout () { $ISOINFO -i "$1" -x "/$2" > "$3" } -export LC_ALL="C" +save_ctype=`locale | grep LC_CTYPE` +LC_ALL=C cmd="$1" shift