From owner-svn-src-all@freebsd.org Wed Apr 5 01:44:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC6A1D2E283; Wed, 5 Apr 2017 01:44:04 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCACE91D; Wed, 5 Apr 2017 01:44:04 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v351i3JW092981; Wed, 5 Apr 2017 01:44:03 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v351i3N4092979; Wed, 5 Apr 2017 01:44:03 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201704050144.v351i3N4092979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 5 Apr 2017 01:44:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316509 - in head/sys/ufs: ffs ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Apr 2017 01:44:05 -0000 Author: cem Date: Wed Apr 5 01:44:03 2017 New Revision: 316509 URL: https://svnweb.freebsd.org/changeset/base/316509 Log: ufs: Export UFS_MAXNAMLEN to pathconf, statfs Rather than the global NAME_MAX constant. This change is required to support systems with a NAME_MAX/MAXNAMLEN that differs from UFS_MAXNAMLEN. This was missed in r313475 due to the alternative spelling ("NAME_MAX") of MAXNAMLEN. This change is also similar in spirit to r313780. Reported by: ngie@ Sponsored by: Dell EMC Isilon Modified: head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Tue Apr 4 23:30:05 2017 (r316508) +++ head/sys/ufs/ffs/ffs_vfsops.c Wed Apr 5 01:44:03 2017 (r316509) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -1434,7 +1435,7 @@ ffs_statfs(mp, sbp) sbp->f_files = fs->fs_ncg * fs->fs_ipg - UFS_ROOTINO; sbp->f_ffree = fs->fs_cstotal.cs_nifree + fs->fs_pendinginodes; UFS_UNLOCK(ump); - sbp->f_namemax = NAME_MAX; + sbp->f_namemax = UFS_MAXNAMLEN; return (0); } Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Tue Apr 4 23:30:05 2017 (r316508) +++ head/sys/ufs/ufs/ufs_vnops.c Wed Apr 5 01:44:03 2017 (r316509) @@ -2446,7 +2446,7 @@ ufs_pathconf(ap) *ap->a_retval = LINK_MAX; break; case _PC_NAME_MAX: - *ap->a_retval = NAME_MAX; + *ap->a_retval = UFS_MAXNAMLEN; break; case _PC_PATH_MAX: *ap->a_retval = PATH_MAX;