Re: [Differential] D20584: add a linux compatible copy_file_range(2) syscall

From: Rick Macklem <rmacklem_at_uoguelph.ca>
Date: Fri, 5 Jul 2019 15:27:56 +0000
jilles wrote in copy_file_range.2:99
> The Linux man page (from http://man7.org/linux/man->pages/man2/copy_file_range.2.html ) says that a non-zero flags argument will cause >the call to return an [EINVAL] error. I think that is better than ignoring the argument >completely since it allows adding flags more safely (since there will not be existing >applications that pass in, for example, uninitialized data as flags).

The fun part is that the Linux folks are already discussing adding flags.
I don't know if they are already in Linux-next (or whatever they call their next
release), but it sounded like they were headed that way.

As such, I thought ignoring "flags" would be easier than returning EINVAL for
code that works on Linux.

However, I can see the counter argument, which is "returning EINVAL will
indicate that the Linux flag isn't used on FreeBSD", so that developers will
become aware of that.

What do others think w.r.t. which is the better approach? rick
Received on Fri Jul 05 2019 - 13:28:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:21 UTC