diff options
author | tjr <tjr@FreeBSD.org> | 2003-03-05 10:23:51 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2003-03-05 10:23:51 +0000 |
commit | d259328b0f41056adb67cdef1913368c5c10b705 (patch) | |
tree | 99cf3253bdaf95c68c66e593fbfd3b94d2294aae /sys/coda | |
parent | 2f065a9318354222fb04a5e83394e3f5b9a81dc2 (diff) | |
download | FreeBSD-src-d259328b0f41056adb67cdef1913368c5c10b705.zip FreeBSD-src-d259328b0f41056adb67cdef1913368c5c10b705.tar.gz |
Add a minimal implementation of VOP_PATHCONF to silence warning
messages from ls(1).
Diffstat (limited to 'sys/coda')
-rw-r--r-- | sys/coda/coda_vnops.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/sys/coda/coda_vnops.c b/sys/coda/coda_vnops.c index caa4738..2ae8965 100644 --- a/sys/coda/coda_vnops.c +++ b/sys/coda/coda_vnops.c @@ -59,6 +59,7 @@ #include <sys/namei.h> #include <sys/proc.h> #include <sys/uio.h> +#include <sys/unistd.h> #include <vm/vm.h> #include <vm/vm_object.h> @@ -138,7 +139,7 @@ struct vnodeopv_entry_desc coda_vnodeop_entries[] = { { &vop_strategy_desc, coda_strategy }, /* strategy */ { &vop_print_desc, coda_vop_error }, /* print */ { &vop_islocked_desc, coda_islocked }, /* islocked */ - { &vop_pathconf_desc, coda_vop_error }, /* pathconf */ + { &vop_pathconf_desc, coda_pathconf }, /* pathconf */ { &vop_advlock_desc, coda_vop_nop }, /* advlock */ { &vop_lease_desc, coda_vop_nop }, /* lease */ { &vop_poll_desc, (vop_t *) vop_stdpoll }, @@ -1977,3 +1978,30 @@ make_coda_node(fid, vfsp, type) return cp; } + +int +coda_pathconf(v) + void *v; +{ + struct vop_pathconf_args *ap; + int error; + int *retval; + + ap = v; + retval = ap->a_retval; + error = 0; + + switch (ap->a_name) { + case _PC_NAME_MAX: + *retval = CODA_MAXNAMLEN; + break; + case _PC_PATH_MAX: + *retval = CODA_MAXPATHLEN; + break; + default: + error = vop_stdpathconf(ap); + break; + } + + return (error); +} |