From 61d53d8fce597670a475e3b5e8c26cc4d44c63f9 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 2 Oct 2017 23:31:11 +0000 Subject: [PATCH] Flesh out pathconf() on UDF. - Return 64 bits for _PC_FILESIZEBITS. - Handle _PC_SYMLINK_MAX. - Defer _PC_PATH_MAX to vop_stdpathconf(). Sponsored by: Chelsio Communications --- sys/fs/udf/udf_vnops.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c index 7432283b8591..9d3863bbd8dd 100644 --- a/sys/fs/udf/udf_vnops.c +++ b/sys/fs/udf/udf_vnops.c @@ -383,20 +383,23 @@ udf_pathconf(struct vop_pathconf_args *a) { switch (a->a_name) { + case _PC_FILESIZEBITS: + *a->a_retval = 64; + return (0); case _PC_LINK_MAX: *a->a_retval = 65535; return (0); case _PC_NAME_MAX: *a->a_retval = NAME_MAX; return (0); - case _PC_PATH_MAX: - *a->a_retval = PATH_MAX; + case _PC_SYMLINK_MAX: + *a->a_retval = MAXPATHLEN; return (0); case _PC_NO_TRUNC: *a->a_retval = 1; return (0); default: - return (EINVAL); + return (vop_stdpathconf(a)); } }