X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fntfs-capture.c;h=ad56ba75b63afba455328676b8af21f53e495c58;hp=5662572b30929615413333986344547657bd06e3;hb=7f262affd75b6e6e3e2a449b1d956592c9772a96;hpb=c7af42d3d894338bbd1cb7f4b77948f746485482 diff --git a/src/ntfs-capture.c b/src/ntfs-capture.c index 5662572b..ad56ba75 100644 --- a/src/ntfs-capture.c +++ b/src/ntfs-capture.c @@ -340,7 +340,7 @@ static int capture_ntfs_streams(struct wim_dentry *dentry, ntfs_inode *ni, lte->resource_entry.size = data_size; } ntfs_loc = NULL; - DEBUG("Add resource for `%s' (size = %zu)", + DEBUG("Add resource for `%s' (size = %"PRIu64")", dentry->file_name_utf8, lte->resource_entry.original_size); copy_hash(lte->hash, attr_hash); @@ -678,7 +678,13 @@ int build_dentry_tree_ntfs(struct wim_dentry **root_p, 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);