wimlib_assert(dentry->resolved);
- lte = lte_decrement_refcnt(lte, lookup_table);
+ lte = lte_decrement_refcnt(ads_entry->lte, lookup_table);
if (lte)
list_del(&ads_entry->lte_group_list.list);
dentry_remove_ads(dentry, ads_entry);
lte = dentry_unnamed_lte_resolved(dentry);
if (lte) {
if (lte->resource_location == RESOURCE_IN_STAGING_FILE) {
+ wimlib_assert(mount_flags & WIMLIB_MOUNT_FLAG_READWRITE);
wimlib_assert(lte->staging_file_name);
struct stat native_stat;
if (stat(lte->staging_file_name, &native_stat) != 0) {
static struct lookup_table_entry *
lte_extract_fds(struct lookup_table_entry *old_lte, u64 link_group)
{
- int ret;
u16 num_transferred_fds;
struct lookup_table_entry *new_lte;
new_lte = old_lte;
} else {
DEBUG("Splitting lookup table entry "
- "(link_group_size = %u, lte refcnt = %u)",
+ "(link_group_size = %zu, lte refcnt = %u)",
link_group_size, old_lte->refcnt);
/* Split a hard link group away from the "lookup table
* entry" hard link group (i.e. we had two hard link
if (ret != 0)
return ret;
}
- if (ret != 0)
- return ret;
xml_update_image_info(w, w->current_image);
*/
static int wimfs_getattr(const char *path, struct stat *stbuf)
{
- const char *stream_name;
- char *p = NULL;
struct dentry *dentry;
int ret;
return res_size;
if (res_size > size)
return -ERANGE;
- ret = read_full_wim_resource(lte, value);
+ ret = read_full_wim_resource(lte, (u8*)value);
if (ret != 0)
return -EIO;
return res_size;
static int wimfs_mknod(const char *path, mode_t mode, dev_t rdev)
{
const char *stream_name;
- const char *file_name;
if ((mount_flags & WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_WINDOWS)
&& (stream_name = path_stream_name(path))) {
/* Make an alternate data stream */
{
struct dentry *dentry;
struct lookup_table_entry *lte;
- u8 *dentry_hash;
int ret;
struct wimlib_fd *fd;
unsigned stream_idx;
size = min(size, res_entry->original_size - offset);
- if (read_wim_resource(fd->lte, buf, size, offset, false) != 0)
+ if (read_wim_resource(fd->lte, (u8*)buf,
+ size, offset, false) != 0)
return -EIO;
return size;
}
/* Close a file. */
static int wimfs_release(const char *path, struct fuse_file_info *fi)
{
- int ret;
struct wimlib_fd *fd = (struct wimlib_fd*)fi->fh;
if (!fd) {
{
struct dentry *dentry;
struct ads_entry *ads_entry;
- int ret;
if (!(mount_flags & WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_XATTR))
return -ENOTSUP;
struct lookup_table_entry *existing_lte;
struct lookup_table_entry *lte;
u8 value_hash[SHA1_HASH_SIZE];
- int ret;
- int fd;
if (!(mount_flags & WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_XATTR))
return -ENOTSUP;
if (!new_ads_entry)
return -ENOMEM;
- sha1_buffer(value, size, value_hash);
+ sha1_buffer((const u8*)value, size, value_hash);
existing_lte = __lookup_resource(w->lookup_table, value_hash);
lte = existing_lte;
lte->refcnt++;
} else {
- char *value_copy;
+ u8 *value_copy;
lte = new_lookup_table_entry();
if (!lte)
return -ENOMEM;
struct dentry *dentry;
struct lookup_table_entry *lte;
int ret;
- u8 *dentry_hash;
unsigned stream_idx;
ret = lookup_resource(w, path, get_lookup_flags(), &dentry,
struct stream_list_head *head;
WARNING("The following lookup table entry has a reference count "
"of %u, but", lte->refcnt);
- WARNING("We found %u references to it", lte_group_size);
+ WARNING("We found %zu references to it", lte_group_size);
next = lte->lte_group_list.next;
head = container_of(next, struct stream_list_head, list);
if (head->type == STREAM_TYPE_NORMAL) {