Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144372327
D37967.id114801.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D37967.id114801.diff
View Options
diff --git a/stand/kboot/host_syscall.h b/stand/kboot/host_syscall.h
--- a/stand/kboot/host_syscall.h
+++ b/stand/kboot/host_syscall.h
@@ -46,6 +46,28 @@
#include "stat_arch.h"
+/*
+ * stat flags
+ * These are arch independent and match the values in nolib and uapi headers
+ * with HOST_ prepended.
+ */
+#define HOST_S_IFMT 0170000
+#define HOST_S_IFIFO 0010000
+#define HOST_S_IFCHR 0020000
+#define HOST_S_IFDIR 0040000
+#define HOST_S_IFBLK 0060000
+#define HOST_S_IFREG 0100000
+#define HOST_S_IFLNK 0120000
+#define HOST_S_IFSOCK 0140000
+
+#define HOST_S_ISBLK(mode) (((mode) & HOST_S_IFMT) == HOST_S_IFBLK)
+#define HOST_S_ISCHR(mode) (((mode) & HOST_S_IFMT) == HOST_S_IFCHR)
+#define HOST_S_ISDIR(mode) (((mode) & HOST_S_IFMT) == HOST_S_IFDIR)
+#define HOST_S_ISFIFO(mode) (((mode) & HOST_S_IFMT) == HOST_S_IFIFO)
+#define HOST_S_ISLNK(mode) (((mode) & HOST_S_IFMT) == HOST_S_IFLNK)
+#define HOST_S_ISREG(mode) (((mode) & HOST_S_IFMT) == HOST_S_IFREG)
+#define HOST_S_ISSOCK(mode) (((mode) & HOST_S_IFMT) == HOST_S_IFSOCK)
+
/*
* Constants for open, fcntl, etc
*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 9, 2:42 AM (17 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28527953
Default Alt Text
D37967.id114801.diff (1 KB)
Attached To
Mode
D37967: stand: Add macros for file types from stat
Attached
Detach File
Event Timeline
Log In to Comment