}
/* 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(¶ms->inode_table,
path_basename_with_len(path, path_len),
ni->mft_no, 0, false, &root);
if (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(¶ms->sd_set,
sd, ret);
if (inode->i_security_id == -1) {
ERROR("Out of memory");
goto out;
}
- ret = inode_table_new_dentry(params->inode_table,
+ ret = inode_table_new_dentry(¶ms->inode_table,
path_basename_with_len(path, path_len),
stbuf.st_ino, stbuf.st_dev, false, &root);
if (ret)
int add_flags;
tchar *fs_source_path;
tchar *wim_target_path;
- struct wim_inode_table inode_table;
- struct sd_set sd_set;
struct wim_image_metadata *imd;
struct list_head unhashed_streams;
struct add_image_params params;
extra_arg = NULL;
}
- ret = init_inode_table(&inode_table, 9001);
+ ret = init_inode_table(¶ms.inode_table, 9001);
if (ret)
goto out;
- ret = init_sd_set(&sd_set, imd->security_data);
+ ret = init_sd_set(¶ms.sd_set, imd->security_data);
if (ret)
goto out_destroy_inode_table;
INIT_LIST_HEAD(&unhashed_streams);
wim->lookup_table->unhashed_streams = &unhashed_streams;
params.lookup_table = wim->lookup_table;
- params.inode_table = &inode_table;
- params.sd_set = &sd_set;
params.config = config;
params.add_flags = add_flags;
params.progress_func = progress_func;
#ifdef WITH_NTFS_3G
imd->ntfs_vol = ntfs_vol;
#endif
- inode_table_prepare_inode_list(&inode_table, &imd->inode_list);
+ inode_table_prepare_inode_list(¶ms.inode_table, &imd->inode_list);
ret = 0;
rollback_sd = false;
if (add_flags & WIMLIB_ADD_FLAG_RPFIX)
#endif
free_dentry_tree(branch, wim->lookup_table);
out_destroy_sd_set:
- destroy_sd_set(&sd_set, rollback_sd);
+ destroy_sd_set(¶ms.sd_set, rollback_sd);
out_destroy_inode_table:
- destroy_inode_table(&inode_table);
+ destroy_inode_table(¶ms.inode_table);
out:
return ret;
}
#include "util.h"
#include "list.h"
#include "wimlib.h"
-
-#if defined(WITH_FUSE) || defined(ENABLE_MULTITHREADED_COMPRESSION)
-#include <pthread.h>
-#endif
+#include "security.h"
#define WIMLIB_MAKEVERSION(major, minor, patch) \
((major << 20) | (minor << 10) | patch)
/* Pointer to the lookup table of the WIM. */
struct wim_lookup_table *lookup_table;
- /* Pointer to a hash table of inodes that have been captured for this
- * WIM image so far. */
- struct wim_inode_table *inode_table;
+ /* Hash table of inodes that have been captured for this tree so far. */
+ struct wim_inode_table inode_table;
- /* Pointer to the set of security descriptors that have been captured
- * for this image so far. */
- struct sd_set *sd_set;
+ /* The set of security descriptors that have been captured for this
+ * image so far. */
+ struct sd_set sd_set;
/* Pointer to the capture configuration, which indicates whether any
* files should be excluded from capture or not. */
* only 1 link and refuse to hard link them. This is because Windows
* has a bug where it can return duplicate File IDs for files and
* directories on the FAT filesystem. */
- ret = inode_table_new_dentry(params->inode_table,
+ ret = inode_table_new_dentry(¶ms->inode_table,
path_basename_with_len(path, path_num_chars),
((u64)file_info.nFileIndexHigh << 32) |
(u64)file_info.nFileIndexLow,
if (!(params->add_flags & WIMLIB_ADD_FLAG_NO_ACLS)
&& (vol_flags & FILE_PERSISTENT_ACLS))
{
- ret = win32_get_security_descriptor(root, params->sd_set,
+ ret = win32_get_security_descriptor(root, ¶ms->sd_set,
path, state,
params->add_flags);
if (ret)
#include <shlwapi.h> /* for PathMatchSpecW() */
#include <errno.h>
+#include <pthread.h>
#include "win32_common.h"