Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths

2024-03-02 Thread Pádraig Brady
On 02/03/2024 01:41, Rob Landley wrote: On 3/1/24 05:05, Petr Malat wrote: Hi! On Fri, Mar 01, 2024 at 09:18:31AM +, Padraig Brady wrote: On 29/02/2024 22:02, Petr Malat wrote: renameat2() syscall allows atomically swapping 2 paths on one file system. Expose this ability to the user using

Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths

2024-03-02 Thread Dominique Martinet
Thanks for remembering me; didn't try the patch yet but overall looks good to me. Just one nitpick on the not supported message check: Pádraig Brady wrote on Sat, Mar 02, 2024 at 11:01:42AM +: > + if (renameatu (AT_FDCWD, file[0], AT_FDCWD, file[1], > +

Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths

2024-03-02 Thread Pádraig Brady
On 02/03/2024 12:46, Dominique Martinet wrote: Thanks for remembering me; didn't try the patch yet but overall looks good to me. Just one nitpick on the not supported message check: Pádraig Brady wrote on Sat, Mar 02, 2024 at 11:01:42AM +: + if (renameatu (AT_FDCWD, file[0], AT_FDCWD,

Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths

2024-03-02 Thread Rob Landley
On 3/2/24 05:01, Pádraig Brady wrote: > Ok so there seems to be a bit of consensus for adding this to mv. ... > So how about -x,--swap as the short and long options? Works for me. > Should we add this to install(1) ? No opinion. Rob

Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths

2024-03-02 Thread Petr Malat
Hi! On Sat, Mar 02, 2024 at 11:01:42AM +, Padraig Brady wrote: > > > I have modified mv, because for me it would be a logical place where > > > to look for such a feature, and to make something usable, it must be > > > easy to find. > > > > I used "mv -x" for it, but if you have a strong prefe

Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths

2024-03-02 Thread Petr Malat
On Sat, Mar 02, 2024 at 01:59:31PM +, P??draig Brady wrote: > On 02/03/2024 12:46, Dominique Martinet wrote: > > > > Thanks for remembering me; didn't try the patch yet but overall looks > > good to me. > > > > Just one nitpick on the not supported message check: > > P??draig Brady wrote on S