coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] rm: add --preserve-root=all to protect mounts


From: Pádraig Brady
Subject: Re: [PATCH] rm: add --preserve-root=all to protect mounts
Date: Sun, 17 Jun 2018 21:41:49 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 17/06/18 21:16, Jim Meyering wrote:
> On Sun, Jun 17, 2018 at 8:44 PM, Pádraig Brady <address@hidden> wrote:
>> I'll apply the attached full patch soon.
> 
> Thanks for doing all that. I like it.
> One nit: this says "on a separate device":
> 
> +      --preserve-root[=all]  do not remove '/' (default); with 'all', skip\n\
> +                              any command line argument on a separate 
> device\n\
> 
> Perhaps it should say something like "on a separate device from its
> parent" ? Otherwise, one might erroneously interpret "separate" as
> meaning "different from the device of other command line arguments".
> 
> I wondered how the code tested for this attribute, and had to read the
> code to find that it stats both the command-line argument, A, and
> "A/..", and if they have different device IDs, then A is eligible to
> be skipped when this new option is in effect.

Yes the texinfo mentions the parent.
I'll expand --help to mention that also:

  --preserve-root[=all]  do not remove '/' (default);
                          with 'all', skip any command line argument
                          on a separate device from its parent

cheers,
Pádraig




reply via email to

[Prev in Thread] Current Thread [Next in Thread]