Corinna Vinschen wrote:
On Nov 17 15:39, Christian Franke wrote:
The last two /dev/disk subdirectories :-)
Note a minor difference: On Linux, empty /dev/disk subdirectories apparently
never appear. A subdirectory is not listed in /dev/disk if it would be
empty. Not worth the effort to emulate.
Agreed. This is really great. I just pushed your patch.
However, there's something strange in terms of by-label:
I have two partitions with labels:
$ ls -l /dev/disk/by-label
total 0
lrwxrwxrwx 1 corinna vinschen 0 Nov 17 17:18 blub -> ../../sda3
lrwxrwxrwx 1 corinna vinschen 0 Nov 17 17:18 blub2 -> ../../sdb2
$
Now I change the label of sdb2 to the same "blub" string as on sda3:
$ ls -l /dev/disk/by-label
total 0
$
I'd expected to see only one, due to the name collision, but en empty
dir is a bit surprising... And it may occur more often than not, given
that the default label "New_Volume" probably won't get changed very
often.
This is intentional and inherited from the very first patch, see the
loop behind qsort(). If a range of identical names appear, all these
entries are removed. If some "random" entry would be kept, it might no
longer be the persistent link the user expects. We could possibly add
some hash like done for by-id or append a number in such cases later.
Need some more time to thing about it....
I will sent a patch for the new-features doc soon.
Christian