diff options
author | gpalmer <gpalmer@FreeBSD.org> | 1996-06-12 05:08:34 +0000 |
---|---|---|
committer | gpalmer <gpalmer@FreeBSD.org> | 1996-06-12 05:08:34 +0000 |
commit | d356aa8b627cecbc5a3a5e98327366686498962d (patch) | |
tree | 75b10d209de43019a6a6831d5e346a6e58ddf251 /sys/miscfs | |
parent | 904c454ce5d66ebfbbaa39f3bb678692810ccc88 (diff) | |
download | FreeBSD-src-d356aa8b627cecbc5a3a5e98327366686498962d.zip FreeBSD-src-d356aa8b627cecbc5a3a5e98327366686498962d.tar.gz |
Clean up -Wunused warnings. Julian asked me to just ifdef
out unused code as this is still work in progress.
Reviewed by: bde
Diffstat (limited to 'sys/miscfs')
-rw-r--r-- | sys/miscfs/devfs/devfs_tree.c | 9 | ||||
-rw-r--r-- | sys/miscfs/devfs/devfs_vfsops.c | 8 | ||||
-rw-r--r-- | sys/miscfs/devfs/devfs_vnops.c | 59 |
3 files changed, 29 insertions, 47 deletions
diff --git a/sys/miscfs/devfs/devfs_tree.c b/sys/miscfs/devfs/devfs_tree.c index 2acfbb7..5e550ec 100644 --- a/sys/miscfs/devfs/devfs_tree.c +++ b/sys/miscfs/devfs/devfs_tree.c @@ -2,7 +2,7 @@ /* * Written by Julian Elischer (julian@DIALix.oz.au) * - * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.23 1996/04/06 13:34:35 joerg Exp $ + * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.24 1996/04/07 01:15:01 joerg Exp $ */ #include "param.h" @@ -37,7 +37,7 @@ void devfs_sinit(void *junk) { int retval; /* we will discard this */ - devnm_p new; + /* * call the right routine at the right time with the right args.... */ @@ -227,7 +227,6 @@ dev_add_name(char *name, dn_p dirnode, devnm_p back, dn_p dnp, devnm_p *devnm_pp) { devnm_p devnmp; - devnm_p realthing; /* needed to create an alias */ int retval; DBPRINT(("dev_add_name\n")); @@ -359,7 +358,6 @@ int dev_add_node(int entrytype, union typeinfo *by, dn_p proto, dn_p *dn_pp) { dn_p dnp; - int retval; DBPRINT(("dev_add_node\n")); if(!(dnp = (dn_p)malloc(sizeof(devnode_t), @@ -612,7 +610,6 @@ dev_dup_entry(dn_p parent, devnm_p back, devnm_p *dnm_pp, struct devfsmount *dvm) { devnm_p newnmp; - struct devfsmount *dmt; devnm_p newback; devnm_p newfront; int error; @@ -1014,8 +1011,6 @@ devfs_link(void *original, char *fmt, ...) devnm_p orig = (devnm_p) original; dn_p dirnode; /* devnode for parent directory */ int retval; - int major ; - union typeinfo by; va_list ap; char *p, buf[256]; /* XXX */ diff --git a/sys/miscfs/devfs/devfs_vfsops.c b/sys/miscfs/devfs/devfs_vfsops.c index c1cf599..b8b0437 100644 --- a/sys/miscfs/devfs/devfs_vfsops.c +++ b/sys/miscfs/devfs/devfs_vfsops.c @@ -1,7 +1,7 @@ /* * Written by Julian Elischer (julian@DIALix.oz.au) * - * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vfsops.c,v 1.10 1996/04/06 13:34:36 joerg Exp $ + * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vfsops.c,v 1.11 1996/04/07 01:15:02 joerg Exp $ * * */ @@ -103,7 +103,6 @@ static int mountdevfs( struct mount *mp, struct proc *p) { int error = 0; - int ronly = (mp->mnt_flag & MNT_RDONLY) != 0; struct devfsmount *devfs_mp_p; @@ -144,8 +143,6 @@ DBPRINT(("start ")); static int devfs_unmount( struct mount *mp, int mntflags, struct proc *p) { - int flags = 0; - int error = 0; struct devfsmount *devfs_mp_p = (struct devfsmount *)mp->mnt_data; DBPRINT(("unmount ")); @@ -153,7 +150,8 @@ DBPRINT(("unmount ")); free((caddr_t)devfs_mp_p, M_DEVFSMNT); mp->mnt_data = (qaddr_t)0; mp->mnt_flag &= ~MNT_LOCAL; - return error; + + return 0; } /* return the address of the root vnode in *vpp */ diff --git a/sys/miscfs/devfs/devfs_vnops.c b/sys/miscfs/devfs/devfs_vnops.c index 395403e..14afa0c 100644 --- a/sys/miscfs/devfs/devfs_vnops.c +++ b/sys/miscfs/devfs/devfs_vnops.c @@ -1,7 +1,7 @@ /* * Written by Julian Elischer (julian@DIALix.oz.au) * - * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v 1.19 1996/04/06 13:34:37 joerg Exp $ + * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v 1.20 1996/04/07 01:15:02 joerg Exp $ * * symlinks can wait 'til later. */ @@ -20,7 +20,6 @@ #include <miscfs/specfs/specdev.h>/* definitions of spec functions we use */ #include <sys/malloc.h> #include <sys/dir.h> /* defines dirent structure */ -/*#include "vnode_if.h"*/ /* must be included elsewhere (vnode.h?)*/ #include "devfsdefs.h" /* @@ -91,8 +90,9 @@ devfs_lookup(struct vop_lookup_args *ap) DBPRINT(("lookup\n")); - if(dir_vnode->v_usecount == 0) printf("dir had no refs "); - if(devfs_vntodn(dir_vnode,&dir_node)) + if (dir_vnode->v_usecount == 0) + printf("dir had no refs "); + if (devfs_vntodn(dir_vnode,&dir_node)) { printf("vnode has changed?\n"); vprint("=",dir_vnode); @@ -106,7 +106,7 @@ DBPRINT(("lookup\n")); { return (ENOTDIR); } - if (error = VOP_ACCESS(dir_vnode, VEXEC, cnp->cn_cred, cnp->cn_proc)) + if (error = VOP_ACCESS(dir_vnode, VEXEC, cnp->cn_cred, p)) { return (error); } @@ -209,7 +209,7 @@ DBPRINT(("NOT\n")); * creation of files in the directory. */ if (error = VOP_ACCESS(dir_vnode, VWRITE, - cnp->cn_cred, cnp->cn_proc)) + cnp->cn_cred, p)) { DBPRINT(("MKACCESS ")); return (error); @@ -250,7 +250,7 @@ DBPRINT(("MKACCESS ")); * Write access to directory required to delete files. */ if (error = VOP_ACCESS(dir_vnode, VWRITE, - cnp->cn_cred, cnp->cn_proc)) + cnp->cn_cred, p)) return (error); /* * we are trying to delete '.'. What does this mean? XXX @@ -293,7 +293,7 @@ DBPRINT(("MKACCESS ")); * Are we allowed to change the holding directory? */ if (error = VOP_ACCESS(dir_vnode, VWRITE, - cnp->cn_cred, cnp->cn_proc)) + cnp->cn_cred, p)) return (error); /* * Careful about locking second node. @@ -355,9 +355,6 @@ DBPRINT(("GOT\n")); return (0); } - - - /* * Create a regular file. * We must also free the pathname buffer pointed at @@ -367,6 +364,8 @@ DBPRINT(("GOT\n")); * * Always error... no such thing in this FS */ + +#ifdef notyet static int devfs_create(struct vop_mknod_args *ap) /*struct vop_mknod_args { @@ -421,6 +420,7 @@ DBPRINT(("mknod\n")); } return error; } +#endif /* notyet */ static int devfs_open(struct vop_open_args *ap) @@ -435,6 +435,7 @@ DBPRINT(("open\n")); return 0; } +#ifdef notyet static int devfs_close( struct vop_close_args *ap) /*struct vop_close_args { @@ -447,6 +448,7 @@ devfs_close( struct vop_close_args *ap) DBPRINT(("close\n")); return 0; } +#endif /* notyet */ static int devfs_access(struct vop_access_args *ap) @@ -465,7 +467,6 @@ devfs_access(struct vop_access_args *ap) struct vnode *vp = ap->a_vp; int mode = ap->a_mode; struct ucred *cred = ap->a_cred; - struct proc *p = ap->a_p; dn_p file_node; int error; gid_t *gp; @@ -521,8 +522,6 @@ devfs_getattr(struct vop_getattr_args *ap) { struct vnode *vp = ap->a_vp; struct vattr *vap = ap->a_vap; - struct ucred *cred = ap->a_cred; - struct proc *p = ap->a_p; dn_p file_node; int error; @@ -680,7 +679,6 @@ devfs_read(struct vop_read_args *ap) struct ucred *a_cred; } */ { - int eof; int error = 0; dn_p file_node; @@ -751,6 +749,7 @@ DBPRINT(("write\n")); } /* presently not called from devices anyhow */ +#ifdef notyet static int devfs_ioctl(struct vop_ioctl_args *ap) /*struct vop_ioctl_args { @@ -818,10 +817,10 @@ devfs_seek(struct vop_seek_args *ap) struct ucred *a_cred; } */ { - int error = 0; DBPRINT(("seek\n")); return 0; } +#endif /* notyet */ static int devfs_remove(struct vop_remove_args *ap) @@ -836,7 +835,7 @@ devfs_remove(struct vop_remove_args *ap) struct componentname *cnp = ap->a_cnp; dn_p tp, tdp; devnm_p tnp; - int doingdirectory = 0, oldparent = 0, newparent = 0; + int doingdirectory = 0; int error = 0; uid_t ouruid = cnp->cn_cred->cr_uid; @@ -941,9 +940,7 @@ devfs_link(struct vop_link_args *ap) struct componentname *cnp = ap->a_cnp; dn_p fp, tdp; devnm_p tnp; - int doingdirectory = 0; int error = 0; - uid_t outuid = cnp->cn_cred->cr_uid; DBPRINT(("link\n")); /* @@ -1045,9 +1042,8 @@ devfs_rename(struct vop_rename_args *ap) struct componentname *fcnp = ap->a_fcnp; dn_p fp, fdp, tp, tdp; devnm_p fnp,tnp; - int doingdirectory = 0, oldparent = 0, newparent = 0; + int doingdirectory = 0; int error = 0; - uid_t outuid = tcnp->cn_cred->cr_uid; /* * First catch an arbitrary restriction for this FS @@ -1243,7 +1239,7 @@ out: return (error); } - +#ifdef notyet static int devfs_mkdir(struct vop_mkdir_args *ap) /*struct vop_mkdir_args { @@ -1282,6 +1278,7 @@ devfs_symlink(struct vop_symlink_args *ap) return EINVAL; DBPRINT(("symlink\n")); } +#endif /* * Vnode op for readdir @@ -1299,7 +1296,6 @@ devfs_readdir(struct vop_readdir_args *ap) { struct vnode *vp = ap->a_vp; struct uio *uio = ap->a_uio; - struct ucred *cred = ap->a_cred; struct dirent dirent; dn_p dir_node; devnm_p name_node; @@ -1393,6 +1389,7 @@ DBPRINT(("readdir\n")); /* */ +#ifdef notyet static int devfs_readlink(struct vop_readlink_args *ap) /*struct vop_readlink_args { @@ -1417,6 +1414,7 @@ DBPRINT(("abortop\n")); FREE(ap->a_cnp->cn_pnbuf, M_NAMEI); return 0; } +#endif /* notyet */ static int devfs_inactive(struct vop_inactive_args *ap) @@ -1427,6 +1425,8 @@ devfs_inactive(struct vop_inactive_args *ap) DBPRINT(("inactive\n")); return 0; } + +#ifdef notyet static int devfs_lock(struct vop_lock_args *ap) { @@ -1472,8 +1472,6 @@ devfs_strategy(struct vop_strategy_args *ap) struct buf *a_bp; } */ { - struct vnode *vp; - int error; DBPRINT(("strategy\n")); if (ap->a_bp->b_vp->v_type == VBLK || ap->a_bp->b_vp->v_type == VCHR) @@ -1495,6 +1493,7 @@ devfs_advlock(struct vop_advlock_args *ap) DBPRINT(("advlock\n")); return EINVAL; /* we don't do locking yet */ } +#endif /* notyet */ static int devfs_reclaim(struct vop_reclaim_args *ap) @@ -1606,16 +1605,6 @@ devfs_badop(void *junk) /* NOTREACHED */ } -/* - * devfs vnode null operation - */ -static int -devfs_nullop(void *junk) -{ - - return (0); -} - /*proto*/ void devfs_dropvnode(dn_p dnp) |