Page MenuHomeFreeBSD

D51118.diff
No OneTemporary

D51118.diff

diff --git a/lib/libc/gen/opendir2.c b/lib/libc/gen/opendir2.c
--- a/lib/libc/gen/opendir2.c
+++ b/lib/libc/gen/opendir2.c
@@ -243,20 +243,18 @@
return (true);
}
+/*
+ * Return true if the file descriptor is associated with a file from a
+ * union file system or from a file system mounted with the union flag.
+ */
static bool
is_unionstack(int fd)
{
- int unionstack;
-
- unionstack = _fcntl(fd, F_ISUNIONSTACK, 0);
- if (unionstack != -1)
- return (unionstack);
-
/*
- * Should not happen unless running on a kernel without the op,
- * but no use rendering the system useless in such a case.
+ * This call shouldn't fail, but if it does, just assume that the
+ * answer is no.
*/
- return (0);
+ return (_fcntl(fd, F_ISUNIONSTACK, 0) > 0);
}
/*

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 17, 12:45 AM (14 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31630982
Default Alt Text
D51118.diff (771 B)

Event Timeline