* */
wimlib_assert(old_lte->refcnt > inode->link_count);
DEBUG("Splitting lookup table entry "
- "(inode->link_count = %zu, old_lte->refcnt = %u)",
+ "(inode->link_count = %u, old_lte->refcnt = %u)",
inode->link_count, old_lte->refcnt);
}
j++;
}
}
- DEBUG("%zu fd's were already opened to the file we extracted",
+ DEBUG("%hu fd's were already opened to the file we extracted",
new_lte->num_opened_fds);
if (old_lte) {
old_lte->num_opened_fds -= new_lte->num_opened_fds;
j++;
}
}
-out_free_new_lte:
free_lookup_table_entry(new_lte);
out_delete_staging_file:
unlink(staging_file_name);
status = 0;
if (ctx->mount_flags & WIMLIB_MOUNT_FLAG_READWRITE) {
if (commit) {
- if (chdir(ctx->working_directory)) {
+ ret = chdir(ctx->working_directory);
+ if (ret == 0) {
+ status = rebuild_wim(ctx, (check_integrity != 0));
+ } else {
ERROR_WITH_ERRNO("chdir()");
status = WIMLIB_ERR_NOTDIR;
- goto out;
}
- status = rebuild_wim(ctx, (check_integrity != 0));
}
ret = delete_staging_dir(ctx);
if (ret != 0) {
} else {
DEBUG("Read-only mount");
}
-out:
DEBUG("Sending status %hhd", status);
ret = mq_send(ctx->daemon_to_unmount_mq, &status, 1, 1);
if (ret == -1)
ERROR_WITH_ERRNO("Failed to send status to unmount process");
-out_free_mailbox:
FREE(mailbox);
out_close_message_queues:
close_message_queues(ctx);
#ifdef ENABLE_XATTR
static int wimfs_listxattr(const char *path, char *list, size_t size)
{
- int ret;
size_t needed_size;
- unsigned i;
struct inode *inode;
struct wimfs_context *ctx = wimfs_get_context();
if (size == 0) {
needed_size = 0;
- for (i = 0; i < inode->num_ads; i++)
+ for (u16 i = 0; i < inode->num_ads; i++)
needed_size += inode->ads_entries[i].stream_name_utf8_len + 6;
return needed_size;
} else {
char *p = list;
- for (i = 0; i < inode->num_ads; i++) {
+ for (u16 i = 0; i < inode->num_ads; i++) {
needed_size = inode->ads_entries[i].stream_name_utf8_len + 6;
if (needed_size > size)
return -ERANGE;
{
struct dentry *dentry;
struct lookup_table_entry *lte;
- struct inode *inode;
int ret;
u16 stream_idx;
- unsigned i;
struct wimfs_context *ctx = wimfs_get_context();
ret = lookup_resource(ctx->w, path, get_lookup_flags(ctx),