Date: Sun, 27 Sep 2020 13:49:19 +0000 From: "Wall, Stephen" <stephen.wall@redcom.com> To: Rick Macklem <rmacklem@uoguelph.ca>, FreeBSD Hackers <freebsd-hackers@freebsd.org>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org> Subject: Re: RFC: should copy_file_range(2) remain Linux compatible or support special files? Message-ID: <MN2PR09MB487615BB0445AA7F9BC91066EE340@MN2PR09MB4876.namprd09.prod.outlook.com> In-Reply-To: <YTBPR01MB39663AB569A9B0EB8FF889F7DD340@YTBPR01MB3966.CANPRD01.PROD.OUTLOOK.COM> References: <YTBPR01MB3966966F82008C9E471708FCDD370@YTBPR01MB3966.CANPRD01.PROD.OUTLOOK.COM>, <MN2PR09MB4876F76163F8DA9276486AF9EE340@MN2PR09MB4876.namprd09.prod.outlook.com>, <YTBPR01MB39663AB569A9B0EB8FF889F7DD340@YTBPR01MB3966.CANPRD01.PROD.OUTLOOK.COM>
next in thread | previous in thread | raw e-mail | index | archive | help
=0A= > I'll assume you are referring to the "flags" argument when you say "param= " above.=0A= =0A= Correct, I was misremembering the man page.=0A= =0A= > However, since the Linux man page says it will return EINVAL if=0A= > the "flags" argument is non-zero, you've still introduced an incompatibil= ity=0A= > w.r.t. the Linux behaviour.=0A= =0A= This would be a one-way incompatibility, i.e. code written on linux will ru= n unaltered on FreeBSD.=0A= If the flag were along the lines of `FREEBSD_COPY_DEVICES` (or whatever, im= portant part is `FREEBSD`) it will be quite obvious that this code needs to= be adapted to other platforms:=0A= ```=0A= #ifndef FREEBSD_COPY_DEVICES=0A= #define FREEBSD_COPY_DEVICES 0=0A= #endif=0A= ```=0A= =0A= > Why require extra work for so little purpose?=0A= =0A= I'm sorry, I'm not sure what extra work you are referring to.=A0 Specifying= a flag on copy_file_range(2)?=A0 That's trivial.=0A= =0A= > My opinion is that if we can make it work for character devices, we shoul= d. =0A= =0A= Well, collecting opinions was the point, no? :)=0A= =0A= What's going to use this function besides system commands?=A0 I think I saw= `cp` and `dd` mentioned - I think it unlikely you need to be concerned abo= ut their portability.=0A= =0A= -spw=0A= =0A=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?MN2PR09MB487615BB0445AA7F9BC91066EE340>