return 0;
}
-#define MAX_OPEN_ATTRS 1024
-
struct ntfs_3g_apply_ctx {
/* Extract flags, the pointer to the WIMStruct, etc. */
struct apply_ctx common;
/* Pointer to the open NTFS volume */
ntfs_volume *vol;
- ntfs_attr *open_attrs[MAX_OPEN_ATTRS];
+ ntfs_attr *open_attrs[MAX_OPEN_STREAMS];
unsigned num_open_attrs;
- ntfs_inode *open_inodes[MAX_OPEN_ATTRS];
+ ntfs_inode *open_inodes[MAX_OPEN_STREAMS];
unsigned num_open_inodes;
struct reparse_buffer_disk rpbuf;
u64 offset;
unsigned num_reparse_inodes;
- ntfs_inode *ntfs_reparse_inodes[MAX_OPEN_ATTRS];
- struct wim_inode *wim_reparse_inodes[MAX_OPEN_ATTRS];
+ ntfs_inode *ntfs_reparse_inodes[MAX_OPEN_STREAMS];
+ struct wim_inode *wim_reparse_inodes[MAX_OPEN_STREAMS];
};
static size_t
ERROR_WITH_ERRNO("Failed to set security descriptor "
"on \"%s\" in NTFS volume",
dentry_full_path(one_dentry));
- fprintf(stderr, "The security descriptor is: ");
- print_byte_field(desc, desc_size, stderr);
- fprintf(stderr, "\n");
+ fprintf(wimlib_error_file,
+ "The security descriptor is: ");
+ print_byte_field(desc, desc_size, wimlib_error_file);
+ fprintf(wimlib_error_file, "\n");
}
return ret;
}
/* Create additional links if present. */
next = inode->i_extraction_aliases.next;
- ret = 0;
do {
dentry = list_entry(next, struct wim_dentry,
d_extraction_alias_node);
return WIMLIB_ERR_NTFS_3G;
}
+ /* This should be ensured by extract_stream_list() */
+ wimlib_assert(ctx->num_open_attrs < MAX_OPEN_STREAMS);
+
attr = ntfs_attr_open(ni, AT_DATA, stream_name, stream_name_nchars);
if (!attr) {
ERROR_WITH_ERRNO("Failed to open data stream of \"%s\"",
}
static int
-ntfs_3g_begin_extract_stream(struct wim_lookup_table_entry *stream,
- u32 flags, void *_ctx)
+ntfs_3g_begin_extract_stream(struct wim_lookup_table_entry *stream, void *_ctx)
{
struct ntfs_3g_apply_ctx *ctx = _ctx;
const struct stream_owner *owners = stream_owners(stream);