Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144432947
D21606.id61934.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
D21606.id61934.diff
View Options
Index: sys/compat/linux/linux_file.h
===================================================================
--- sys/compat/linux/linux_file.h
+++ sys/compat/linux/linux_file.h
@@ -127,4 +127,11 @@
#define LINUX_F_UNLCK 2
#endif
+/*
+ * renameat2 flags
+ */
+#define LINUX_RENAME_NOREPLACE 0x00000001
+#define LINUX_RENAME_EXCHANGE 0x00000002
+#define LINUX_RENAME_WHITEOUT 0x00000004
+
#endif /* !_LINUX_FILE_H_ */
Index: sys/compat/linux/linux_file.c
===================================================================
--- sys/compat/linux/linux_file.c
+++ sys/compat/linux/linux_file.c
@@ -704,6 +704,13 @@
int error, olddfd, newdfd;
if (args->flags != 0) {
+ if (args->flags & ~(LINUX_RENAME_EXCHANGE |
+ LINUX_RENAME_NOREPLACE | LINUX_RENAME_WHITEOUT))
+ return (EINVAL);
+ if (args->flags & LINUX_RENAME_EXCHANGE &&
+ args->flags & (LINUX_RENAME_NOREPLACE |
+ LINUX_RENAME_WHITEOUT))
+ return (EINVAL);
linux_msg(td, "renameat2 unsupported flags 0x%x\n",
args->flags);
return (EINVAL);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 9, 10:17 AM (8 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28567359
Default Alt Text
D21606.id61934.diff (1 KB)
Attached To
Mode
D21606: linux_renameat2: improve flag checks
Attached
Detach File
Event Timeline
Log In to Comment