devfs_fo_ioctl(struct file *fp, u_long com, caddr_t data,
struct ucred *ucred, struct sysmsg *msg)
{
+#if 0
struct devfs_node *node;
+#endif
struct vnode *vp;
struct vnode *ovp;
cdev_t dev;
reference_dev(dev);
+#if 0
node = DEVFS_NODE(vp);
+#endif
devfs_debug(DEVFS_DEBUG_DEBUG,
"devfs_fo_ioctl() called! for dev %s\n",
devfs_spec_ioctl(struct vop_ioctl_args *ap)
{
struct vnode *vp = ap->a_vp;
+#if 0
struct devfs_node *node;
+#endif
cdev_t dev;
if ((dev = vp->v_rdev) == NULL)
return (EBADF); /* device was revoked */
+#if 0
node = DEVFS_NODE(vp);
-#if 0
if (node) {
nanotime(&node->atime);
nanotime(&node->mtime);
devfs_spec_kqfilter(struct vop_kqfilter_args *ap)
{
struct vnode *vp = ap->a_vp;
+#if 0
struct devfs_node *node;
+#endif
cdev_t dev;
if ((dev = vp->v_rdev) == NULL)
return (EBADF); /* device was revoked (EBADF) */
+#if 0
node = DEVFS_NODE(vp);
-#if 0
if (node)
nanotime(&node->atime);
#endif
struct vnode *tdp; /* returned by cd9660_vget_internal */
u_long bmask; /* block offset mask */
int lockparent; /* 1 => lockparent flag is set */
- int wantparent; /* 1 => wantparent or lockparent flag */
int error;
ino_t ino = 0;
int reclen;
dp = VTOI(vdp);
imp = dp->i_mnt;
lockparent = flags & CNP_LOCKPARENT;
- wantparent = flags & (CNP_LOCKPARENT | CNP_WANTPARENT);
cnp->cn_flags &= ~CNP_PDIRUNLOCK;
/*
* nfs/krpc_subr.c
* $NetBSD: krpc_subr.c,v 1.10 1995/08/08 20:43:43 gwr Exp $
* $FreeBSD: src/sys/nfs/bootp_subr.c,v 1.20.2.9 2003/04/24 16:51:08 ambrisko Exp $
- * $DragonFly: src/sys/vfs/nfs/bootp_subr.c,v 1.26 2008/03/08 07:50:49 sephe Exp $
*/
#include "opt_bootp.h"
bootpc_tag(struct bootpc_tagcontext *tctx, struct bootp_packet *bp,
int len, int tag)
{
- unsigned char *j;
- unsigned char *ej;
-
tctx->overload = 0;
tctx->badopt = 0;
tctx->badtag = 0;
if (bootpc_hascookie(bp) == 0)
return NULL;
- j = &bp->vend[4];
- ej = (unsigned char *) bp + len;
-
bootpc_tag_helper(tctx, &bp->vend[4],
(unsigned char *) bp + len - &bp->vend[4], tag);
struct socket *so;
struct sockaddr_in *sin, ssin;
struct sockaddr *from;
- struct mbuf *m, *nam, *mhead;
+ struct mbuf *m, *mhead;
struct rpc_call *call;
struct rpc_reply *reply;
struct sockopt sopt;
return (EAFNOSUPPORT);
/* Free at end if not null. */
- nam = mhead = NULL;
+ mhead = NULL;
from = NULL;
/*
nfs_startio(struct vnode *vp, struct bio *bio, struct thread *td)
{
struct buf *bp = bio->bio_buf;
- struct nfsnode *np;
- struct nfsmount *nmp;
KKASSERT(vp->v_tag == VT_NFS);
- np = VTONFS(vp);
- nmp = VFSTONFS(vp->v_mount);
/*
* clear B_ERROR and B_INVAL state prior to initiating the I/O. We
struct vnode *dvp;
struct vnode *vp;
struct vnode *xp;
- struct mount *mp;
struct mount *xmp;
struct vattr dirfor, diraft, at;
nfsfh_t nfh, dnfh;
nfsdbprintf(("%s %d\n", __FILE__, __LINE__));
nlookup_zero(&nd);
dirp = dvp = vp = xp = NULL;
- mp = xmp = NULL;
+ xmp = NULL;
fhp = &nfh.fh_generic;
dfhp = &dnfh.fh_generic;
struct iovec iv;
int len, nlen, rem, xfer, tsiz, i, error = 0, getret = 1;
int siz, cnt, fullsiz, eofflag, rdonly, ncookies;
- u_quad_t off, toff, verf;
+ u_quad_t off, toff;
+#if 0
+ u_quad_t verf;
+#endif
off_t *cookies = NULL, *cookiep;
struct nfsm_info info;
NULLOUT(tl = nfsm_dissect(&info, 5 * NFSX_UNSIGNED));
toff = fxdr_hyper(tl);
tl += 2;
+#if 0
verf = fxdr_hyper(tl);
+#endif
tl += 2;
} else {
NULLOUT(tl = nfsm_dissect(&info, 2 * NFSX_UNSIGNED));
toff = fxdr_unsigned(u_quad_t, *tl++);
+#if 0
verf = 0; /* shut up gcc */
+#endif
}
off = toff;
cnt = fxdr_unsigned(int, *tl);
struct nfs_fattr *fp;
int len, nlen, rem, xfer, tsiz, i, error = 0, getret = 1;
int siz, cnt, fullsiz, eofflag, rdonly, dirlen, ncookies;
- u_quad_t off, toff, verf;
+ u_quad_t off, toff;
+#if 0
+ u_quad_t verf;
+#endif
off_t *cookies = NULL, *cookiep; /* needs to be int64_t or off_t */
struct nfsm_info info;
NULLOUT(tl = nfsm_dissect(&info, 6 * NFSX_UNSIGNED));
toff = fxdr_hyper(tl);
tl += 2;
+#if 0
verf = fxdr_hyper(tl);
+#endif
tl += 2;
siz = fxdr_unsigned(int, *tl++);
cnt = fxdr_unsigned(int, *tl);
*/
if (nd->nd_flag & ND_KERBFULL) {
struct nfsuid *nuidp;
- struct timeval ktvin, ktvout;
+ struct timeval ktvout;
for (nuidp = NUIDHASH(slp, nd->nd_cr.cr_uid)->lh_first;
nuidp != NULL; nuidp = nuidp->nu_hash.le_next) {
break;
}
if (nuidp) {
- ktvin.tv_sec =
- txdr_unsigned(nuidp->nu_timestamp.tv_sec - 1);
- ktvin.tv_usec =
- txdr_unsigned(nuidp->nu_timestamp.tv_usec);
-
/*
* Encrypt the timestamp in ecb mode using the
* session key.
{
struct nfsuid *nuidp;
u_int32_t *nickp, *verfp;
- struct timeval ktvin, ktvout;
+ struct timeval ktvout;
#ifdef DIAGNOSTIC
if (verf_len < (4 * NFSX_UNSIGNED))
getmicrotime(&nuidp->nu_timestamp);
else
nuidp->nu_timestamp.tv_usec++;
- ktvin.tv_sec = txdr_unsigned(nuidp->nu_timestamp.tv_sec);
- ktvin.tv_usec = txdr_unsigned(nuidp->nu_timestamp.tv_usec);
/*
* Now encrypt the timestamp verifier in ecb mode using the session
struct nfsnode *np = VTONFS(vp);
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
struct vattr *vap = ap->a_vap;
- int biosize = vp->v_mount->mnt_stat.f_iosize;
int error = 0;
- int boff;
off_t tsize;
thread_t td = curthread;
tsize = np->n_size;
again:
- boff = (int)vap->va_size & (biosize - 1);
error = nfs_meta_setsize(vp, td, vap->va_size, 0);
#if 0
struct thread *td = curthread;
struct namecache *ncp;
struct nfsmount *nmp;
- struct ucred *cred;
struct nfsnode *np;
struct vnode *dvp;
struct vnode *nvp;
int len;
struct nfsm_info info;
- cred = ap->a_cred;
dvp = ap->a_dvp;
nmp = VFSTONFS(dvp->v_mount);
{
struct nwmount *nmp = VFSTONWFS(vp->v_mount);
struct nwnode *np = VTONW(vp);
- struct thread *td;
struct vattr vattr;
- int error, biosize;
+ int error;
if (vp->v_type != VREG && vp->v_type != VDIR) {
kprintf("%s: vn types other than VREG or VDIR are unsupported !\n",__func__);
}
if (uiop->uio_resid == 0) return 0;
if (uiop->uio_offset < 0) return EINVAL;
- td = uiop->uio_td;
if (vp->v_type == VDIR) {
error = nwfs_readvdir(vp, uiop, cred);
return error;
}
- biosize = NWFSTOCONN(nmp)->buffer_size;
if (np->n_flag & NMODIFIED) {
nwfs_attr_cacheremove(vp);
error = VOP_GETATTR(vp, &vattr);
int
nwfs_inactive(struct vop_inactive_args *ap)
{
- struct thread *td = curthread; /* XXX */
+ struct thread *td __debugvar = curthread; /* XXX */
struct ucred *cred;
struct vnode *vp = ap->a_vp;
struct nwnode *np = VTONW(vp);
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/nwfs/nwfs_subr.c,v 1.2.2.2 2000/10/25 02:11:10 bp Exp $
- * $DragonFly: src/sys/vfs/nwfs/nwfs_subr.c,v 1.8 2006/12/23 00:41:30 swildner Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
{
struct nwmount *nmp;
struct nwnode *dnp = VTONW(dvp);
- struct ncp_conn *conn;
int error;
if (!dvp || dvp->v_type != VDIR) {
return (ENOENT);
}
nmp = VTONWFS(dvp);
- conn = NWFSTOCONN(nmp);
if (len == 1 && name[0] == '.') {
if (strcmp(dnp->n_name, NWFS_ROOTVOL) == 0) {
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/nwfs/nwfs_vnops.c,v 1.6.2.3 2001/03/14 11:26:59 bp Exp $
- * $DragonFly: src/sys/vfs/nwfs/nwfs_vnops.c,v 1.38 2007/11/20 21:03:50 dillon Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
struct componentname *cnp = ap->a_cnp;
int len=cnp->cn_namelen;
struct ncp_open_info no;
- struct nwnode *np;
struct vnode *newvp = NULL;
ncpfid fid;
int error = 0;
fid.f_id = no.fattr.dirEntNum;
error = nwfs_nget(VTOVFS(dvp), fid, &no.fattr, dvp, &newvp);
if (!error) {
- np = VTONW(newvp);
newvp->v_type = VDIR;
*ap->a_vpp = newvp;
}
struct vattr vattr;
off_t lbn, loffset, fsize;
size_t n;
- int boff, seqcount;
+ int boff;
int error = 0;
KKASSERT(uio->uio_rw == UIO_READ);
if (uio->uio_resid == 0)
return 0;
- seqcount = (int)((off_t)(ioflag >> IO_SEQSHIFT) * biosize / BKVASIZE);
-
/*
* Cache consistency can only be maintained approximately.
*
puffs_msg_enqueue(struct puffs_mount *pmp, struct puffs_msgpark *park)
{
struct thread *td = curthread;
- struct mount *mp;
struct puffs_req *preq;
sigset_t ss;
park->park_flags &= ~(PARKFLAG_DONE | PARKFLAG_HASERROR);
KKASSERT((park->park_flags & PARKFLAG_WAITERGONE) == 0);
- mp = PMPTOMP(pmp);
preq = park->park_preq;
preq->preq_buflen = park->park_maxlen;
/* signal waiters on REQUEST TO file server queue */
for (park = TAILQ_FIRST(&pmp->pmp_msg_touser); park; park = park_next) {
- uint8_t opclass;
-
lockmgr(&park->park_mtx, LK_EXCLUSIVE);
puffs_msgpark_reference(park);
park_next = TAILQ_NEXT(park, park_entries);
puffs_msgpark_release(park);
} else {
- opclass = park->park_preq->preq_opclass;
park->park_preq->preq_rv = ENXIO;
if (park->park_flags & PARKFLAG_CALL) {
void
puffs_putvnode(struct vnode *vp)
{
- struct puffs_mount *pmp;
struct puffs_node *pnode;
- pmp = VPTOPUFFSMP(vp);
pnode = VPTOPP(vp);
#ifdef DIAGNOSTIC
smbfs_nget(struct mount *mp, struct vnode *dvp, const char *name, int nmlen,
struct smbfattr *fap, struct vnode **vpp)
{
- struct smbnode *np;
struct vnode *vp;
int error;
error = smbfs_node_alloc(mp, dvp, name, nmlen, fap, &vp);
if (error)
return error;
- np = VTOSMB(vp);
if (fap)
smbfs_attr_cacheenter(vp, fap);
*vpp = vp;
struct udf_node *node;
struct vattr *vap;
struct file_entry *fentry;
- struct timespec ts;
-
- ts.tv_sec = 0;
vp = a->a_vp;
vap = a->a_vap;
struct udf_mnt *udfmp;
struct fileid_desc *fid = NULL;
struct udf_dirstream *ds;
- struct thread *td;
u_long nameiop;
u_long flags;
char *nameptr;
nameptr = a->a_cnp->cn_nameptr;
namelen = a->a_cnp->cn_namelen;
fsize = node->fentry->inf_len;
- td = a->a_cnp->cn_td;
*vpp = NULL;
struct vnode *vp = ap->a_vp;
int error;
- if (vn_isdisk(vp, NULL)) {
+ if (vn_isdisk(vp, NULL))
if (vp->v_rdev && vp->v_rdev->si_mountpoint != NULL &&
(vp->v_rdev->si_mountpoint->mnt_flag & MNT_SOFTDEP))
softdep_fsync_mountdev(vp);
- } else {
- struct inode *ip;
- ip = VTOI(vp);
- }
/*
* Flush all dirty buffers associated with a vnode.
struct thread *td = cnp->cn_td;
struct vnode *wvp;
struct componentname cn;
- struct ucred *cred;
KKASSERT(td->td_proc);
- cred = td->td_proc->p_ucred;
error = union_relookup(um, dvp, &wvp, cnp, &cn, path, strlen(path));
if (error)