static struct wimlib_update_command *
capture_sources_to_add_cmds(const struct wimlib_capture_source *sources,
size_t num_sources,
- int add_image_flags,
+ int add_flags,
const struct wimlib_capture_config *config)
{
struct wimlib_update_command *add_cmds;
sources[i].fs_source_path,
sources[i].wim_target_path);
add_cmds[i].op = WIMLIB_UPDATE_OP_ADD;
- add_cmds[i].add.add_flags = add_image_flags;
+ add_cmds[i].add.add_flags = add_flags;
add_cmds[i].add.config = (struct wimlib_capture_config*)config;
add_cmds[i].add.fs_source_path = sources[i].fs_source_path;
add_cmds[i].add.wim_target_path = sources[i].wim_target_path;
size_t num_sources,
const tchar *name,
const struct wimlib_capture_config *config,
- int add_image_flags,
+ int add_flags,
wimlib_progress_func_t progress_func)
{
int ret;
struct wimlib_update_command *add_cmds;
- DEBUG("Adding image \"%"TS"\" from %zu sources (add_image_flags=%#x)",
- name, num_sources, add_image_flags);
+ DEBUG("Adding image \"%"TS"\" from %zu sources (add_flags=%#x)",
+ name, num_sources, add_flags);
/* Add the new image (initially empty) */
ret = wimlib_add_empty_image(wim, name, NULL);
/* Translate the "capture sources" into generic update commands. */
add_cmds = capture_sources_to_add_cmds(sources, num_sources,
- add_image_flags, config);
+ add_flags, config);
if (!add_cmds) {
ret = WIMLIB_ERR_NOMEM;
goto out_delete_image;
goto out_delete_image;
/* Success; set boot index if requested. */
- if (add_image_flags & WIMLIB_ADD_IMAGE_FLAG_BOOT)
+ if (add_flags & WIMLIB_ADD_FLAG_BOOT)
wim->hdr.boot_idx = wim->hdr.image_count;
ret = 0;
goto out;
const tchar *source,
const tchar *name,
const struct wimlib_capture_config *config,
- int add_image_flags,
+ int add_flags,
wimlib_progress_func_t progress_func)
{
/* Delegate the work to the more general wimlib_add_image_multisource().
.reserved = 0,
};
return wimlib_add_image_multisource(wim, &capture_src, 1, name,
- config, add_image_flags,
+ config, add_flags,
progress_func);
}
#define WIMLIB_UNIX_DATA_TAG_UTF16LE_NBYTES (sizeof(WIMLIB_UNIX_DATA_TAG_UTF16LE) - 1)
/* Format for special alternate data stream entries to store UNIX data for files
- * and directories (see: WIMLIB_ADD_IMAGE_FLAG_UNIX_DATA) */
+ * and directories (see: WIMLIB_ADD_FLAG_UNIX_DATA) */
struct wimlib_unix_data {
u16 version; /* Must be 0 */
u16 uid;
for (;;) {
if (stream_name_nbytes) {
/* Skip special UNIX data entries (see documentation for
- * WIMLIB_ADD_IMAGE_FLAG_UNIX_DATA) */
+ * WIMLIB_ADD_FLAG_UNIX_DATA) */
if (stream_name_nbytes == WIMLIB_UNIX_DATA_TAG_UTF16LE_NBYTES
&& !memcmp(stream_name,
WIMLIB_UNIX_DATA_TAG_UTF16LE,
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;
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;
/* Reparse-point fixups are a no-op because in NTFS-3g capture mode we
* only allow capturing an entire volume. */
- if (params->add_image_flags & WIMLIB_ADD_IMAGE_FLAG_RPFIX &&
+ if (params->add_flags & WIMLIB_ADD_FLAG_RPFIX &&
inode_is_symlink(inode))
inode->i_not_rpfixed = 0;
- if (!(params->add_image_flags & WIMLIB_ADD_IMAGE_FLAG_NO_ACLS)) {
+ if (!(params->add_flags & WIMLIB_ADD_FLAG_NO_ACLS)) {
/* Get security descriptor */
char _sd[1];
char *sd = _sd;
dest[deref_name_len] = '\0';
DEBUG("Read symlink `%s'", dest);
- if ((params->add_image_flags & WIMLIB_ADD_IMAGE_FLAG_RPFIX) &&
+ if ((params->add_flags & WIMLIB_ADD_FLAG_RPFIX) &&
dest[0] == '/')
{
dest = capture_fixup_absolute_symlink(dest,
struct wim_inode *inode;
if (exclude_path(path, path_len, params->config, true)) {
- 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;
goto out;
}
- 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;
struct stat stbuf;
int (*stat_fn)(const char *restrict, struct stat *restrict);
- if ((params->add_image_flags & WIMLIB_ADD_IMAGE_FLAG_DEREFERENCE) ||
- (params->add_image_flags & WIMLIB_ADD_IMAGE_FLAG_ROOT))
+ if ((params->add_flags & WIMLIB_ADD_FLAG_DEREFERENCE) ||
+ (params->add_flags & WIMLIB_ADD_FLAG_ROOT))
stat_fn = stat;
else
stat_fn = lstat;
inode->i_last_access_time = unix_timestamp_to_wim(stbuf.st_atime);
#endif
inode->i_resolved = 1;
- if (params->add_image_flags & WIMLIB_ADD_IMAGE_FLAG_UNIX_DATA) {
+ if (params->add_flags & WIMLIB_ADD_FLAG_UNIX_DATA) {
ret = inode_set_unix_data(inode, stbuf.st_uid,
stbuf.st_gid,
stbuf.st_mode,
if (ret)
goto out;
}
- params->add_image_flags &= ~WIMLIB_ADD_IMAGE_FLAG_ROOT;
+ params->add_flags &= ~WIMLIB_ADD_FLAG_ROOT;
if (S_ISREG(stbuf.st_mode))
ret = unix_capture_regular_file(path, stbuf.st_size,
inode, params->lookup_table);
return WIMLIB_ERR_STAT;
}
- if ((params->add_image_flags & WIMLIB_ADD_IMAGE_FLAG_ROOT) &&
+ if ((params->add_flags & WIMLIB_ADD_FLAG_ROOT) &&
!S_ISDIR(root_stbuf.st_mode))
{
ERROR("Root of capture \"%s\" is not a directory",
imd = wim->image_metadata[wim->current_image - 1];
- if (add_flags & WIMLIB_ADD_IMAGE_FLAG_NTFS) {
+ if (add_flags & WIMLIB_ADD_FLAG_NTFS) {
#ifdef WITH_NTFS_3G
capture_tree = build_dentry_tree_ntfs;
extra_arg = &ntfs_vol;
params.inode_table = &inode_table;
params.sd_set = &sd_set;
params.config = config;
- params.add_image_flags = add_flags;
+ params.add_flags = add_flags;
params.progress_func = progress_func;
params.extra_arg = extra_arg;
config->_prefix_num_tchars = tstrlen(fs_source_path);
if (wim_target_path[0] == T('\0'))
- add_flags |= WIMLIB_ADD_IMAGE_FLAG_ROOT;
+ add_flags |= WIMLIB_ADD_FLAG_ROOT;
ret = (*capture_tree)(&branch, fs_source_path, ¶ms);
if (ret) {
ERROR("Failed to build dentry tree for \"%"TS"\"",
inode_table_prepare_inode_list(&inode_table, &imd->inode_list);
ret = 0;
rollback_sd = false;
- if (add_flags & WIMLIB_ADD_IMAGE_FLAG_RPFIX)
+ if (add_flags & WIMLIB_ADD_FLAG_RPFIX)
wim->hdr.flags |= WIM_HDR_FLAG_RP_FIX;
goto out_destroy_sd_set;
out_ntfs_umount:
#ifdef __WIN32__
/* Check for flags not supported on Windows */
- if (add_flags & WIMLIB_ADD_IMAGE_FLAG_NTFS) {
+ if (add_flags & WIMLIB_ADD_FLAG_NTFS) {
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;
}
- if (add_flags & WIMLIB_ADD_IMAGE_FLAG_UNIX_DATA) {
+ if (add_flags & WIMLIB_ADD_FLAG_UNIX_DATA) {
ERROR("Capturing UNIX-specific data is not supported on Windows");
return WIMLIB_ERR_INVALID_PARAM;
}
- if (add_flags & WIMLIB_ADD_IMAGE_FLAG_DEREFERENCE) {
+ if (add_flags & WIMLIB_ADD_FLAG_DEREFERENCE) {
ERROR("Dereferencing symbolic links is not supported on Windows");
return WIMLIB_ERR_INVALID_PARAM;
}
#endif
/* VERBOSE implies EXCLUDE_VERBOSE */
- if (add_flags & WIMLIB_ADD_IMAGE_FLAG_VERBOSE)
- add_flags |= WIMLIB_ADD_IMAGE_FLAG_EXCLUDE_VERBOSE;
+ if (add_flags & WIMLIB_ADD_FLAG_VERBOSE)
+ add_flags |= WIMLIB_ADD_FLAG_EXCLUDE_VERBOSE;
/* Check for contradictory reparse point fixup flags */
- if ((add_flags & (WIMLIB_ADD_IMAGE_FLAG_RPFIX |
- WIMLIB_ADD_IMAGE_FLAG_NORPFIX)) ==
- (WIMLIB_ADD_IMAGE_FLAG_RPFIX |
- WIMLIB_ADD_IMAGE_FLAG_NORPFIX))
+ if ((add_flags & (WIMLIB_ADD_FLAG_RPFIX |
+ WIMLIB_ADD_FLAG_NORPFIX)) ==
+ (WIMLIB_ADD_FLAG_RPFIX |
+ WIMLIB_ADD_FLAG_NORPFIX))
{
ERROR("Cannot specify RPFIX and NORPFIX flags "
"at the same time!");
}
/* Set default behavior on reparse point fixups if requested */
- if ((add_flags & (WIMLIB_ADD_IMAGE_FLAG_RPFIX |
- WIMLIB_ADD_IMAGE_FLAG_NORPFIX)) == 0)
+ if ((add_flags & (WIMLIB_ADD_FLAG_RPFIX |
+ WIMLIB_ADD_FLAG_NORPFIX)) == 0)
{
/* Do reparse-point fixups by default if we are capturing an
* entire image and either the header flag is set from previous
* images, or if this is the first image being added. */
if (is_entire_image &&
((hdr->flags & WIM_HDR_FLAG_RP_FIX) || hdr->image_count == 1))
- add_flags |= WIMLIB_ADD_IMAGE_FLAG_RPFIX;
+ add_flags |= WIMLIB_ADD_FLAG_RPFIX;
}
if (!is_entire_image) {
- if (add_flags & WIMLIB_ADD_IMAGE_FLAG_NTFS) {
+ if (add_flags & WIMLIB_ADD_FLAG_NTFS) {
ERROR("Cannot add directly from a NTFS volume "
"when not capturing a full image!");
return WIMLIB_ERR_INVALID_PARAM;
}
- if (add_flags & WIMLIB_ADD_IMAGE_FLAG_RPFIX) {
+ if (add_flags & WIMLIB_ADD_FLAG_RPFIX) {
ERROR("Cannot do reparse point fixups when "
"not capturing a full image!");
return WIMLIB_ERR_INVALID_PARAM;
}
}
+ /* We may have modified the add flags. */
cmd->add.add_flags = add_flags;
return 0;
}
* wimlib_add_image(). This can be done with a ::WIMStruct gotten from
* wimlib_open_wim() or from wimlib_create_new_wim(). wimlib_add_image() can
* also capture a WIM image directly from a NTFS volume if you provide the
- * ::WIMLIB_ADD_IMAGE_FLAG_NTFS flag, provided that wimlib was not compiled with
+ * ::WIMLIB_ADD_FLAG_NTFS flag, provided that wimlib was not compiled with
* the <code>--without-ntfs-3g</code> flag.
*
* To extract an image from a WIM file, call wimlib_extract_image(). You may
/** A directory or file is being scanned. @a info will point to
* ::wimlib_progress_info.scan, and its @a cur_path member will be
- * valid. This message is only sent if ::WIMLIB_ADD_IMAGE_FLAG_VERBOSE
+ * valid. This message is only sent if ::WIMLIB_ADD_FLAG_VERBOSE
* is passed to wimlib_add_image(). */
WIMLIB_PROGRESS_MSG_SCAN_DENTRY,
/*****************************
- * WIMLIB_ADD_IMAGE_FLAG_* *
+ * WIMLIB_ADD_FLAG_* *
*****************************/
/** Directly capture a NTFS volume rather than a generic directory. This flag
- * cannot be combined with ::WIMLIB_ADD_IMAGE_FLAG_DEREFERENCE or
- * ::WIMLIB_ADD_IMAGE_FLAG_UNIX_DATA. */
-#define WIMLIB_ADD_IMAGE_FLAG_NTFS 0x00000001
+ * cannot be combined with ::WIMLIB_ADD_FLAG_DEREFERENCE or
+ * ::WIMLIB_ADD_FLAG_UNIX_DATA. */
+#define WIMLIB_ADD_FLAG_NTFS 0x00000001
/** Follow symlinks; archive and dump the files they point to. Cannot be used
- * with ::WIMLIB_ADD_IMAGE_FLAG_NTFS. */
-#define WIMLIB_ADD_IMAGE_FLAG_DEREFERENCE 0x00000002
+ * with ::WIMLIB_ADD_FLAG_NTFS. */
+#define WIMLIB_ADD_FLAG_DEREFERENCE 0x00000002
/** Call the progress function with the message
* ::WIMLIB_PROGRESS_MSG_SCAN_DENTRY when each directory or file is starting to
* be scanned. */
-#define WIMLIB_ADD_IMAGE_FLAG_VERBOSE 0x00000004
+#define WIMLIB_ADD_FLAG_VERBOSE 0x00000004
/** Mark the image being added as the bootable image of the WIM. */
-#define WIMLIB_ADD_IMAGE_FLAG_BOOT 0x00000008
+#define WIMLIB_ADD_FLAG_BOOT 0x00000008
/** Store the UNIX owner, group, and mode. This is done by adding a special
* alternate data stream to each regular file, symbolic link, and directory to
* contain this information. Please note that this flag is for convenience
* only; Microsoft's @a imagex.exe will not understand this special information.
- * This flag cannot be combined with ::WIMLIB_ADD_IMAGE_FLAG_NTFS. */
-#define WIMLIB_ADD_IMAGE_FLAG_UNIX_DATA 0x00000010
+ * This flag cannot be combined with ::WIMLIB_ADD_FLAG_NTFS. */
+#define WIMLIB_ADD_FLAG_UNIX_DATA 0x00000010
/** Do not capture security descriptors. Only has an effect in NTFS capture
* mode, or in Win32 native builds. */
-#define WIMLIB_ADD_IMAGE_FLAG_NO_ACLS 0x00000020
+#define WIMLIB_ADD_FLAG_NO_ACLS 0x00000020
/** Fail immediately if the full security descriptor of any file or directory
* cannot be accessed. Only has an effect in Win32 native builds. The default
* behavior without this flag is to first try omitting the SACL from the
* security descriptor, then to try omitting the security descriptor entirely.
* */
-#define WIMLIB_ADD_IMAGE_FLAG_STRICT_ACLS 0x00000040
+#define WIMLIB_ADD_FLAG_STRICT_ACLS 0x00000040
/** Call the progress function with the message
* ::WIMLIB_PROGRESS_MSG_SCAN_DENTRY when a directory or file is excluded from
* capture. This is a subset of the messages provided by
- * ::WIMLIB_ADD_IMAGE_FLAG_VERBOSE. */
-#define WIMLIB_ADD_IMAGE_FLAG_EXCLUDE_VERBOSE 0x00000080
+ * ::WIMLIB_ADD_FLAG_VERBOSE. */
+#define WIMLIB_ADD_FLAG_EXCLUDE_VERBOSE 0x00000080
/** Reparse-point fixups: Modify absolute symbolic links (or junction points,
* in the case of Windows) that point inside the directory being captured to
* the WIM header or if this is the first image being added.
* WIM_HDR_FLAG_RP_FIX is set if the first image in a WIM is captured with
* reparse point fixups enabled and currently cannot be unset. */
-#define WIMLIB_ADD_IMAGE_FLAG_RPFIX 0x00000100
+#define WIMLIB_ADD_FLAG_RPFIX 0x00000100
/** Don't do reparse point fixups. The default behavior is described in the
- * documentation for ::WIMLIB_ADD_IMAGE_FLAG_RPFIX. */
-#define WIMLIB_ADD_IMAGE_FLAG_NORPFIX 0x00000200
+ * documentation for ::WIMLIB_ADD_FLAG_RPFIX. */
+#define WIMLIB_ADD_FLAG_NORPFIX 0x00000200
+
+#define WIMLIB_ADD_IMAGE_FLAG_NTFS WIMLIB_ADD_FLAG_NTFS
+#define WIMLIB_ADD_IMAGE_FLAG_DEREFERENCE WIMLIB_ADD_FLAG_DEREFERENCE
+#define WIMLIB_ADD_IMAGE_FLAG_VERBOSE WIMLIB_ADD_FLAG_VERBOSE
+#define WIMLIB_ADD_IMAGE_FLAG_BOOT WIMLIB_ADD_FLAG_BOOT
+#define WIMLIB_ADD_IMAGE_FLAG_UNIX_DATA WIMLIB_ADD_FLAG_UNIX_DATA
+#define WIMLIB_ADD_IMAGE_FLAG_NO_ACLS WIMLIB_ADD_FLAG_NO_ACLS
+#define WIMLIB_ADD_IMAGE_FLAG_STRICT_ACLS WIMLIB_ADD_FLAG_STRICT_ACLS
+#define WIMLIB_ADD_IMAGE_FLAG_EXCLUDE_VERBOSE WIMLIB_ADD_FLAG_EXCLUDE_VERBOSE
+#define WIMLIB_ADD_IMAGE_FLAG_RPFIX WIMLIB_ADD_FLAG_RPFIX
+#define WIMLIB_ADD_IMAGE_FLAG_NORPFIX WIMLIB_ADD_FLAG_NORPFIX
/** Do not issue an error if the path to delete does not exist. */
#define WIMLIB_DELETE_FLAG_FORCE 0x00000001
/** Read the WIM file sequentially while extracting the image. */
#define WIMLIB_EXTRACT_FLAG_SEQUENTIAL 0x00000010
-/** Extract special UNIX data captured with ::WIMLIB_ADD_IMAGE_FLAG_UNIX_DATA.
+/** Extract special UNIX data captured with ::WIMLIB_ADD_FLAG_UNIX_DATA.
* Cannot be used with ::WIMLIB_EXTRACT_FLAG_NTFS. */
#define WIMLIB_EXTRACT_FLAG_UNIX_DATA 0x00000020
* not have permission to set the desired one. */
#define WIMLIB_EXTRACT_FLAG_STRICT_ACLS 0x00000080
-/* Extract equivalent to ::WIMLIB_ADD_IMAGE_FLAG_RPFIX; force reparse-point
+/* Extract equivalent to ::WIMLIB_ADD_FLAG_RPFIX; force reparse-point
* fixups on, so absolute symbolic links or junction points will be fixed to be
* absolute relative to the actual extraction root. Done by default if
* WIM_HDR_FLAG_RP_FIX is set in the WIM header. This flag may only be
#define WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_WINDOWS 0x00000010
/** Use UNIX file owners, groups, and modes if available in the WIM (see
- * ::WIMLIB_ADD_IMAGE_FLAG_UNIX_DATA). */
+ * ::WIMLIB_ADD_FLAG_UNIX_DATA). */
#define WIMLIB_MOUNT_FLAG_UNIX_DATA 0x00000020
/** Allow other users to see the mounted filesystem. (this passes the @c
*
* See the manual page for the @b wimlib-imagex program for more information
* about the "normal" capture mode versus the NTFS capture mode (entered by
- * providing the flag ::WIMLIB_ADD_IMAGE_FLAG_NTFS).
+ * providing the flag ::WIMLIB_ADD_FLAG_NTFS).
*
* Note that @b no changes are committed to the underlying WIM file (if
* any) until wimlib_write() or wimlib_overwrite() is called.
* Capture configuration that specifies files, directories, or path globs
* to exclude from being captured. If @c NULL, a dummy configuration where
* no paths are treated specially is used.
- * @param add_image_flags
- * Bitwise OR of flags prefixed with WIMLIB_ADD_IMAGE_FLAG.
+ * @param add_flags
+ * Bitwise OR of flags prefixed with WIMLIB_ADD_FLAG.
* @param progress_func
* If non-NULL, a function that will be called periodically with the
* progress of the current operation.
* @retval ::WIMLIB_ERR_NOMEM
* Failed to allocate needed memory.
* @retval ::WIMLIB_ERR_NOTDIR
- * @a source is not a directory (only if ::WIMLIB_ADD_IMAGE_FLAG_NTFS was
- * not specified in @a add_image_flags).
+ * @a source is not a directory (only if ::WIMLIB_ADD_FLAG_NTFS was
+ * not specified in @a add_flags).
* @retval ::WIMLIB_ERR_NTFS_3G
* An error was returned from a libntfs-3g function when the NTFS volume
* was being opened, scanned, or closed (only if
- * ::WIMLIB_ADD_IMAGE_FLAG_NTFS was specified in @a add_image_flags).
+ * ::WIMLIB_ADD_FLAG_NTFS was specified in @a add_flags).
* @retval ::WIMLIB_ERR_OPEN
* Failed to open a file or directory in the directory tree rooted at @a
- * source (only if ::WIMLIB_ADD_IMAGE_FLAG_NTFS was not specified in @a
- * add_image_flags).
+ * source (only if ::WIMLIB_ADD_FLAG_NTFS was not specified in @a
+ * add_flags).
* @retval ::WIMLIB_ERR_READ
* Failed to read a file in the directory tree rooted at @a source (only if
- * ::WIMLIB_ADD_IMAGE_FLAG_NTFS was not specified in @a add_image_flags).
+ * ::WIMLIB_ADD_FLAG_NTFS was not specified in @a add_flags).
* @retval ::WIMLIB_ERR_SPECIAL_FILE
* The directory tree rooted at @a source contains a special file that is
* not a directory, regular file, or symbolic link. This currently can
- * only be returned if ::WIMLIB_ADD_IMAGE_FLAG_NTFS was not specified in @a
- * add_image_flags, but it may be returned for unsupported NTFS files in
+ * only be returned if ::WIMLIB_ADD_FLAG_NTFS was not specified in @a
+ * add_flags, but it may be returned for unsupported NTFS files in
* the future.
* @retval ::WIMLIB_ERR_STAT
* Failed obtain the metadata for a file or directory in the directory tree
- * rooted at @a source (only if ::WIMLIB_ADD_IMAGE_FLAG_NTFS was not
- * specified in @a add_image_flags).
+ * rooted at @a source (only if ::WIMLIB_ADD_FLAG_NTFS was not
+ * specified in @a add_flags).
* @retval ::WIMLIB_ERR_SPLIT_UNSUPPORTED
* @a wim is part of a split WIM. Adding an image to a split WIM is
* unsupported.
* @retval ::WIMLIB_ERR_UNSUPPORTED
- * ::WIMLIB_ADD_IMAGE_FLAG_NTFS was specified in @a add_image_flags, but
+ * ::WIMLIB_ADD_FLAG_NTFS was specified in @a add_flags, but
* wimlib was configured with the @c --without-ntfs-3g flag.
*/
extern int
const wimlib_tchar *source,
const wimlib_tchar *name,
const struct wimlib_capture_config *config,
- int add_image_flags,
+ int add_flags,
wimlib_progress_func_t progress_func);
/** This function is equivalent to wimlib_add_image() except it allows for
* when trying to overlay a non-directory on a directory or when otherwise
* trying to overlay multiple conflicting files to the same location in the WIM
* image. It will also return ::WIMLIB_ERR_INVALID_PARAM if
- * ::WIMLIB_ADD_IMAGE_FLAG_NTFS was specified in @a add_image_flags but there
+ * ::WIMLIB_ADD_FLAG_NTFS was specified in @a add_flags but there
* was not exactly one capture source with the target being the root directory.
* (In this respect, there is no advantage to using
* wimlib_add_image_multisource() instead of wimlib_add_image() when requesting
size_t num_sources,
const wimlib_tchar *name,
const struct wimlib_capture_config *config,
- int add_image_flags,
+ int add_flags,
wimlib_progress_func_t progress_func);
/**
#define WIM_HDR_FLAG_WRITE_IN_PROGRESS 0x00000040
/* Reparse point fixup flag. See docs for --rpfix and --norpfix in imagex, or
- * WIMLIB_ADD_IMAGE_FLAG_{RPFIX,NORPFIX} in wimlib.h. Note that
+ * WIMLIB_ADD_FLAG_{RPFIX,NORPFIX} in wimlib.h. Note that
* WIM_HDR_FLAG_RP_FIX is a header flag and just sets the default behavior for
* the WIM; it can still be overridder on a per-image basis. But there is no
* flag to set the default behavior for a specific image. */
* files should be excluded from capture or not. */
const struct wimlib_capture_config *config;
- /* Flags that affect the capture operation (WIMLIB_ADD_IMAGE_FLAG_*) */
- int add_image_flags;
+ /* Flags that affect the capture operation (WIMLIB_ADD_FLAG_*) */
+ int add_flags;
/* If non-NULL, the user-supplied progress function. */
wimlib_progress_func_t progress_func;
#define WIMLIB_WRITE_MASK_PUBLIC 0x1fffffff
/* We are capturing a tree to be placed in the root of the WIM image */
-#define WIMLIB_ADD_IMAGE_FLAG_ROOT 0x80000000
+#define WIMLIB_ADD_FLAG_ROOT 0x80000000
extern int
begin_write(WIMStruct *w, const tchar *path, int write_flags);
struct sd_set *sd_set,
const wchar_t *path,
struct win32_capture_state *state,
- int add_image_flags)
+ int add_flags)
{
SECURITY_INFORMATION requestedInformation;
DWORD lenNeeded = 0;
}
}
- if (add_image_flags & WIMLIB_ADD_IMAGE_FLAG_STRICT_ACLS)
+ if (add_flags & WIMLIB_ADD_FLAG_STRICT_ACLS)
goto fail;
switch (err) {
* fixup where we change it to be absolute relative to the root of the directory
* tree being captured.
*
- * Note that this is only executed when WIMLIB_ADD_IMAGE_FLAG_RPFIX has been
+ * Note that this is only executed when WIMLIB_ADD_FLAG_RPFIX has been
* set.
*
* @capture_root_ino and @capture_root_dev indicate the inode number and device
rpbuflen = bytesReturned;
reparse_tag = le32_to_cpu(*(u32*)rpbuf);
- if (params->add_image_flags & WIMLIB_ADD_IMAGE_FLAG_RPFIX &&
+ if (params->add_flags & WIMLIB_ADD_FLAG_RPFIX &&
(reparse_tag == WIM_IO_REPARSE_TAG_SYMLINK ||
reparse_tag == WIM_IO_REPARSE_TAG_MOUNT_POINT))
{
u16 not_rpfixed;
if (exclude_path(path, path_num_chars, params->config, true)) {
- if (params->add_image_flags & WIMLIB_ADD_IMAGE_FLAG_ROOT) {
+ if (params->add_flags & WIMLIB_ADD_FLAG_ROOT) {
ERROR("Cannot exclude the root directory from capture");
ret = WIMLIB_ERR_INVALID_CAPTURE_CONFIG;
goto out;
}
- 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;
goto out;
}
- 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;
inode->i_last_access_time = FILETIME_to_u64(&file_info.ftLastAccessTime);
inode->i_resolved = 1;
- params->add_image_flags &= ~WIMLIB_ADD_IMAGE_FLAG_ROOT;
+ params->add_flags &= ~WIMLIB_ADD_FLAG_ROOT;
- if (!(params->add_image_flags & WIMLIB_ADD_IMAGE_FLAG_NO_ACLS)
+ if (!(params->add_flags & WIMLIB_ADD_FLAG_NO_ACLS)
&& (vol_flags & FILE_PERSISTENT_ACLS))
{
ret = win32_get_security_descriptor(root, params->sd_set,
path, state,
- params->add_image_flags);
+ params->add_flags);
if (ret)
goto out_close_handle;
}
static void
win32_do_capture_warnings(const struct win32_capture_state *state,
- int add_image_flags)
+ int add_flags)
{
if (state->num_get_sacl_priv_notheld == 0 &&
state->num_get_sd_access_denied == 0)
" desired metadata has been captured exactly. However, if you\n"
" do not care about capturing security descriptors correctly, then\n"
" nothing more needs to be done%ls\n",
- (add_image_flags & WIMLIB_ADD_IMAGE_FLAG_NO_ACLS) ? L"." :
+ (add_flags & WIMLIB_ADD_FLAG_NO_ACLS) ? L"." :
L", although you might consider\n"
" passing the --no-acls flag to `wimlib-imagex capture' or\n"
" `wimlib-imagex append' to explicitly capture no security\n"
&state, vol_flags);
FREE(path);
if (ret == 0)
- win32_do_capture_warnings(&state, params->add_image_flags);
+ win32_do_capture_warnings(&state, params->add_flags);
return ret;
}
continue;
/* Skip special UNIX data entries (see documentation for
- * WIMLIB_ADD_IMAGE_FLAG_UNIX_DATA) */
+ * WIMLIB_ADD_FLAG_UNIX_DATA) */
if (ads_entry->stream_name_nbytes == WIMLIB_UNIX_DATA_TAG_UTF16LE_NBYTES
&& !memcmp(ads_entry->stream_name,
WIMLIB_UNIX_DATA_TAG_UTF16LE,