lkml.org 
[lkml]   [2017]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Linux & FAT32 label
On Sun, Nov 5, 2017 at 4:34 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> On Sunday 05 November 2017 16:25:54 Andy Shevchenko wrote:
>> On Sun, Nov 5, 2017 at 4:07 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
>> > On Sunday 05 November 2017 15:56:53 Andy Shevchenko wrote:
>> >> On Sun, Nov 5, 2017 at 3:39 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
>> >> > On Tuesday 31 October 2017 10:35:48 Andy Shevchenko wrote:

>> >> > I did tests with MS-DOS and Windows versions (results in previous
>> >> > email), and they seems to be compatible how they read label.
>> >> >
>> >> > Based on results I would suggest to ignore label from the boot sector
>> >> > when reading label.
>> >>
>> >> So, for tools which are not doing that to add
>> >>
>> >> --ignore-boot-sector-label (or alike) [recommended]
>> >>
>> >> right?
>> >>
>> >> We don't actually know how many users (scripts) are relying on current
>> >> behaviour.
>> >> If there are only few, we may introduce backward compatibility switch
>> >>
>> >> --read-boot-sector-label

>> > And what to do with blkid? That cannot have any switch :-( and can have
>> > only one behavior.
>>
>> Btw, I don't see such tool in Debian unstable. Do you mean libblkid ?
>> lsblk OTOH has switches.
>
> https://packages.debian.org/search?suite=sid&arch=any&mode=path&searchon=contents&keywords=blkid
>
> In Debian unstable, that tool is in binary package util-linux.

Found, it required me to be root or use full path.

In comparison lsblk might output partition label and FS label.

Looking to blkid help

-L, --label label
Look up the device that uses this filesystem label;
this is equal to --list-one --output device
--match-token LABEL=label.

So, it can be PARTLABEL as well?

What the difference of LABEL vs. PARTLABEL for FAT?

> But you are right that implementation is in library libblkid and there
> is no interface between blkid binary and libblkid for passing such
> compatibility switches.
>
> Also more application would use directly libblkid library and not blkid
> binary...

Among other blkid manual has:

...lsblk(8) is also easy to use in scripts. blkid is mostly designed
for system services and to test libblkid functionality.

which makes me think that we could just change it's behaviour to be sane.

OTOH libblkid is a root of such behaviour.

> And I would say that Karel (as maintainer of the util-linux upstream
> project) does not want to see such switch in blkid just for FAT
> partitions.

For me sane (default) behaviour in this case is to follow what windoze
/ dos does in most (default) cases.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2017-11-05 15:52    [W:0.113 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site