Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154499991
D13934.id38047.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
D13934.id38047.diff
View Options
Index: sys/fs/fdescfs/fdesc_vnops.c
===================================================================
--- sys/fs/fdescfs/fdesc_vnops.c
+++ sys/fs/fdescfs/fdesc_vnops.c
@@ -418,7 +418,7 @@
vref(vp);
VOP_UNLOCK(vp, 0);
error = kern_fpathconf(curthread, VTOFDESC(vp)->fd_fd,
- ap->a_name);
+ ap->a_name, ap->a_retval);
vn_lock(vp, LK_SHARED | LK_RETRY);
vunref(vp);
return (error);
Index: sys/fs/nfs/nfs_commonport.c
===================================================================
--- sys/fs/nfs/nfs_commonport.c
+++ sys/fs/nfs/nfs_commonport.c
@@ -316,7 +316,7 @@
* Do the pathconf vnode op.
*/
int
-nfsvno_pathconf(struct vnode *vp, int flag, register_t *retf,
+nfsvno_pathconf(struct vnode *vp, int flag, long *retf,
struct ucred *cred, struct thread *p)
{
int error;
@@ -688,7 +688,7 @@
nfs_supportsnfsv4acls(struct vnode *vp)
{
int error;
- register_t retval;
+ long retval;
ASSERT_VOP_LOCKED(vp, "nfs supports nfsv4acls");
Index: sys/fs/nfs/nfs_var.h
===================================================================
--- sys/fs/nfs/nfs_var.h
+++ sys/fs/nfs/nfs_var.h
@@ -371,8 +371,7 @@
void newnfs_setroot(struct ucred *);
int nfs_catnap(int, int, const char *);
struct nfsreferral *nfsv4root_getreferral(vnode_t, vnode_t, u_int32_t);
-int nfsvno_pathconf(vnode_t, int, register_t *, struct ucred *,
- NFSPROC_T *);
+int nfsvno_pathconf(vnode_t, int, long *, struct ucred *, NFSPROC_T *);
int nfsrv_atroot(vnode_t, uint64_t *);
void newnfs_timer(void *);
int nfs_supportsnfsv4acls(vnode_t);
Index: sys/fs/nfsserver/nfs_nfsdserv.c
===================================================================
--- sys/fs/nfsserver/nfs_nfsdserv.c
+++ sys/fs/nfsserver/nfs_nfsdserv.c
@@ -2133,7 +2133,7 @@
{
struct nfsv3_pathconf *pc;
int getret = 1;
- register_t linkmax, namemax, chownres, notrunc;
+ long linkmax, namemax, chownres, notrunc;
struct nfsvattr at;
if (nd->nd_repstat) {
Index: sys/fs/smbfs/smbfs_vnops.c
===================================================================
--- sys/fs/smbfs/smbfs_vnops.c
+++ sys/fs/smbfs/smbfs_vnops.c
@@ -895,7 +895,7 @@
{
struct smbmount *smp = VFSTOSMBFS(VTOVFS(ap->a_vp));
struct smb_vc *vcp = SSTOVC(smp->sm_share);
- register_t *retval = ap->a_retval;
+ long *retval = ap->a_retval;
int error = 0;
switch (ap->a_name) {
Index: sys/fs/tmpfs/tmpfs_vnops.c
===================================================================
--- sys/fs/tmpfs/tmpfs_vnops.c
+++ sys/fs/tmpfs/tmpfs_vnops.c
@@ -1343,7 +1343,7 @@
{
struct vnode *vp = v->a_vp;
int name = v->a_name;
- register_t *retval = v->a_retval;
+ long *retval = v->a_retval;
int error;
Index: sys/i386/ibcs2/ibcs2_misc.c
===================================================================
--- sys/i386/ibcs2/ibcs2_misc.c
+++ sys/i386/ibcs2/ibcs2_misc.c
@@ -737,12 +737,16 @@
ibcs2_pathconf(struct thread *td, struct ibcs2_pathconf_args *uap)
{
char *path;
+ long value;
int error;
CHECKALTEXIST(td, uap->path, &path);
uap->name++; /* iBCS2 _PC_* defines are offset by one */
- error = kern_pathconf(td, path, UIO_SYSSPACE, uap->name, FOLLOW);
+ error = kern_pathconf(td, path, UIO_SYSSPACE, uap->name, FOLLOW,
+ &value);
free(path, M_TEMP);
+ if (error == 0)
+ td->td_retval[0] = value;
return (error);
}
Index: sys/kern/kern_descrip.c
===================================================================
--- sys/kern/kern_descrip.c
+++ sys/kern/kern_descrip.c
@@ -1418,12 +1418,17 @@
int
sys_fpathconf(struct thread *td, struct fpathconf_args *uap)
{
+ long value;
+ int error;
- return (kern_fpathconf(td, uap->fd, uap->name));
+ error = kern_fpathconf(td, uap->fd, uap->name, &value);
+ if (error == 0)
+ td->td_retval[0] = value;
+ return (error);
}
int
-kern_fpathconf(struct thread *td, int fd, int name)
+kern_fpathconf(struct thread *td, int fd, int name, long *valuep)
{
struct file *fp;
struct vnode *vp;
@@ -1435,19 +1440,19 @@
return (error);
if (name == _PC_ASYNC_IO) {
- td->td_retval[0] = _POSIX_ASYNCHRONOUS_IO;
+ *valuep = _POSIX_ASYNCHRONOUS_IO;
goto out;
}
vp = fp->f_vnode;
if (vp != NULL) {
vn_lock(vp, LK_SHARED | LK_RETRY);
- error = VOP_PATHCONF(vp, name, td->td_retval);
+ error = VOP_PATHCONF(vp, name, valuep);
VOP_UNLOCK(vp, 0);
} else if (fp->f_type == DTYPE_PIPE || fp->f_type == DTYPE_SOCKET) {
if (name != _PC_PIPE_BUF) {
error = EINVAL;
} else {
- td->td_retval[0] = PIPE_BUF;
+ *valuep = PIPE_BUF;
error = 0;
}
} else {
Index: sys/kern/vfs_syscalls.c
===================================================================
--- sys/kern/vfs_syscalls.c
+++ sys/kern/vfs_syscalls.c
@@ -2384,8 +2384,14 @@
int
sys_pathconf(struct thread *td, struct pathconf_args *uap)
{
+ long value;
+ int error;
- return (kern_pathconf(td, uap->path, UIO_USERSPACE, uap->name, FOLLOW));
+ error = kern_pathconf(td, uap->path, UIO_USERSPACE, uap->name, FOLLOW,
+ &value);
+ if (error == 0)
+ td->td_retval[0] = value;
+ return (error);
}
#ifndef _SYS_SYSPROTO_H_
@@ -2397,14 +2403,19 @@
int
sys_lpathconf(struct thread *td, struct lpathconf_args *uap)
{
+ long value;
+ int error;
- return (kern_pathconf(td, uap->path, UIO_USERSPACE, uap->name,
- NOFOLLOW));
+ error = kern_pathconf(td, uap->path, UIO_USERSPACE, uap->name,
+ NOFOLLOW, &value);
+ if (error == 0)
+ td->td_retval[0] = value;
+ return (error);
}
int
kern_pathconf(struct thread *td, char *path, enum uio_seg pathseg, int name,
- u_long flags)
+ u_long flags, long *valuep)
{
struct nameidata nd;
int error;
@@ -2415,7 +2426,7 @@
return (error);
NDFREE(&nd, NDF_ONLY_PNBUF);
- error = VOP_PATHCONF(nd.ni_vp, name, td->td_retval);
+ error = VOP_PATHCONF(nd.ni_vp, name, valuep);
vput(nd.ni_vp);
return (error);
}
Index: sys/kern/vnode_if.src
===================================================================
--- sys/kern/vnode_if.src
+++ sys/kern/vnode_if.src
@@ -429,7 +429,7 @@
vop_pathconf {
IN struct vnode *vp;
IN int name;
- OUT register_t *retval;
+ OUT long *retval;
};
Index: sys/sys/syscallsubr.h
===================================================================
--- sys/sys/syscallsubr.h
+++ sys/sys/syscallsubr.h
@@ -111,7 +111,7 @@
int kern_fcntl_freebsd(struct thread *td, int fd, int cmd, long arg);
int kern_fhstat(struct thread *td, fhandle_t fh, struct stat *buf);
int kern_fhstatfs(struct thread *td, fhandle_t fh, struct statfs *buf);
-int kern_fpathconf(struct thread *td, int fd, int name);
+int kern_fpathconf(struct thread *td, int fd, int name, long *valuep);
int kern_fstat(struct thread *td, int fd, struct stat *sbp);
int kern_fstatfs(struct thread *td, int fd, struct statfs *buf);
int kern_fsync(struct thread *td, int fd, bool fullsync);
@@ -180,7 +180,7 @@
int kern_openat(struct thread *td, int fd, char *path,
enum uio_seg pathseg, int flags, int mode);
int kern_pathconf(struct thread *td, char *path, enum uio_seg pathseg,
- int name, u_long flags);
+ int name, u_long flags, long *valuep);
int kern_pipe(struct thread *td, int fildes[2], int flags,
struct filecaps *fcaps1, struct filecaps *fcaps2);
int kern_poll(struct thread *td, struct pollfd *fds, u_int nfds,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 29, 6:38 PM (5 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32296021
Default Alt Text
D13934.id38047.diff (7 KB)
Attached To
Mode
D13934: Use long for the last argument to VOP_PATHCONF rather than a register_t.
Attached
Detach File
Event Timeline
Log In to Comment