various cleanups suggested by James Jegers, some then fixed up by me.
This commit is contained in:
parent
dbeff9edb1
commit
55300e7b13
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cd9660_lookup.c,v 1.12 1994/12/13 22:33:14 mycroft Exp $ */
|
||||
/* $NetBSD: cd9660_lookup.c,v 1.13 1994/12/24 15:30:03 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993, 1994
|
||||
@ -91,6 +91,7 @@ struct nchstats iso_nchstats;
|
||||
*
|
||||
* NOTE: (LOOKUP | LOCKPARENT) currently returns the parent inode unlocked.
|
||||
*/
|
||||
int
|
||||
cd9660_lookup(ap)
|
||||
struct vop_lookup_args /* {
|
||||
struct vnode *a_dvp;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cd9660_node.c,v 1.12 1994/12/13 22:33:16 mycroft Exp $ */
|
||||
/* $NetBSD: cd9660_node.c,v 1.13 1994/12/24 15:30:07 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1989, 1994
|
||||
@ -73,6 +73,7 @@ int prtactive; /* 1 => print out reclaim of active vnodes */
|
||||
/*
|
||||
* Initialize hash links for inodes and dnodes.
|
||||
*/
|
||||
int
|
||||
cd9660_init()
|
||||
{
|
||||
|
||||
@ -223,7 +224,7 @@ cd9660_inactive(ap)
|
||||
{
|
||||
struct vnode *vp = ap->a_vp;
|
||||
register struct iso_node *ip = VTOI(vp);
|
||||
int mode, error = 0;
|
||||
int error = 0;
|
||||
|
||||
if (prtactive && vp->v_usecount != 0)
|
||||
vprint("cd9660_inactive: pushing active", vp);
|
||||
@ -249,7 +250,6 @@ cd9660_reclaim(ap)
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct iso_node *ip = VTOI(vp);
|
||||
int i;
|
||||
|
||||
if (prtactive && vp->v_usecount != 0)
|
||||
vprint("cd9660_reclaim: pushing active", vp);
|
||||
@ -380,7 +380,6 @@ cd9660_tstamp_conv7(pi,pu)
|
||||
u_char *pi;
|
||||
struct timespec *pu;
|
||||
{
|
||||
int i;
|
||||
int crtime, days;
|
||||
int y, m, d, hour, minute, second, tz;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cd9660_node.h,v 1.9 1994/12/13 22:33:18 mycroft Exp $ */
|
||||
/* $NetBSD: cd9660_node.h,v 1.10 1994/12/24 15:30:09 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994
|
||||
@ -120,6 +120,7 @@ int cd9660_select __P((struct vop_select_args *));
|
||||
int cd9660_mmap __P((struct vop_mmap_args *));
|
||||
int cd9660_seek __P((struct vop_seek_args *));
|
||||
int cd9660_readdir __P((struct vop_readdir_args *));
|
||||
int cd9660_readlink __P((struct vop_readlink_args *));
|
||||
int cd9660_abortop __P((struct vop_abortop_args *));
|
||||
int cd9660_inactive __P((struct vop_inactive_args *));
|
||||
int cd9660_reclaim __P((struct vop_reclaim_args *));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cd9660_rrip.c,v 1.10 1994/12/13 22:33:22 mycroft Exp $ */
|
||||
/* $NetBSD: cd9660_rrip.c,v 1.11 1994/12/24 15:30:10 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993, 1994
|
||||
@ -469,7 +469,6 @@ cd9660_rrip_loop(isodir,ana,table)
|
||||
register ISO_SUSP_HEADER *phead;
|
||||
register ISO_SUSP_HEADER *pend;
|
||||
struct buf *bp = NULL;
|
||||
int i;
|
||||
char *pwhead;
|
||||
int result;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cd9660_vfsops.c,v 1.12 1994/12/15 19:54:13 mycroft Exp $ */
|
||||
/* $NetBSD: cd9660_vfsops.c,v 1.13 1994/12/24 15:30:12 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994
|
||||
@ -57,6 +57,7 @@
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <isofs/cd9660/iso.h>
|
||||
#include <isofs/cd9660/iso_rrip.h>
|
||||
#include <isofs/cd9660/cd9660_node.h>
|
||||
|
||||
extern int enodev ();
|
||||
@ -83,8 +84,10 @@ struct vfsops cd9660_vfsops = {
|
||||
*/
|
||||
#define ROOTNAME "root_device"
|
||||
|
||||
static iso_mountfs();
|
||||
static int iso_mountfs __P((struct vnode *devvp, struct mount *mp,
|
||||
struct proc *p, struct iso_args *argp));
|
||||
|
||||
int
|
||||
cd9660_mountroot()
|
||||
{
|
||||
register struct mount *mp;
|
||||
@ -138,6 +141,7 @@ cd9660_mountroot()
|
||||
*
|
||||
* mount system call
|
||||
*/
|
||||
int
|
||||
cd9660_mount(mp, path, data, ndp, p)
|
||||
register struct mount *mp;
|
||||
char *path;
|
||||
@ -209,7 +213,8 @@ cd9660_mount(mp, path, data, ndp, p)
|
||||
/*
|
||||
* Common code for mount and mountroot
|
||||
*/
|
||||
static iso_mountfs(devvp, mp, p, argp)
|
||||
static int
|
||||
iso_mountfs(devvp, mp, p, argp)
|
||||
register struct vnode *devvp;
|
||||
struct mount *mp;
|
||||
struct proc *p;
|
||||
@ -218,13 +223,10 @@ static iso_mountfs(devvp, mp, p, argp)
|
||||
register struct iso_mnt *isomp = (struct iso_mnt *)0;
|
||||
struct buf *bp = NULL;
|
||||
dev_t dev = devvp->v_rdev;
|
||||
caddr_t base, space;
|
||||
int havepart = 0, blks;
|
||||
int error = EINVAL, i, size;
|
||||
int needclose = 0;
|
||||
int ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
|
||||
extern struct vnode *rootvp;
|
||||
int j;
|
||||
int iso_bsize;
|
||||
int iso_blknum;
|
||||
struct iso_volume_descriptor *vdp;
|
||||
@ -379,6 +381,7 @@ out:
|
||||
* Nothing to do at the moment.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
cd9660_start(mp, flags, p)
|
||||
struct mount *mp;
|
||||
int flags;
|
||||
@ -397,7 +400,7 @@ cd9660_unmount(mp, mntflags, p)
|
||||
struct proc *p;
|
||||
{
|
||||
register struct iso_mnt *isomp;
|
||||
int i, error, ronly, flags = 0;
|
||||
int error, flags = 0;
|
||||
|
||||
if (mntflags & MNT_FORCE) {
|
||||
extern int doforce;
|
||||
@ -433,6 +436,7 @@ cd9660_unmount(mp, mntflags, p)
|
||||
/*
|
||||
* Return root of a filesystem
|
||||
*/
|
||||
int
|
||||
cd9660_root(mp, vpp)
|
||||
struct mount *mp;
|
||||
struct vnode **vpp;
|
||||
@ -469,13 +473,13 @@ cd9660_quotactl(mp, cmd, uid, arg, p)
|
||||
/*
|
||||
* Get file system statistics.
|
||||
*/
|
||||
int
|
||||
cd9660_statfs(mp, sbp, p)
|
||||
struct mount *mp;
|
||||
register struct statfs *sbp;
|
||||
struct proc *p;
|
||||
{
|
||||
register struct iso_mnt *isomp;
|
||||
register struct fs *fs;
|
||||
|
||||
isomp = VFSTOISOFS(mp);
|
||||
|
||||
@ -804,13 +808,13 @@ cd9660_vget_internal(mp, ino, vpp, relocated, isodir)
|
||||
* Vnode pointer to File handle
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
cd9660_vptofh(vp, fhp)
|
||||
struct vnode *vp;
|
||||
struct fid *fhp;
|
||||
{
|
||||
register struct iso_node *ip = VTOI(vp);
|
||||
register struct ifid *ifhp;
|
||||
register struct iso_mnt *mp = ip->i_mnt;
|
||||
|
||||
ifhp = (struct ifid *)fhp;
|
||||
ifhp->ifid_len = sizeof(struct ifid);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cd9660_vnops.c,v 1.19 1994/12/13 22:33:29 mycroft Exp $ */
|
||||
/* $NetBSD: cd9660_vnops.c,v 1.20 1994/12/24 15:30:14 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994
|
||||
@ -159,6 +159,7 @@ cd9660_close(ap)
|
||||
* super user is granted all permissions.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
cd9660_access(ap)
|
||||
struct vop_access_args /* {
|
||||
struct vnode *a_vp;
|
||||
@ -213,6 +214,7 @@ cd9660_access(ap)
|
||||
return ((ip->inode.iso_mode & mask) == mask ? 0 : EACCES);
|
||||
}
|
||||
|
||||
int
|
||||
cd9660_getattr(ap)
|
||||
struct vop_getattr_args /* {
|
||||
struct vnode *a_vp;
|
||||
@ -225,7 +227,6 @@ cd9660_getattr(ap)
|
||||
struct vnode *vp = ap->a_vp;
|
||||
register struct vattr *vap = ap->a_vap;
|
||||
register struct iso_node *ip = VTOI(vp);
|
||||
int i;
|
||||
|
||||
vap->va_fsid = ip->i_dev;
|
||||
vap->va_fileid = ip->i_number;
|
||||
@ -285,6 +286,7 @@ extern int doclusterread;
|
||||
/*
|
||||
* Vnode op for reading.
|
||||
*/
|
||||
int
|
||||
cd9660_read(ap)
|
||||
struct vop_read_args /* {
|
||||
struct vnode *a_vp;
|
||||
@ -298,7 +300,7 @@ cd9660_read(ap)
|
||||
register struct iso_node *ip = VTOI(vp);
|
||||
register struct iso_mnt *imp;
|
||||
struct buf *bp;
|
||||
daddr_t lbn, bn, rablock;
|
||||
daddr_t lbn, rablock;
|
||||
off_t diff;
|
||||
int rasize, error = 0;
|
||||
long size, n, on;
|
||||
@ -712,7 +714,6 @@ cd9660_readlink(ap)
|
||||
u_short symlen;
|
||||
int error;
|
||||
char *symname;
|
||||
ino_t ino;
|
||||
|
||||
ip = VTOI(ap->a_vp);
|
||||
imp = ip->i_mnt;
|
||||
|
Loading…
Reference in New Issue
Block a user