}
extern int
-start_file_structure_phase(struct apply_ctx *ctx, uint64_t end_file_count);
+start_file_structure_phase(struct apply_ctx *ctx, u64 end_file_count);
extern int
-start_file_metadata_phase(struct apply_ctx *ctx, uint64_t end_file_count);
+start_file_metadata_phase(struct apply_ctx *ctx, u64 end_file_count);
/* Report that a file was created, prior to blob extraction. */
static inline int
* wimlib sets out-of-bounds indices and values less than -1 in this
* field to -1. So the extraction code need not do an upper bound check
* after checking for -1 (or equivalently < 0). */
- int32_t i_security_id;
+ s32 i_security_id;
/* Identity of a reparse point. See
* http://msdn.microsoft.com/en-us/library/windows/desktop/aa365503(v=vs.85).aspx
struct wim_sd_set {
struct wim_security_data *sd;
struct avl_tree_node *root;
- int32_t orig_num_entries;
+ s32 orig_num_entries;
};
/* Table of security descriptors for a WIM image. */
extern void
destroy_sd_set(struct wim_sd_set *sd_set);
-extern int32_t
+extern s32
sd_set_add_sd(struct wim_sd_set *sd_set, const char descriptor[],
size_t size);
struct wim_provider_overlay_entry {
/* Byte offset of the next entry from the beginning of this structure,
* or 0 if there are no more entries. */
- uint32_t next_entry_offset;
+ u32 next_entry_offset;
- uint32_t padding;
+ u32 padding;
/* Identifier for the WIM file. */
- uint64_t data_source_id;
+ u64 data_source_id;
/* GUID of the WIM file. */
- uint8_t guid[16];
+ u8 guid[16];
/* Byte offset of the WIM's file name from the beginning of this
* structure. */
- uint32_t wim_file_name_offset;
+ u32 wim_file_name_offset;
/* Type of WIM file: WIM_BOOT_OS_WIM or WIM_BOOT_NOT_OS_WIM. */
- uint32_t wim_type;
+ u32 wim_type;
/* Index of the image in the WIM to use??? (This doesn't really make
* sense, since WIM files combine file data "blobs" for all images into
* a single table. Set to 1 if unsure...) */
- uint32_t wim_index;
+ u32 wim_index;
/* 0 when WIM provider active, otherwise
* WIM_PROVIDER_EXTERNAL_FLAG_NOT_ACTIVE or
* WIM_PROVIDER_EXTERNAL_FLAG_SUSPENDED. */
- uint32_t flags;
+ u32 flags;
/* Full path to the WIM in the NT device namespace, e.g.
* "\Device\HardDiskVolume2\test.wim". Seems to be null-terminated,
}
static int
-start_file_phase(struct apply_ctx *ctx, uint64_t end_file_count, enum wimlib_progress_msg msg)
+start_file_phase(struct apply_ctx *ctx, u64 end_file_count, enum wimlib_progress_msg msg)
{
ctx->progress.extract.current_file_count = 0;
ctx->progress.extract.end_file_count = end_file_count;
}
int
-start_file_structure_phase(struct apply_ctx *ctx, uint64_t end_file_count)
+start_file_structure_phase(struct apply_ctx *ctx, u64 end_file_count)
{
return start_file_phase(ctx, end_file_count, WIMLIB_PROGRESS_MSG_EXTRACT_FILE_STRUCTURE);
}
int
-start_file_metadata_phase(struct apply_ctx *ctx, uint64_t end_file_count)
+start_file_metadata_phase(struct apply_ctx *ctx, u64 end_file_count)
{
return start_file_phase(ctx, end_file_count, WIMLIB_PROGRESS_MSG_EXTRACT_METADATA);
}
return ret;
}
-static uint64_t
+static u64
ntfs_3g_count_dentries(const struct list_head *dentry_list)
{
const struct wim_dentry *dentry;
- uint64_t count = 0;
+ u64 count = 0;
list_for_each_entry(dentry, dentry_list, d_extraction_list_node) {
count++;
}
struct sd_node {
- int32_t security_id;
+ s32 security_id;
u8 hash[SHA1_HASH_SIZE];
struct avl_tree_node index_node;
};
/* Returns the index of the security descriptor having a SHA1 message digest of
* @hash. If not found, return -1. */
-static int32_t
+static s32
lookup_sd(struct wim_sd_set *set, const u8 hash[SHA1_HASH_SIZE])
{
struct avl_tree_node *res;
* the security ID for it. If a new security descriptor cannot be allocated,
* return -1.
*/
-int32_t
+s32
sd_set_add_sd(struct wim_sd_set *sd_set, const char *descriptor, size_t size)
{
u8 hash[SHA1_HASH_SIZE];
- int32_t security_id;
+ s32 security_id;
struct sd_node *new;
u8 **descriptors;
u64 *sizes;
static void
unix_count_dentries(const struct list_head *dentry_list,
- uint64_t *dir_count_ret, uint64_t *empty_file_count_ret)
+ u64 *dir_count_ret, u64 *empty_file_count_ret)
{
const struct wim_dentry *dentry;
- uint64_t dir_count = 0;
- uint64_t empty_file_count = 0;
+ u64 dir_count = 0;
+ u64 empty_file_count = 0;
list_for_each_entry(dentry, dentry_list, d_extraction_list_node) {
int ret;
struct unix_apply_ctx *ctx = (struct unix_apply_ctx *)_ctx;
size_t path_max;
- uint64_t dir_count;
- uint64_t empty_file_count;
+ u64 dir_count;
+ u64 empty_file_count;
/* Compute the maximum path length that will be needed, then allocate
* some path buffers. */
return status;
if (ctx->next_progress == progress->verify_streams.total_bytes) {
- ctx->next_progress = ~(uint64_t)0;
+ ctx->next_progress = ~(u64)0;
return 0;
}
}
}
-static uint64_t
+static u64
count_dentries(const struct list_head *dentry_list)
{
const struct list_head *cur;
- uint64_t count = 0;
+ u64 count = 0;
list_for_each(cur, dentry_list)
count++;
{
int ret;
struct win32_apply_ctx *ctx = (struct win32_apply_ctx *)_ctx;
- uint64_t dentry_count;
+ u64 dentry_count;
ret = prepare_target(dentry_list, ctx);
if (ret)
wimlib_progress_func_t progfunc;
void *progctx;
union wimlib_progress_info progress;
- uint64_t next_progress;
+ u64 next_progress;
};
static int
if (discarded) {
progress->write_streams.total_bytes -= complete_size;
progress->write_streams.total_streams -= complete_count;
- if (progress_data->next_progress != ~(uint64_t)0 &&
+ if (progress_data->next_progress != ~(u64)0 &&
progress_data->next_progress > progress->write_streams.total_bytes)
{
progress_data->next_progress = progress->write_streams.total_bytes;
return ret;
if (progress_data->next_progress == progress->write_streams.total_bytes) {
- progress_data->next_progress = ~(uint64_t)0;
+ progress_data->next_progress = ~(u64)0;
} else {
/* Handle rate-limiting of messages */