diff options
| author | Garrett Wollman <wollman@FreeBSD.org> | 2002-10-27 18:07:41 +0000 |
|---|---|---|
| committer | Garrett Wollman <wollman@FreeBSD.org> | 2002-10-27 18:07:41 +0000 |
| commit | c7047e5204bac1099401fdb895c5986fcb218d9c (patch) | |
| tree | 2822b6cd0c488f5c61a84aca6c46f88a41665440 /sys/kern/vfs_extattr.c | |
| parent | 7303fe0613d03615222d2bd0648dc2e9dbc71d07 (diff) | |
Notes
Diffstat (limited to 'sys/kern/vfs_extattr.c')
| -rw-r--r-- | sys/kern/vfs_extattr.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 6e2aa6bb9725..55aea6e9dd65 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -93,6 +93,14 @@ int (*union_dircheckp)(struct thread *td, struct vnode **, struct file *); int (*softdep_fsync_hook)(struct vnode *); /* + * The module initialization routine for POSIX asynchronous I/O will + * set this to the version of AIO that it implements. (Zero means + * that it is not implemented.) This value is used here by pathconf() + * and in kern_descrip.c by fpathconf(). + */ +int async_io_version; + +/* * Sync each mounted filesystem. */ #ifndef _SYS_SYSPROTO_H_ @@ -1823,7 +1831,12 @@ pathconf(td, uap) if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); - error = VOP_PATHCONF(nd.ni_vp, SCARG(uap, name), td->td_retval); + + /* If asynchronous I/O is available, it works for all files. */ + if (uap->name == _PC_ASYNC_IO) + td->td_retval[0] = async_io_version; + else + error = VOP_PATHCONF(nd.ni_vp, uap->name, td->td_retval); vput(nd.ni_vp); return (error); } |
