AC_DEFINE([WITH_NTFS_3G], [1], [Define to 1 to enable support for
NTFS-specific information])
+ dnl This effectively checks for NTFS-3g 2011.4.12 or later
AC_CHECK_LIB([ntfs-3g], [ntfs_xattr_system_setxattr], [],
[AC_MSG_ERROR([Cannot find libntfs-3g version 2011-4-12
or later. Without libntfs-3g, wimlib cannot include support for
features.])])
LIBNTFS_3G_LDADD="`pkg-config --libs libntfs-3g`"
LIBNTFS_3G_CFLAGS="`pkg-config --cflags libntfs-3g`"
+
+ dnl This checks for a NTFS-3g interface that was changed in the
+ dnl 2013.1.13 release
+ AC_CHECK_DECL([NTFS_MNT_RDONLY],
+ [AC_DEFINE([HAVE_NTFS_MNT_RDONLY],
+ [1],
+ [Define to 1 if ntfs_mount() takes the flag NTFS_MNT_RDONLY])],
+ ,
+ [#include <ntfs-3g/volume.h>])
else
LIBNTFS_3G_LDADD=
LIBNTFS_3G_CFLAGS=
DEBUG("Mounting NTFS volume `%s' read-only", device);
+#ifdef HAVE_NTFS_MNT_RDONLY
+ /* NTFS-3g 2013 */
+ vol = ntfs_mount(device, NTFS_MNT_RDONLY);
+#else
+ /* NTFS-3g 2011, 2012 */
vol = ntfs_mount(device, MS_RDONLY);
+#endif
if (!vol) {
ERROR_WITH_ERRNO("Failed to mount NTFS volume `%s' read-only",
device);
msg "file with DOS name"
do_test "echo 1 > file; setfattr -v file -n system.ntfs_dos_name file"
-msg "file with DOS name with alphabetically smaller hardlink in same directory"
-do_test "echo 1 > file; setfattr -v file -n system.ntfs_dos_name file; ln file aaa_link"
+# To be replaced/removed: files with DOS names can no longer be hard linked as
+# of NTFS-3g 2013.1.13.
-msg "file with DOS name with alphabetically larger hardlink in same directory"
-do_test "echo 1 > file; setfattr -v file -n system.ntfs_dos_name file; ln file zzz_link"
+#msg "file with DOS name with alphabetically smaller hardlink in same directory"
+#do_test "echo 1 > file; setfattr -v file -n system.ntfs_dos_name file; ln file aaa_link"
-msg "file with long name and with DOS name with alphabetically smaller hardlink in same directory"
-do_test 'echo 1 > file_with_a_long_name;
- setfattr -v "file~1" -n system.ntfs_dos_name file_with_a_long_name;
- ln file_with_a_long_name aaa_link'
+#msg "file with DOS name with alphabetically larger hardlink in same directory"
+#do_test "echo 1 > file; setfattr -v file -n system.ntfs_dos_name file; ln file zzz_link"
+
+#msg "file with long name and with DOS name with alphabetically smaller hardlink in same directory"
+#do_test 'echo 1 > file_with_a_long_name;
+ #setfattr -v "file~1" -n system.ntfs_dos_name file_with_a_long_name;
+ #ln file_with_a_long_name aaa_link'
msg "many nested directories"
do_test 'mkdir dir; mkdir dir/subdir; mkdir dir/subdir/subdir2; mkdir dir/subdir/subdir3'
setfattr -n user.ads -v "888" file;
ln file link;'
-msg "file with named data stream with hardlink and DOS name"
-do_test 'echo 999 > file;
- setfattr -n user.ads -v "888" file;
- ln file link;
- setfattr -v DOSNAME -n system.ntfs_dos_name file;'
+# To be replaced/removed: files with DOS names can no longer be hard linked as
+# of NTFS-3g 2013.1.13.
+
+#msg "file with named data stream with hardlink and DOS name"
+#do_test 'echo 999 > file;
+ #setfattr -n user.ads -v "888" file;
+ #ln file link;
+ #setfattr -v DOSNAME -n system.ntfs_dos_name file;'
msg "C source code of wimlib"
do_test 'cp $srcdir/src/*.{c,h} .'
ln file dir/subdir/file;
echo -n 8 > dir/subdir/file2;
ln dir/subdir/file dir/subdir/link;
- setfattr -n system.ntfs_dos_name -v 123 dir/subdir/link;
+ echo -n > dir/subdir/empty;
+ setfattr -n system.ntfs_dos_name -v 123 dir/subdir/empty;
setfattr -n system.ntfs_acl -v 0s`cat $srcdir/tests/security_descriptor_1.base64` dir/subdir/link;
setfattr -n user.yet_another_ads -v "" dir/subdir/link;
setfattr -n user.yet_another_ads2 -v "" dir/subdir/link;