[pbs-devel] [PATCH proxmox v2] sys: file: use renameat2() from `nix` crate
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Jul 18 14:19:05 CEST 2024
Am 18/07/2024 um 14:13 schrieb Christian Ebner:
> On 7/18/24 14:03, Thomas Lamprecht wrote:
>> Am 18/07/2024 um 13:19 schrieb Christian Ebner:
>>> Partially my fault, as I overlooked in my suggestion that linkat() does not accept `AtFlags` in version 0.26.1 just yet [0].
>>> The suggested replacement type is however already there, but the module namespace is incorrect in the patch. Should have been [1].
>>>
>>> [0] https://docs.rs/nix/0.26.1/nix/unistd/fn.linkat.html
>>> [1] https://docs.rs/nix/0.26.1/nix/fcntl/struct.AtFlags.html
>>>
>>
>> The type is there, but isn't accepted by `nix::unistd::linkat`, nor is there
>> a variant of that method that would accept it in this version FWICS.
>
> No, there is not, this will not work with nix v0.26.1 as my suggestion
> was wrong. Just wanted to mention that I did overlook this when
> suggesting this to Christoph. So I guess it is best to apply v1 and only
> later on replace the type, when using nix version >= v0.28
>
> Sorry if I caused noise, should have tested this myself before even
> replying to the v1 :(
Nah, suggesting things is definitely okay, even encouraged, no worries
here.
Ultimately, both the patch author (first in line) and the maintainer
applying the patch (last in line) are responsible for verifying its
merit and feasibility in the actual environment to which it would be
applied to and compiled/executed in.
More information about the pbs-devel
mailing list