]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex-ntfs
wimlib_select_image() => select_wim_image()
[wimlib] / tests / test-imagex-ntfs
index dbfd10a7342cb77e7ae83f1e23f000dc621e4367..1012c344707b7abea53ca1c44d4722241bd7a48b 100755 (executable)
@@ -31,8 +31,15 @@ do_unmount() {
 
 __do_mount() {
        options="$3"
-       if ! ntfs-3g ${options:+-o $options} $1 $2; then
-               error "Could not mount NTFS volume \"$1\" on \"$2\".  Make sure ntfs-3g is installed."
+       if [ -z "$options" ]; then
+               options="no_def_opts,silent"
+       else
+               options="$options,no_def_opts,silent"
+       fi
+       if ! ntfs-3g -o $options $1 $2; then
+               error "Could not mount NTFS volume \"$1\" on \"$2\"!  Make sure ntfs-3g is "\
+                     "installed, and that you are either running the tests as root or have ntfs-3g "\
+                     "installed setuid root, so that we can mount a NTFS volume."
        fi
 }
 
@@ -43,7 +50,7 @@ do_mount() {
 
 do_mkntfs() {
        if ! mkntfs --force --fast $1 &> /dev/null; then
-               error "Could not create NTFS volume on \"$1\".  Make sure ntfs-3g / ntfsprogs are installed"
+               error "Could not create NTFS volume \"$1\"!  Make sure ntfsprogs are installed."
        fi
 }
 
@@ -68,7 +75,10 @@ cleanup() {
 error() {
        echo "****************************************************************"
        echo "                         Test failure                           "
-       echo $*
+       while [ $# -gt 0 ]; do
+               echo $1
+               shift
+       done
        echo "****************************************************************"
        exit 1
 }