Lines Matching +full:imp +full:- +full:res +full:- +full:offset +full:- +full:value

1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
62 return (cd9660_vget_internal(mp, dd_arg->i_ino, lkflags, vpp,
63 dd_arg->i_ino != dd_arg->ino, dd_arg->ep));
103 struct iso_mnt *imp; /* filesystem that directory is in */
107 int entryoffsetinblock; /* offset of ep in bp's buffer */
108 int saveoffset = 0; /* offset of last directory entry in dir */
109 doff_t i_diroff; /* cached i_diroff value. */
110 doff_t i_offset; /* cached i_offset value. */
112 doff_t endsearch; /* offset to end directory search */
116 u_long bmask; /* block offset mask */
123 int res;
126 struct vnode **vpp = ap->a_vpp;
127 struct componentname *cnp = ap->a_cnp;
128 int flags = cnp->cn_flags;
129 int nameiop = cnp->cn_nameiop;
134 vdp = ap->a_dvp;
136 imp = dp->i_mnt;
142 i_diroff = dp->i_diroff;
143 len = cnp->cn_namelen;
144 name = cnp->cn_nameptr;
149 if ((assoc = (imp->iso_ftype != ISO_FTYPE_RRIP && *name == ASSOCCHAR)))
151 len--;
166 bmask = imp->im_bmask;
167 if (nameiop != LOOKUP || i_diroff == 0 || i_diroff > dp->i_size) {
179 endsearch = dp->i_size;
184 * If offset is on a block boundary,
200 ((char *)bp->b_data + entryoffsetinblock);
202 reclen = isonum_711(ep->length);
206 (i_offset & ~bmask) + imp->logical_block_size;
214 if (entryoffsetinblock + reclen > imp->logical_block_size)
218 namelen = isonum_711(ep->name_len);
219 isoflags = isonum_711(imp->iso_ftype == ISO_FTYPE_HIGH_SIERRA?
220 &ep->date[6]: ep->flags);
229 switch (imp->iso_ftype) {
236 && ep->name[0] == ((flags & ISDOTDOT) ? 1 : 0)) {
241 i_ino = isodirino(ep, imp);
245 || ep->name[0] != 0)
247 } else if (!(res = isofncmp(name, len,
248 ep->name, namelen,
249 imp->joliet_level,
250 imp->im_flags,
251 imp->im_d2l,
252 imp->im_l2d))) {
254 ino = isodirino(ep, imp);
256 ino = dbtob(bp->b_blkno)
262 else if (res < 0)
264 else if (res > 0 && numdirpasses == 2)
270 if (isonum_711(ep->flags)&2)
271 ino = isodirino(ep, imp);
273 ino = dbtob(bp->b_blkno) + entryoffsetinblock;
275 cd9660_rrip_getname(ep, altname, &namelen, &i_ino, imp);
276 if (namelen == cnp->cn_namelen
289 if (lblkno(imp, i_offset) !=
290 lblkno(imp, saveoffset)) {
299 ((char *)bp->b_data + entryoffsetinblock);
300 reclen = isonum_711(ep->length);
311 numdirpasses--;
320 * Insert name into cache (as non-existent) if appropriate.
322 if (cnp->cn_flags & MAKEENTRY)
338 dp->i_diroff = i_offset;
367 if (dp->i_number != i_ino) {
383 cnp->cn_lkflags, &tdp);
388 } else if (dp->i_number == i_ino) {
394 ltype = cnp->cn_lkflags & LK_TYPE_MASK;
403 error = cd9660_vget_internal(vdp->v_mount, i_ino,
404 cnp->cn_lkflags, &tdp,
415 if (cnp->cn_flags & MAKEENTRY)
421 * Return buffer with the contents of block "offset" from the beginning of
422 * directory "ip". If "res" is non-zero, fill it in with a pointer to the
426 cd9660_blkatoff(struct vnode *vp, off_t offset, char **res, struct buf **bpp)
429 struct iso_mnt *imp;
435 imp = ip->i_mnt;
436 lbn = lblkno(imp, offset);
437 bsize = blksize(imp, ip, lbn);
438 bshift = imp->im_bshift;
449 * We could get away with not doing it before we VMIO-backed the
451 * the invalidation of their data. But with VMIO-backed buffers
452 * the buffers may be freed and then later reconstituted - and the
455 if (bp->b_blkno == bp->b_lblkno) {
456 bp->b_blkno = (ip->iso_start + bp->b_lblkno) << (bshift - DEV_BSHIFT);
459 if (res)
460 *res = (char *)bp->b_data + blkoff(imp, offset);