static int wimfs_readlink(const char *path, char *buf, size_t buf_len)
{
- struct dentry *dentry = get_dentry(w, path);
+ struct inode *inode = wim_pathname_to_inode(w, path);
int ret;
- if (!dentry)
+ if (!inode)
return -ENOENT;
- if (!dentry_is_symlink(dentry))
+ if (!inode_is_symlink(inode))
return -EINVAL;
- ret = inode_readlink(dentry->d_inode, buf, buf_len, w);
+ ret = inode_readlink(inode, buf, buf_len, w);
if (ret > 0)
ret = 0;
return ret;
wim->lookup_table = joined_tab;
}
- ret = wimlib_select_image(wim, image);
+ ret = select_wim_image(wim, image);
if (ret != 0)
goto out;
DEBUG("Selected image %d", image);
+ if (imd->root_dentry->refcnt != 1) {
+ ERROR("Cannot mount image that was just exported with "
+ "wimlib_export()");
+ return WIMLIB_ERR_INVALID_PARAM;
+ }
+
next_ino = assign_inode_numbers(&imd->inode_list);
DEBUG("(next_ino = %"PRIu64")", next_ino);