Changeset View
Changeset View
Standalone View
Standalone View
sys/ufs/ffs/ffs_vnops.c
| Show First 20 Lines • Show All 560 Lines • ▼ Show 20 Lines | |||||
| #ifdef INVARIANTS | #ifdef INVARIANTS | ||||
| if (uio->uio_rw != UIO_READ) | if (uio->uio_rw != UIO_READ) | ||||
| panic("ffs_read: mode"); | panic("ffs_read: mode"); | ||||
| if (vp->v_type == VLNK) { | if (vp->v_type == VLNK) { | ||||
| if ((int)ip->i_size < vp->v_mount->mnt_maxsymlinklen) | if ((int)ip->i_size < vp->v_mount->mnt_maxsymlinklen) | ||||
| panic("ffs_read: short symlink"); | panic("ffs_read: short symlink"); | ||||
| } else if (vp->v_type != VREG && vp->v_type != VDIR) | } else if (vp->v_type != VREG) | ||||
| panic("ffs_read: type %d", vp->v_type); | panic("ffs_read: type %d", vp->v_type); | ||||
| #endif | #endif | ||||
| orig_resid = uio->uio_resid; | orig_resid = uio->uio_resid; | ||||
| KASSERT(orig_resid >= 0, ("ffs_read: uio->uio_resid < 0")); | KASSERT(orig_resid >= 0, ("ffs_read: uio->uio_resid < 0")); | ||||
| if (orig_resid == 0) | if (orig_resid == 0) | ||||
| return (0); | return (0); | ||||
| KASSERT(uio->uio_offset >= 0, ("ffs_read: uio->uio_offset < 0")); | KASSERT(uio->uio_offset >= 0, ("ffs_read: uio->uio_offset < 0")); | ||||
| fs = ITOFS(ip); | fs = ITOFS(ip); | ||||
| ▲ Show 20 Lines • Show All 1,228 Lines • Show Last 20 Lines | |||||