X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fntfs-capture.c;h=c4770a5dc3ae22ca4b20f478e6aa8b491a6bb79d;hp=fb670dc0183845e08f8e2349bc1c8b4cc6434295;hb=9b9a502863318d6208da2818b1d522346e5eee9e;hpb=3d7805d6132d821c4e29bc90e58518bfe3acb15c diff --git a/src/ntfs-capture.c b/src/ntfs-capture.c index fb670dc0..c4770a5d 100644 --- a/src/ntfs-capture.c +++ b/src/ntfs-capture.c @@ -27,15 +27,12 @@ #include "config.h" -#ifdef WITH_NTFS_3G #include #include -#endif #include "wimlib_internal.h" -#ifdef WITH_NTFS_3G #include "dentry.h" #include "lookup_table.h" #include "io.h" @@ -646,13 +643,13 @@ static int build_dentry_tree_ntfs_recursive(struct dentry **root_p, return ret; } -static int build_dentry_tree_ntfs(struct dentry **root_p, - const char *device, - struct lookup_table *lookup_table, - struct wim_security_data *sd, - const struct capture_config *config, - int flags, - void *extra_arg) +int build_dentry_tree_ntfs(struct dentry **root_p, + const char *device, + struct lookup_table *lookup_table, + struct wim_security_data *sd, + const struct capture_config *config, + int flags, + void *extra_arg) { ntfs_volume *vol; ntfs_inode *root_ni; @@ -721,34 +718,3 @@ out: } return ret; } - - - -WIMLIBAPI int wimlib_add_image_from_ntfs_volume(WIMStruct *w, - const char *device, - const char *name, - const char *config_str, - size_t config_len, - int flags) -{ - if (flags & (WIMLIB_ADD_IMAGE_FLAG_DEREFERENCE)) { - ERROR("Cannot dereference files when capturing directly from NTFS"); - return WIMLIB_ERR_INVALID_PARAM; - } - return do_add_image(w, device, name, config_str, config_len, flags, - build_dentry_tree_ntfs, &w->ntfs_vol); -} - -#else /* WITH_NTFS_3G */ -WIMLIBAPI int wimlib_add_image_from_ntfs_volume(WIMStruct *w, - const char *device, - const char *name, - const char *config_str, - size_t config_len, - int flags) -{ - ERROR("wimlib was compiled without support for NTFS-3g, so"); - ERROR("we cannot capture a WIM image directly from a NTFS volume"); - return WIMLIB_ERR_UNSUPPORTED; -} -#endif /* WITH_NTFS_3G */