Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162382447
D21590.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D21590.diff
View Options
Index: head/sys/amd64/linux/linux_dummy.c
===================================================================
--- head/sys/amd64/linux/linux_dummy.c
+++ head/sys/amd64/linux/linux_dummy.c
@@ -130,8 +130,6 @@
DUMMY(finit_module);
DUMMY(sched_setattr);
DUMMY(sched_getattr);
-/* Linux 3.14: */
-DUMMY(renameat2);
/* Linux 3.15: */
DUMMY(seccomp);
DUMMY(memfd_create);
Index: head/sys/amd64/linux32/linux32_dummy.c
===================================================================
--- head/sys/amd64/linux32/linux32_dummy.c
+++ head/sys/amd64/linux32/linux32_dummy.c
@@ -137,8 +137,6 @@
DUMMY(finit_module);
DUMMY(sched_setattr);
DUMMY(sched_getattr);
-/* Linux 3.14: */
-DUMMY(renameat2);
/* Linux 3.15: */
DUMMY(seccomp);
DUMMY(memfd_create);
Index: head/sys/arm64/linux/linux_dummy.c
===================================================================
--- head/sys/arm64/linux/linux_dummy.c
+++ head/sys/arm64/linux/linux_dummy.c
@@ -130,8 +130,6 @@
DUMMY(finit_module);
DUMMY(sched_setattr);
DUMMY(sched_getattr);
-/* Linux 3.14: */
-DUMMY(renameat2);
/* Linux 3.15: */
DUMMY(seccomp);
DUMMY(memfd_create);
Index: head/sys/compat/linux/linux_file.c
===================================================================
--- head/sys/compat/linux/linux_file.c
+++ head/sys/compat/linux/linux_file.c
@@ -686,8 +686,28 @@
int
linux_renameat(struct thread *td, struct linux_renameat_args *args)
{
+ struct linux_renameat2_args renameat2_args = {
+ .olddfd = args->olddfd,
+ .oldname = args->oldname,
+ .newdfd = args->newdfd,
+ .newname = args->newname,
+ .flags = 0
+ };
+
+ return (linux_renameat2(td, &renameat2_args));
+}
+
+int
+linux_renameat2(struct thread *td, struct linux_renameat2_args *args)
+{
char *from, *to;
int error, olddfd, newdfd;
+
+ if (args->flags != 0) {
+ linux_msg(td, "renameat2 unsupported flags 0x%x\n",
+ args->flags);
+ return (EINVAL);
+ }
olddfd = (args->olddfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->olddfd;
newdfd = (args->newdfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->newdfd;
Index: head/sys/i386/linux/linux_dummy.c
===================================================================
--- head/sys/i386/linux/linux_dummy.c
+++ head/sys/i386/linux/linux_dummy.c
@@ -134,8 +134,6 @@
DUMMY(sched_setattr);
DUMMY(sched_getattr);
/* Linux 3.14: */
-DUMMY(renameat2);
-/* Linux 3.15: */
DUMMY(seccomp);
DUMMY(memfd_create);
/* Linux 3.18: */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jul 13, 5:14 PM (7 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35039374
Default Alt Text
D21590.diff (2 KB)
Attached To
Mode
D21590: linux: add trivial renameat2 implementation
Attached
Detach File
Event Timeline
Log In to Comment