[Top][All Lists]

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

Re: Coreutils enhancement: ls: add colorization of mountpoints

From: Dragan Simic
Subject: Re: Coreutils enhancement: ls: add colorization of mountpoints
Date: Wed, 18 Oct 2023 09:10:51 +0200

On 2023-10-18 07:57, Parke wrote:
On 10/17/23 12:05, Parke wrote:
> If bind mounts get their own st_dev device id (and they probably do?),
> then they would be colored the same as mountpoints.  In my opinion,
> this is expected and desired.

They do not, but if it's a bind mount from a different filesystem you would color it as a mount point, and if it's a bind mount from elsewhere within the
same filesystem you would not, introducing more inconsistent behavior.


Quite frankly, as the person who proposes a new feature to be introduced, which also isn't straightforward, you should be doing more research yourself. Please, don't get me wrong, I'm just trying to help by describing the usual way new features are proposed.

and under that implementation
wouldn't -L  make symlinks show up as mount points?

Without additional checking (i.e. additional calls to stat() and/or
lstat(), and maybe realpath()), a symlink to a path on a different
filesystem would appear as a mountpoint.

One option would be to disable all colorization of mountpoints when -L
is specified.  (More inconsistent behavior?)

Just as you described, that would introduce inconsistent behavior and would simply be unacceptable.

reply via email to

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