X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fdentry.c;h=7d108a88e8e93c0e20f01b39b00aa238b104c571;hb=85a067284a7e20133b0dd50b91f0d6bcc32c9a3e;hp=9c32bcb68130bc2459dbc0ad8bbab0d740e80f45;hpb=b7a7e4edd24f1340a8ffe5c760877177ba3bd7d9;p=wimlib diff --git a/src/dentry.c b/src/dentry.c index 9c32bcb6..7d108a88 100644 --- a/src/dentry.c +++ b/src/dentry.c @@ -775,72 +775,6 @@ get_parent_dentry(WIMStruct *wim, const tchar *path, return get_dentry(wim, buf, case_type); } -#ifdef WITH_FUSE -/* Finds the dentry, lookup table entry, and stream index for a WIM file stream, - * given a path name. - * - * Currently, lookups of this type are only needed if FUSE is enabled. */ -int -wim_pathname_to_stream(WIMStruct *wim, - const tchar *path, - int lookup_flags, - struct wim_dentry **dentry_ret, - struct wim_lookup_table_entry **lte_ret, - u16 *stream_idx_ret) -{ - struct wim_dentry *dentry; - struct wim_lookup_table_entry *lte; - u16 stream_idx; - const tchar *stream_name = NULL; - struct wim_inode *inode; - tchar *p = NULL; - - if (lookup_flags & LOOKUP_FLAG_ADS_OK) { - stream_name = path_stream_name(path); - if (stream_name) { - p = (tchar*)stream_name - 1; - *p = T('\0'); - } - } - - dentry = get_dentry(wim, path, WIMLIB_CASE_SENSITIVE); - if (p) - *p = T(':'); - if (!dentry) - return -errno; - - inode = dentry->d_inode; - - if (!inode->i_resolved) - if (inode_resolve_streams(inode, wim->lookup_table, false)) - return -EIO; - - if (!(lookup_flags & LOOKUP_FLAG_DIRECTORY_OK) - && inode_is_directory(inode)) - return -EISDIR; - - if (stream_name) { - struct wim_ads_entry *ads_entry; - - ads_entry = inode_get_ads_entry(inode, stream_name); - if (!ads_entry) - return -errno; - - stream_idx = ads_entry - inode->i_ads_entries + 1; - lte = ads_entry->lte; - } else { - lte = inode_unnamed_stream_resolved(inode, &stream_idx); - } - if (dentry_ret) - *dentry_ret = dentry; - if (lte_ret) - *lte_ret = lte; - if (stream_idx_ret) - *stream_idx_ret = stream_idx; - return 0; -} -#endif /* WITH_FUSE */ - /* Creates an unlinked directory entry. */ int new_dentry(const tchar *name, struct wim_dentry **dentry_ret)