These aren't used for anything anymore.
* @lte:
* Stream that is about to be read.
*
- * @flags:
- * Bitwise OR of BEGIN_STREAM_FLAG_PARTIAL_RESOURCE and/or
- * BEGIN_STREAM_FLAG_WHOLE_STREAM.
- *
* @ctx:
* User-provided context.
*
* (without calling @consume_chunk or @end_stream).
*/
typedef int (*read_stream_list_begin_stream_t)(struct wim_lookup_table_entry *lte,
- u32 flags,
void *ctx);
-/* Set to true if the stream is just one of several being read from a single
- * pack and therefore would be extra expensive to read independently. */
-#define BEGIN_STREAM_FLAG_PARTIAL_RESOURCE 0x00000001
-
-/* This is purely advisory and indicates that the entire stream data will be
- * provided in one call to consume_chunk(). */
-#define BEGIN_STREAM_FLAG_WHOLE_STREAM 0x00000002
-
#define BEGIN_STREAM_STATUS_SKIP_STREAM -1
/*
lte_unbind_wim_resource_spec(found_lte);
lte_bind_wim_resource_spec(needed_lte, rspec);
- ret = (*cbs->begin_stream)(needed_lte, 0,
+ ret = (*cbs->begin_stream)(needed_lte,
cbs->begin_stream_ctx);
if (ret) {
lte_unbind_wim_resource_spec(needed_lte);
}
static int
-begin_extract_stream_wrapper(struct wim_lookup_table_entry *lte,
- u32 flags, void *_ctx)
+begin_extract_stream_wrapper(struct wim_lookup_table_entry *lte, void *_ctx)
{
struct apply_ctx *ctx = _ctx;
if (unlikely(lte->out_refcnt > MAX_OPEN_STREAMS))
return create_temporary_file(&ctx->tmpfile_fd, &ctx->tmpfile_name);
else
- return (*ctx->saved_cbs->begin_stream)(lte, flags,
- ctx->saved_cbs->begin_stream_ctx);
+ return (*ctx->saved_cbs->begin_stream)(lte, ctx->saved_cbs->begin_stream_ctx);
}
static int
* because it needs the original stream location in order to
* create the external backing reference. */
- ret = (*cbs->begin_stream)(orig_lte, 0,
- cbs->begin_stream_ctx);
+ ret = (*cbs->begin_stream)(orig_lte, cbs->begin_stream_ctx);
if (ret)
return ret;
}
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);
wimlib_assert(size <= ctx->cur_stream->size - ctx->cur_stream_offset);
if (ctx->cur_stream_offset == 0) {
- u32 flags;
/* Starting a new stream. */
DEBUG("Begin new stream (size=%"PRIu64").",
ctx->cur_stream->size);
- flags = BEGIN_STREAM_FLAG_PARTIAL_RESOURCE;
- if (size == ctx->cur_stream->size)
- flags |= BEGIN_STREAM_FLAG_WHOLE_STREAM;
ret = (*ctx->cbs.begin_stream)(ctx->cur_stream,
- flags,
ctx->cbs.begin_stream_ctx);
if (ret)
return ret;
/* Callback for starting to read a stream while calculating its SHA1 message
* digest. */
static int
-hasher_begin_stream(struct wim_lookup_table_entry *lte, u32 flags,
- void *_ctx)
+hasher_begin_stream(struct wim_lookup_table_entry *lte, void *_ctx)
{
struct hasher_context *ctx = _ctx;
if (ctx->cbs.begin_stream == NULL)
return 0;
else
- return (*ctx->cbs.begin_stream)(lte, flags,
- ctx->cbs.begin_stream_ctx);
+ return (*ctx->cbs.begin_stream)(lte, ctx->cbs.begin_stream_ctx);
}
/* A consume_data_callback_t implementation that continues calculating the SHA1
{
int ret;
- ret = (*cbs->begin_stream)(lte, 0, cbs->begin_stream_ctx);
+ ret = (*cbs->begin_stream)(lte, cbs->begin_stream_ctx);
if (ret)
return ret;
/* Called when starting to read a single-instance stream for extraction */
static int
-unix_begin_extract_stream(struct wim_lookup_table_entry *stream,
- u32 flags, void *_ctx)
+unix_begin_extract_stream(struct wim_lookup_table_entry *stream, void *_ctx)
{
struct unix_apply_ctx *ctx = _ctx;
const struct stream_owner *owners = stream_owners(stream);
/* Called when starting to read a stream for extraction on Windows */
static int
-begin_extract_stream(struct wim_lookup_table_entry *stream,
- u32 flags, void *_ctx)
+begin_extract_stream(struct wim_lookup_table_entry *stream, void *_ctx)
{
struct win32_apply_ctx *ctx = _ctx;
const struct stream_owner *owners = stream_owners(stream);
/* Begin processing a stream for writing. */
static int
-write_stream_begin_read(struct wim_lookup_table_entry *lte,
- u32 flags, void *_ctx)
+write_stream_begin_read(struct wim_lookup_table_entry *lte, void *_ctx)
{
struct write_streams_ctx *ctx = _ctx;
int ret;
ctx->stream_was_duplicate = false;
if (ctx->lookup_table != NULL && lte->unhashed && !lte->unique_size) {
- wimlib_assert(!(flags & BEGIN_STREAM_FLAG_PARTIAL_RESOURCE));
-
struct wim_lookup_table_entry *lte_new;
ret = hash_unhashed_stream(lte, ctx->lookup_table, <e_new);