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);
} else {
/* Named data stream. Put the reference to it in the
* alternate data stream entries */
- struct ads_entry *new_ads_entry;
+ struct wim_ads_entry *new_ads_entry;
size_t stream_name_utf8_len;
ret = utf16_to_utf8((const char*)attr_record_name(actx->attr),
if (ret != 0)
return ret;
} else {
+ if (
#ifdef ENODATA
- if (errno != ENODATA) {
+ errno != ENODATA &&
+ #endif
+ errno != EMLINK
+ ) {
ERROR_WITH_ERRNO("Error getting DOS name "
"of `%s'", path);
return WIMLIB_ERR_NTFS_3G;
}
- #endif
}
}
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);