version 1.39, 2003/04/16 21:44:22 |
version 1.40, 2003/06/28 14:22:01 |
Line 64 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 64 __KERNEL_RCSID(0, "$NetBSD$"); |
|
#include <miscfs/fdesc/fdesc.h> |
#include <miscfs/fdesc/fdesc.h> |
|
|
int fdesc_mount __P((struct mount *, const char *, void *, |
int fdesc_mount __P((struct mount *, const char *, void *, |
struct nameidata *, struct proc *)); |
struct nameidata *, struct lwp *)); |
int fdesc_start __P((struct mount *, int, struct proc *)); |
int fdesc_start __P((struct mount *, int, struct lwp *)); |
int fdesc_unmount __P((struct mount *, int, struct proc *)); |
int fdesc_unmount __P((struct mount *, int, struct lwp *)); |
int fdesc_quotactl __P((struct mount *, int, uid_t, caddr_t, |
int fdesc_quotactl __P((struct mount *, int, uid_t, caddr_t, |
struct proc *)); |
struct lwp *)); |
int fdesc_statfs __P((struct mount *, struct statfs *, struct proc *)); |
int fdesc_statfs __P((struct mount *, struct statfs *, struct lwp *)); |
int fdesc_sync __P((struct mount *, int, struct ucred *, struct proc *)); |
int fdesc_sync __P((struct mount *, int, struct ucred *, struct lwp *)); |
int fdesc_vget __P((struct mount *, ino_t, struct vnode **)); |
int fdesc_vget __P((struct mount *, ino_t, struct vnode **, struct lwp *)); |
int fdesc_fhtovp __P((struct mount *, struct fid *, struct vnode **)); |
int fdesc_fhtovp __P((struct mount *, struct fid *, struct vnode **, |
|
struct lwp *)); |
int fdesc_checkexp __P((struct mount *, struct mbuf *, int *, |
int fdesc_checkexp __P((struct mount *, struct mbuf *, int *, |
struct ucred **)); |
struct ucred **)); |
int fdesc_vptofh __P((struct vnode *, struct fid *)); |
int fdesc_vptofh __P((struct vnode *, struct fid *)); |
int fdesc_sysctl __P((int *, u_int, void *, size_t *, void *, size_t, |
int fdesc_sysctl __P((int *, u_int, void *, size_t *, void *, size_t, |
struct proc *)); |
struct lwp *)); |
|
|
/* |
/* |
* Mount the per-process file descriptors (/dev/fd) |
* Mount the per-process file descriptors (/dev/fd) |
*/ |
*/ |
int |
int |
fdesc_mount(mp, path, data, ndp, p) |
fdesc_mount(mp, path, data, ndp, l) |
struct mount *mp; |
struct mount *mp; |
const char *path; |
const char *path; |
void *data; |
void *data; |
struct nameidata *ndp; |
struct nameidata *ndp; |
struct proc *p; |
struct lwp *l; |
{ |
{ |
int error = 0; |
int error = 0; |
struct fdescmount *fmp; |
struct fdescmount *fmp; |
Line 122 fdesc_mount(mp, path, data, ndp, p) |
|
Line 123 fdesc_mount(mp, path, data, ndp, p) |
|
} |
} |
|
|
int |
int |
fdesc_start(mp, flags, p) |
fdesc_start(mp, flags, l) |
struct mount *mp; |
struct mount *mp; |
int flags; |
int flags; |
struct proc *p; |
struct lwp *l; |
{ |
{ |
return (0); |
return (0); |
} |
} |
|
|
int |
int |
fdesc_unmount(mp, mntflags, p) |
fdesc_unmount(mp, mntflags, l) |
struct mount *mp; |
struct mount *mp; |
int mntflags; |
int mntflags; |
struct proc *p; |
struct lwp *l; |
{ |
{ |
int error; |
int error; |
int flags = 0; |
int flags = 0; |
Line 171 fdesc_unmount(mp, mntflags, p) |
|
Line 172 fdesc_unmount(mp, mntflags, p) |
|
} |
} |
|
|
int |
int |
fdesc_root(mp, vpp) |
fdesc_root(mp, vpp, l) |
struct mount *mp; |
struct mount *mp; |
struct vnode **vpp; |
struct vnode **vpp; |
|
struct lwp *l; |
{ |
{ |
struct vnode *vp; |
struct vnode *vp; |
|
|
Line 188 fdesc_root(mp, vpp) |
|
Line 190 fdesc_root(mp, vpp) |
|
} |
} |
|
|
int |
int |
fdesc_quotactl(mp, cmd, uid, arg, p) |
fdesc_quotactl(mp, cmd, uid, arg, l) |
struct mount *mp; |
struct mount *mp; |
int cmd; |
int cmd; |
uid_t uid; |
uid_t uid; |
caddr_t arg; |
caddr_t arg; |
struct proc *p; |
struct lwp *l; |
{ |
{ |
|
|
return (EOPNOTSUPP); |
return (EOPNOTSUPP); |
} |
} |
|
|
int |
int |
fdesc_statfs(mp, sbp, p) |
fdesc_statfs(mp, sbp, l) |
struct mount *mp; |
struct mount *mp; |
struct statfs *sbp; |
struct statfs *sbp; |
struct proc *p; |
struct lwp *l; |
{ |
{ |
struct filedesc *fdp; |
struct filedesc *fdp; |
|
struct proc *p; |
int lim; |
int lim; |
int i; |
int i; |
int last; |
int last; |
Line 217 fdesc_statfs(mp, sbp, p) |
|
Line 220 fdesc_statfs(mp, sbp, p) |
|
* limit is ever reduced below the current number |
* limit is ever reduced below the current number |
* of open files... ] |
* of open files... ] |
*/ |
*/ |
|
p = l->l_proc; |
lim = p->p_rlimit[RLIMIT_NOFILE].rlim_cur; |
lim = p->p_rlimit[RLIMIT_NOFILE].rlim_cur; |
fdp = p->p_fd; |
fdp = p->p_fd; |
last = min(fdp->fd_nfiles, lim); |
last = min(fdp->fd_nfiles, lim); |
Line 250 fdesc_statfs(mp, sbp, p) |
|
Line 254 fdesc_statfs(mp, sbp, p) |
|
|
|
/*ARGSUSED*/ |
/*ARGSUSED*/ |
int |
int |
fdesc_sync(mp, waitfor, uc, p) |
fdesc_sync(mp, waitfor, uc, l) |
struct mount *mp; |
struct mount *mp; |
int waitfor; |
int waitfor; |
struct ucred *uc; |
struct ucred *uc; |
struct proc *p; |
struct lwp *l; |
{ |
{ |
|
|
return (0); |
return (0); |
Line 265 fdesc_sync(mp, waitfor, uc, p) |
|
Line 269 fdesc_sync(mp, waitfor, uc, p) |
|
* Currently unsupported. |
* Currently unsupported. |
*/ |
*/ |
int |
int |
fdesc_vget(mp, ino, vpp) |
fdesc_vget(mp, ino, vpp, l) |
struct mount *mp; |
struct mount *mp; |
ino_t ino; |
ino_t ino; |
struct vnode **vpp; |
struct vnode **vpp; |
|
struct lwp *l; |
{ |
{ |
|
|
return (EOPNOTSUPP); |
return (EOPNOTSUPP); |
Line 277 fdesc_vget(mp, ino, vpp) |
|
Line 282 fdesc_vget(mp, ino, vpp) |
|
|
|
/*ARGSUSED*/ |
/*ARGSUSED*/ |
int |
int |
fdesc_fhtovp(mp, fhp, vpp) |
fdesc_fhtovp(mp, fhp, vpp, l) |
struct mount *mp; |
struct mount *mp; |
struct fid *fhp; |
struct fid *fhp; |
struct vnode **vpp; |
struct vnode **vpp; |
|
struct lwp *l; |
{ |
{ |
|
|
return (EOPNOTSUPP); |
return (EOPNOTSUPP); |
Line 308 fdesc_vptofh(vp, fhp) |
|
Line 314 fdesc_vptofh(vp, fhp) |
|
} |
} |
|
|
int |
int |
fdesc_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) |
fdesc_sysctl(name, namelen, oldp, oldlenp, newp, newlen, l) |
int *name; |
int *name; |
u_int namelen; |
u_int namelen; |
void *oldp; |
void *oldp; |
size_t *oldlenp; |
size_t *oldlenp; |
void *newp; |
void *newp; |
size_t newlen; |
size_t newlen; |
struct proc *p; |
struct lwp *l; |
{ |
{ |
return (EOPNOTSUPP); |
return (EOPNOTSUPP); |
} |
} |