X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Fapply.h;h=cfddd1ed57ef8b601257de1106a5a09c70a06b50;hp=f77f9e95d3bb6dd174adc7aae4fdfa5f4c5fd2f4;hb=0e639be92660b408a20a1875eb1c1d609692999e;hpb=51829aecdac415b417ab5b8ac897014bb780de10 diff --git a/include/wimlib/apply.h b/include/wimlib/apply.h index f77f9e95..cfddd1ed 100644 --- a/include/wimlib/apply.h +++ b/include/wimlib/apply.h @@ -31,6 +31,7 @@ struct wim_features { unsigned long object_ids; unsigned long timestamps; unsigned long case_sensitive_filenames; + unsigned long linux_xattrs; }; struct blob_descriptor; @@ -72,8 +73,6 @@ struct apply_ctx { unsigned long num_blobs_remaining; struct list_head blob_list; const struct read_blob_callbacks *saved_cbs; - struct blob_descriptor *cur_blob; - u64 cur_blob_offset; struct filedes tmpfile_fd; tchar *tmpfile_name; unsigned int count_until_file_progress; @@ -136,6 +135,21 @@ report_apply_error(struct apply_ctx *ctx, int error_code, const tchar *path) return report_error(ctx->progfunc, ctx->progctx, error_code, path); } +extern bool +detect_sparse_region(const void *data, size_t size, size_t *len_ret); + +static inline bool +maybe_detect_sparse_region(const void *data, size_t size, size_t *len_ret, + bool enabled) +{ + if (!enabled) { + /* Force non-sparse without checking */ + *len_ret = size; + return false; + } + return detect_sparse_region(data, size, len_ret); +} + #define inode_first_extraction_dentry(inode) \ ((inode)->i_first_extraction_alias)