/* Common parameters to implementations of building an in-memory dentry tree
* from an on-disk directory structure. */
-struct add_image_params {
+struct capture_params {
/* Pointer to the lookup table of the WIM. */
struct wim_lookup_table *lookup_table;
/* capture_common.c */
extern int
-do_capture_progress(struct add_image_params *params, int status,
+do_capture_progress(struct capture_params *params, int status,
const struct wim_inode *inode);
extern int
extern int
try_exclude(const tchar *full_path, size_t full_path_nchars,
- const struct add_image_params *params);
+ const struct capture_params *params);
typedef int (*capture_tree_t)(struct wim_dentry **, const tchar *,
- struct add_image_params *);
+ struct capture_params *);
#ifdef WITH_NTFS_3G
/* ntfs-3g_capture.c */
extern int
build_dentry_tree_ntfs(struct wim_dentry **root_p,
const tchar *device,
- struct add_image_params *params);
+ struct capture_params *params);
#endif
#ifdef __WIN32__
extern int
win32_build_dentry_tree(struct wim_dentry **root_ret,
const tchar *root_disk_path,
- struct add_image_params *params);
+ struct capture_params *params);
#define platform_default_capture_tree win32_build_dentry_tree
#else
/* unix_capture.c */
extern int
unix_build_dentry_tree(struct wim_dentry **root_ret,
const tchar *root_disk_path,
- struct add_image_params *params);
+ struct capture_params *params);
#define platform_default_capture_tree unix_build_dentry_tree
#endif
#define WIMLIB_ADD_FLAG_ROOT 0x80000000
static inline int
-report_capture_error(struct add_image_params *params, int error_code,
+report_capture_error(struct capture_params *params, int error_code,
const tchar *path)
{
return report_error(params->progfunc, params->progctx, error_code, path);
* via additional hard links, inode->i_nlink will be greater than 1.
*/
int
-do_capture_progress(struct add_image_params *params, int status,
+do_capture_progress(struct capture_params *params, int status,
const struct wim_inode *inode)
{
switch (status) {
*/
int
try_exclude(const tchar *full_path, size_t full_path_nchars,
- const struct add_image_params *params)
+ const struct capture_params *params)
{
int ret;
size_t path_len;
struct dos_name_map *dos_name_map;
ntfs_volume *vol;
- struct add_image_params *params;
+ struct capture_params *params;
int ret;
};
size_t path_len,
int name_type,
ntfs_volume *ntfs_vol,
- struct add_image_params *params);
+ struct capture_params *params);
static int
wim_ntfs_capture_filldir(void *dirent, const ntfschar *name,
size_t path_len,
int name_type,
ntfs_volume *vol,
- struct add_image_params *params)
+ struct capture_params *params)
{
u32 attributes;
int ret;
int
build_dentry_tree_ntfs(struct wim_dentry **root_p,
const char *device,
- struct add_image_params *params)
+ struct capture_params *params)
{
ntfs_volume *vol;
ntfs_inode *root_ni;
unix_build_dentry_tree_recursive(struct wim_dentry **tree_ret,
char *path, size_t path_len,
int dirfd, const char *relpath,
- struct add_image_params *params);
+ struct capture_params *params);
static int
unix_scan_directory(struct wim_dentry *dir_dentry,
char *full_path, size_t full_path_len,
int parent_dirfd, const char *dir_relpath,
- struct add_image_params *params)
+ struct capture_params *params)
{
int dirfd;
static int
unix_scan_symlink(const char *full_path, int dirfd, const char *relpath,
- struct wim_inode *inode, struct add_image_params *params)
+ struct wim_inode *inode, struct capture_params *params)
{
char deref_name_buf[4096];
ssize_t deref_name_len;
unix_build_dentry_tree_recursive(struct wim_dentry **tree_ret,
char *full_path, size_t full_path_len,
int dirfd, const char *relpath,
- struct add_image_params *params)
+ struct capture_params *params)
{
struct wim_dentry *tree = NULL;
struct wim_inode *inode = NULL;
*
* @root_disk_path: The path to the root of the directory tree on disk.
*
- * @params: See doc for `struct add_image_params'.
+ * @params: See doc for `struct capture_params'.
*
* @return: 0 on success, nonzero on failure. It is a failure if any of
* the files cannot be `stat'ed, or if any of the needed
int
unix_build_dentry_tree(struct wim_dentry **root_ret,
const char *root_disk_path,
- struct add_image_params *params)
+ struct capture_params *params)
{
size_t path_len;
size_t path_bufsz;
tchar *fs_source_path;
tchar *wim_target_path;
const tchar *config_file;
- struct add_image_params params;
+ struct capture_params params;
struct capture_config config;
capture_tree_t capture_tree = platform_default_capture_tree;
#ifdef WITH_NTFS_3G
size_t full_path_nchars,
const wchar_t *filename,
size_t filename_nchars,
- struct add_image_params *params,
+ struct capture_params *params,
struct winnt_scan_stats *stats,
u32 vol_flags);
wchar_t *full_path,
size_t full_path_nchars,
struct wim_dentry *parent,
- struct add_image_params *params,
+ struct capture_params *params,
struct winnt_scan_stats *stats,
u32 vol_flags)
{
}
static int
-winnt_rpfix_progress(struct add_image_params *params, const wchar_t *path,
+winnt_rpfix_progress(struct capture_params *params, const wchar_t *path,
const struct reparse_data *rpdata, int scan_status)
{
size_t print_name_nchars = rpdata->print_name_nbytes / sizeof(wchar_t);
static int
winnt_try_rpfix(u8 *rpbuf, u16 *rpbuflen_p,
u64 capture_root_ino, u64 capture_root_dev,
- const wchar_t *path, struct add_image_params *params)
+ const wchar_t *path, struct capture_params *params)
{
struct reparse_data rpdata;
const wchar_t *rel_target;
*/
static int
winnt_get_reparse_data(HANDLE h, const wchar_t *path,
- struct add_image_params *params,
+ struct capture_params *params,
u8 *rpbuf, u16 *rpbuflen_ret)
{
DWORD bytes_returned;
size_t full_path_nchars,
const wchar_t *filename,
size_t filename_nchars,
- struct add_image_params *params,
+ struct capture_params *params,
struct winnt_scan_stats *stats,
u32 vol_flags)
{
int
win32_build_dentry_tree(struct wim_dentry **root_ret,
const wchar_t *root_disk_path,
- struct add_image_params *params)
+ struct capture_params *params)
{
wchar_t *path;
int ret;