Page MenuHomeFreeBSD

linux: add trivial renameat2 implementation
ClosedPublic

Authored by emaste on Tue, Sep 10, 5:53 PM.

Details

Summary

Just return EINVAL if flags != 0. The Linux man page documents one case of EINVAL as "The filesystem does not support one of the flags in flags."

After rS351723 userland binaries will try using new system calls.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

emaste created this revision.Tue, Sep 10, 5:53 PM
emaste updated this revision to Diff 61898.Tue, Sep 10, 5:54 PM

upload proper diff

mjg accepted this revision.Tue, Sep 10, 5:56 PM
mjg added inline comments.
sys/compat/linux/linux_file.c
712 ↗(On Diff #61897)

I would add a rate check here to prevent spamming. You can find sample code in falloc_noinstall. It's literally few lines, but it's not a hard requirement.

This revision is now accepted and ready to land.Tue, Sep 10, 5:56 PM

Wait, this doesn't work.

emaste updated this revision to Diff 61900.Tue, Sep 10, 6:39 PM

make linux_renameat pass through to linux_renameat2

This revision now requires review to proceed.Tue, Sep 10, 6:39 PM
emaste updated this revision to Diff 61902.Tue, Sep 10, 6:59 PM

use c99 initializers suggested by mjg

mjg accepted this revision.Tue, Sep 10, 7:05 PM
mjg added inline comments.
sys/compat/linux/linux_file.c
694 ↗(On Diff #61902)

}; should be on a new line

This revision is now accepted and ready to land.Tue, Sep 10, 7:05 PM
trasz accepted this revision.Wed, Sep 11, 9:30 AM
This revision was automatically updated to reflect the committed changes.