-
- if ((flags & WIMLIB_EXTRACT_FLAG_NTFS)) {
- #ifdef WITH_NTFS_3G
- unsigned long mnt_flags;
- ret = ntfs_check_if_mounted(output_dir, &mnt_flags);
- if (ret != 0) {
- ERROR_WITH_ERRNO("NTFS-3g: Cannot determine if `%s' "
- "is mounted", output_dir);
- return WIMLIB_ERR_NTFS_3G;
- }
- if (!(mnt_flags & NTFS_MF_MOUNTED)) {
- ERROR("NTFS-3g: Filesystem on `%s' is not mounted ",
- output_dir);
- return WIMLIB_ERR_NTFS_3G;
- }
- if (mnt_flags & NTFS_MF_READONLY) {
- ERROR("NTFS-3g: Filesystem on `%s' is mounted "
- "read-only", output_dir);
- return WIMLIB_ERR_NTFS_3G;
- }
- #else
- ERROR("wimlib was compiled without support for NTFS-3g, so");
- ERROR("we cannot extract a WIM image while preserving NTFS-");
- ERROR("specific information");
- return WIMLIB_ERR_UNSUPPORTED;
- #endif
- }
- if (image == WIM_ALL_IMAGES)
- ret = extract_all_images(w, output_dir, flags);
- else
- ret = extract_single_image(w, image, output_dir, flags);
- return ret;