diff options
Diffstat (limited to 'sys/isofs/cd9660')
-rw-r--r-- | sys/isofs/cd9660/cd9660_lookup.c | 12 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_node.c | 6 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vfsops.c | 22 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vnops.c | 17 |
4 files changed, 32 insertions, 25 deletions
diff --git a/sys/isofs/cd9660/cd9660_lookup.c b/sys/isofs/cd9660/cd9660_lookup.c index 2f7baef..3d0ff74 100644 --- a/sys/isofs/cd9660/cd9660_lookup.c +++ b/sys/isofs/cd9660/cd9660_lookup.c @@ -38,7 +38,7 @@ * from: @(#)ufs_lookup.c 7.33 (Berkeley) 5/19/91 * * @(#)cd9660_lookup.c 8.2 (Berkeley) 1/23/94 - * $Id: cd9660_lookup.c,v 1.19 1997/10/16 10:47:33 phk Exp $ + * $Id: cd9660_lookup.c,v 1.20 1997/11/07 08:52:50 phk Exp $ */ #include <sys/param.h> @@ -181,8 +181,8 @@ searchloop: if ((dp->i_offset & bmask) == 0) { if (bp != NULL) brelse(bp); - if (error = - cd9660_blkatoff(vdp, (off_t)dp->i_offset, NULL, &bp)) + if ((error = + cd9660_blkatoff(vdp, (off_t)dp->i_offset, NULL, &bp)) != 0) return (error); entryoffsetinblock = 0; } @@ -279,8 +279,8 @@ foundino: lblkno(imp, saveoffset)) { if (bp != NULL) brelse(bp); - if (error = cd9660_blkatoff(vdp, - (off_t)saveoffset, NULL, &bp)) + if ((error = cd9660_blkatoff(vdp, + (off_t)saveoffset, NULL, &bp)) != 0) return (error); } entryoffsetinblock = saveoffset & bmask; @@ -410,7 +410,7 @@ cd9660_blkatoff(vp, offset, res, bpp) lbn = lblkno(imp, offset); bsize = blksize(imp, ip, lbn); - if (error = bread(vp, lbn, bsize, NOCRED, &bp)) { + if ((error = bread(vp, lbn, bsize, NOCRED, &bp)) != 0) { brelse(bp); *bpp = NULL; return (error); diff --git a/sys/isofs/cd9660/cd9660_node.c b/sys/isofs/cd9660/cd9660_node.c index edfd66c..9640d6e 100644 --- a/sys/isofs/cd9660/cd9660_node.c +++ b/sys/isofs/cd9660/cd9660_node.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_node.c 8.2 (Berkeley) 1/23/94 - * $Id: cd9660_node.c,v 1.25 1998/02/09 06:09:18 eivind Exp $ + * $Id: cd9660_node.c,v 1.26 1999/01/02 11:34:54 bde Exp $ */ #include <sys/param.h> @@ -120,7 +120,7 @@ cd9660_ihashins(ip) simple_lock(&cd9660_ihash_slock); ipp = &isohashtbl[INOHASH(ip->i_dev, ip->i_number)]; - if (iq = *ipp) + if ((iq = *ipp) != NULL) iq->i_prev = &ip->i_next; ip->i_next = iq; ip->i_prev = ipp; @@ -140,7 +140,7 @@ cd9660_ihashrem(ip) register struct iso_node *iq; simple_lock(&cd9660_ihash_slock); - if (iq = ip->i_next) + if ((iq = ip->i_next) != NULL) iq->i_prev = ip->i_prev; *ip->i_prev = iq; #ifdef DIAGNOSTIC diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index 9e661a6..9560c3f 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95 - * $Id: cd9660_vfsops.c,v 1.46 1998/12/06 11:36:24 jkh Exp $ + * $Id: cd9660_vfsops.c,v 1.47 1999/01/17 20:41:02 peter Exp $ */ #include <sys/param.h> @@ -239,7 +239,7 @@ cd9660_mount(mp, path, data, ndp, p) if ((mp->mnt_flag & MNT_RDONLY) == 0) accessmode |= VWRITE; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p); - if (error = VOP_ACCESS(devvp, accessmode, p->p_ucred, p)) { + if ((error = VOP_ACCESS(devvp, accessmode, p->p_ucred, p)) != 0) { vput(devvp); return (error); } @@ -324,8 +324,8 @@ iso_mountfs(devvp, mp, p, argp) for (iso_blknum = 16 + argp->ssector; iso_blknum < 100 + argp->ssector; iso_blknum++) { - if (error = bread(devvp, iso_blknum * btodb(iso_bsize), - iso_bsize, NOCRED, &bp)) + if ((error = bread(devvp, iso_blknum * btodb(iso_bsize), + iso_bsize, NOCRED, &bp)) != 0) goto out; vdp = (struct iso_volume_descriptor *)bp->b_data; @@ -414,10 +414,10 @@ iso_mountfs(devvp, mp, p, argp) /* Check the Rock Ridge Extention support */ if (!(argp->flags & ISOFSMNT_NORRIP)) { - if (error = bread(isomp->im_devvp, + if ((error = bread(isomp->im_devvp, (isomp->root_extent + isonum_711(rootp->ext_attr_length)) << (isomp->im_bshift - DEV_BSHIFT), - isomp->logical_block_size, NOCRED, &bp)) + isomp->logical_block_size, NOCRED, &bp)) != 0) goto out; rootp = (struct iso_directory_record *)bp->b_data; @@ -641,7 +641,7 @@ cd9660_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp) if (np == NULL) return (EACCES); - if (error = VFS_VGET(mp, ifhp->ifid_ino, &nvp)) { + if ((error = VFS_VGET(mp, ifhp->ifid_ino, &nvp)) != 0) { *vpp = NULLVP; return (error); } @@ -700,7 +700,7 @@ cd9660_vget_internal(mp, ino, vpp, relocated, isodir) return (0); /* Allocate a new vnode/iso_node. */ - if (error = getnewvnode(VT_ISOFS, mp, cd9660_vnodeop_p, &vp)) { + if ((error = getnewvnode(VT_ISOFS, mp, cd9660_vnodeop_p, &vp)) != 0) { *vpp = NULLVP; return (error); } @@ -787,7 +787,7 @@ cd9660_vget_internal(mp, ino, vpp, relocated, isodir) ip->iso_start = ino >> imp->im_bshift; if (bp != 0) brelse(bp); - if (error = cd9660_blkatoff(vp, (off_t)0, NULL, &bp)) { + if ((error = cd9660_blkatoff(vp, (off_t)0, NULL, &bp)) != 0) { vput(vp); return (error); } @@ -840,7 +840,7 @@ cd9660_vget_internal(mp, ino, vpp, relocated, isodir) * if device, look at device number table for translation */ vp->v_op = cd9660_specop_p; - if (nvp = checkalias(vp, ip->inode.iso_rdev, mp)) { + if ((nvp = checkalias(vp, ip->inode.iso_rdev, mp)) != NULL) { /* * Discard unneeded vnode, but save its iso_node. * Note that the lock is carried over in the iso_node @@ -858,6 +858,8 @@ cd9660_vget_internal(mp, ino, vpp, relocated, isodir) ip->i_vnode = vp; } break; + default: + break; } if (ip->iso_extent == imp->root_extent) diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index c016056..5ec970a 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vnops.c 8.19 (Berkeley) 5/27/95 - * $Id: cd9660_vnops.c,v 1.52 1998/03/06 09:46:14 msmith Exp $ + * $Id: cd9660_vnops.c,v 1.53 1998/07/04 20:45:30 julian Exp $ */ #include <sys/param.h> @@ -109,6 +109,8 @@ cd9660_setattr(ap) case VBLK: case VSOCK: case VFIFO: + case VNON: + case VBAD: return (0); } } @@ -148,6 +150,9 @@ cd9660_access(ap) case VLNK: case VREG: return (EROFS); + /* NOT REACHED */ + default: + break; } } @@ -362,7 +367,7 @@ iso_uiodir(idp,dp,off) --idp->ncookies; } - if (error = uiomove((caddr_t) dp,dp->d_reclen,idp->uio)) + if ((error = uiomove((caddr_t) dp,dp->d_reclen,idp->uio)) != 0) return (error); idp->uio_off = off; return (0); @@ -396,12 +401,12 @@ assoc = (cl > 1) && (*cname == ASSOCCHAR); if (sl != cl || bcmp(sname,cname,sl)) { if (idp->assocent.d_namlen) { - if (error = iso_uiodir(idp,&idp->assocent,idp->assocoff)) + if ((error = iso_uiodir(idp,&idp->assocent,idp->assocoff)) != 0) return (error); idp->assocent.d_namlen = 0; } if (idp->saveent.d_namlen) { - if (error = iso_uiodir(idp,&idp->saveent,idp->saveoff)) + if ((error = iso_uiodir(idp,&idp->saveent,idp->saveoff)) != 0) return (error); idp->saveent.d_namlen = 0; } @@ -492,8 +497,8 @@ cd9660_readdir(ap) if ((idp->curroff & bmask) == 0) { if (bp != NULL) brelse(bp); - if (error = - cd9660_blkatoff(vdp, (off_t)idp->curroff, NULL, &bp)) + if ((error = + cd9660_blkatoff(vdp, (off_t)idp->curroff, NULL, &bp)) != 0) break; entryoffsetinblock = 0; } |