svn commit: r314882 - head/sys/boot/common

Conrad Meyer cem at FreeBSD.org
Tue Mar 7 21:40:03 UTC 2017


Author: cem
Date: Tue Mar  7 21:40:01 2017
New Revision: 314882
URL: https://svnweb.freebsd.org/changeset/base/314882

Log:
  ufsread: Use appropriate UFS_MAXNAMLEN constant
  
  A follow-up to r313475.
  
  Submitted by:	Gaurav Gangalwar <Gaurav.Gangalwar at emc.com>
  Sponsored by:	Dell EMC Isilon

Modified:
  head/sys/boot/common/ufsread.c

Modified: head/sys/boot/common/ufsread.c
==============================================================================
--- head/sys/boot/common/ufsread.c	Tue Mar  7 20:59:49 2017	(r314881)
+++ head/sys/boot/common/ufsread.c	Tue Mar  7 21:40:01 2017	(r314882)
@@ -121,7 +121,7 @@ fsfind(const char *name, ufs_ino_t * ino
 static ufs_ino_t
 lookup(const char *path)
 {
-	static char name[MAXNAMLEN + 1];
+	static char name[UFS_MAXNAMLEN + 1];
 	const char *s;
 	ufs_ino_t ino;
 	ssize_t n;
@@ -135,7 +135,7 @@ lookup(const char *path)
 		if (!*path)
 			break;
 		for (s = path; *s && *s != '/'; s++);
-		if ((n = s - path) > MAXNAMLEN)
+		if ((n = s - path) > UFS_MAXNAMLEN)
 			return 0;
 		ls = *path == '?' && n == 1 && !*s;
 		memcpy(name, path, n);


More information about the svn-src-all mailing list