]> wimlib.net Git - wimlib/blobdiff - src/ntfs-capture.c
add_params: Embed inode table and sd_set directly
[wimlib] / src / ntfs-capture.c
index 9896cdcca70292aa10081d0f9457e4d6cfb9d264..5c46504617c1561d691715660c2280db1a4f49b3 100644 (file)
@@ -546,7 +546,7 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_ret,
        if (exclude_path(path, path_len, params->config, false)) {
                /* Exclude a file or directory tree based on the capture
                 * configuration file */
-               if ((params->add_image_flags & WIMLIB_ADD_IMAGE_FLAG_EXCLUDE_VERBOSE)
+               if ((params->add_flags & WIMLIB_ADD_FLAG_EXCLUDE_VERBOSE)
                    && params->progress_func)
                {
                        union wimlib_progress_info info;
@@ -572,7 +572,7 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_ret,
                return WIMLIB_ERR_NTFS_3G;
        }
 
-       if ((params->add_image_flags & WIMLIB_ADD_IMAGE_FLAG_VERBOSE)
+       if ((params->add_flags & WIMLIB_ADD_FLAG_VERBOSE)
            && params->progress_func)
        {
                union wimlib_progress_info info;
@@ -582,7 +582,7 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_ret,
        }
 
        /* Create a WIM dentry with an associated inode, which may be shared */
-       ret = inode_table_new_dentry(params->inode_table,
+       ret = inode_table_new_dentry(&params->inode_table,
                                     path_basename_with_len(path, path_len),
                                     ni->mft_no, 0, false, &root);
        if (ret)
@@ -645,7 +645,13 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_ret,
                        goto out;
        }
 
-       if (!(params->add_image_flags & WIMLIB_ADD_IMAGE_FLAG_NO_ACLS)) {
+       /* Reparse-point fixups are a no-op because in NTFS-3g capture mode we
+        * only allow capturing an entire volume. */
+       if (params->add_flags & WIMLIB_ADD_FLAG_RPFIX &&
+           inode_is_symlink(inode))
+               inode->i_not_rpfixed = 0;
+
+       if (!(params->add_flags & WIMLIB_ADD_FLAG_NO_ACLS)) {
                /* Get security descriptor */
                char _sd[1];
                char *sd = _sd;
@@ -659,7 +665,7 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_ret,
                                                         ni, dir_ni, sd, ret);
                }
                if (ret > 0) {
-                       inode->i_security_id = sd_set_add_sd(params->sd_set,
+                       inode->i_security_id = sd_set_add_sd(&params->sd_set,
                                                             sd, ret);
                        if (inode->i_security_id == -1) {
                                ERROR("Out of memory");