Page MenuHomeFreeBSD

D29431.diff
No OneTemporary

D29431.diff

diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -44,6 +44,7 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/dirent.h>
#include <sys/kernel.h>
#include <sys/capsicum.h>
#include <sys/fcntl.h>
@@ -747,6 +748,14 @@
return (0);
}
+/*
+ * Various filesystems expect to be able to copy a name component with length
+ * bounded by NAME_MAX into a directory entry buffer of size MAXNAMLEN. Make
+ * sure that these are the same size.
+ */
+_Static_assert(MAXNAMLEN == NAME_MAX,
+ "MAXNAMLEN and NAME_MAX have different values");
+
/*
* Search a pathname.
* This is a very central and rather complicated routine.

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 10, 3:02 AM (21 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23515666
Default Alt Text
D29431.diff (712 B)

Event Timeline