After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 789933 - gio has msdos instead of fat fs type
gio has msdos instead of fat fs type
Status: RESOLVED NOTABUG
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
: 607095 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-11-05 12:07 UTC by jg
Modified: 2017-11-06 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (293 bytes, patch)
2017-11-05 12:07 UTC, jg
none Details | Review
msdos (50.94 KB, image/png)
2017-11-05 12:08 UTC, jg
  Details

Description jg 2017-11-05 12:07:23 UTC
https://gitlab.gnome.org/GNOME/nautilus/issues/98#note_7975

omething out of date, a FAT32 formated USB stick is shown as msdos? msdos would conventionally be FAT12, or FAT16 which are no longer in use from the MS-DOS era up to 6.22

Can it be changed to a regular "fat" ?

I'll attach a screenshot and patch to fix.

MS-DOS didn't support any 32GB USB storage....

eg:

/dev/sdb1 on /media/jonny/ESD-USB type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1  *     2048 61767679 61765632 29.5G  c W95 FAT32 (LBA)
Comment 1 jg 2017-11-05 12:07:59 UTC
Created attachment 363007 [details] [review]
Patch
Comment 2 jg 2017-11-05 12:08:38 UTC
Created attachment 363008 [details]
msdos
Comment 3 Philip Withnall 2017-11-06 11:21:16 UTC
I’m not sure there’s a bug here. The GLib code here is returning an arbitrary string identifier for the magic bytes in the file system superblock, as returned by the kernel. This is not meant to be human-readable, and Nautilus shouldn’t be displaying it in the UI.

If it would make it easier for Nautilus to display a human-readable string in the UI, we could expose more information from statfs() as GFile attributes. Please open a separate bug about that if you come up with specific API additions to propose. Thanks.
Comment 4 Philip Withnall 2017-11-06 11:21:42 UTC
*** Bug 607095 has been marked as a duplicate of this bug. ***
Comment 5 jg 2017-11-06 15:32:04 UTC
Hi Philip

If FAT16 and FAT32 from the man page are called that, it is better Gnome reflects that. "MSDOS" isn't what the man page uses, and MSDOS is a trademark.
Comment 6 jg 2017-11-06 15:44:32 UTC
If we look at what "mount" command shows, it is "vfat" so that would be fine too. At the moment it is just misleading, because MSDOS means it is a retrained 8.3 format filenames FS.
Comment 7 jg 2017-11-06 15:51:10 UTC
**restrained
Comment 8 Philip Withnall 2017-11-06 15:53:45 UTC
Sure, Nautilus should definitely not be showing ‘msdos’ in the interface, but that’s a Nautilus bug, not a GLib bug. Nautilus is showing an internal non-human-readable identifier.
Comment 9 Philip Withnall 2017-11-06 15:57:57 UTC
I’ve commented on https://gitlab.gnome.org/GNOME/nautilus/issues/98#note_8057.
Comment 10 jg 2017-11-06 16:03:34 UTC
Hi

Also, can the comment be clarified?

from:
/* filesystem ids taken from linux manpage */

to:
/* filesystem ids taken from linux statfs(2) manpage */


Re the main point

yes, "magic.h" does contain:
MSDOS_SUPER_MAGIC	0x4d44
^ That is the two byte "MD" magic.

But nowadays these discs (USB, HDD etc) are are all FAT16 of FAT32. I can't imagine anyone is using any MSDOS disks? And for those few users, FAT is also understandable.

Can it not be clarified?

It seems a shame, if Nautilus needs to have a check if "msdos" and change it to "fat" right? these tags are meant to be human understandable... which is why they are unique strings.
Comment 11 António Fernandes 2017-11-06 16:11:58 UTC
Thanks for the feedback, Philip.

kg, GIO is not lying about the kernel information, "msdos" is used in the kernel source a lot https://github.com/torvalds/linux/blob/master/include/uapi/linux/msdos_fs.h

Nautilus is asking the wrong question and thus showing the user the wrong answer.
Comment 12 jg 2017-11-06 16:16:38 UTC
I wonder if Nautilus have access to a userfriendly name? (ie FAT) Rather than the superblock magic codes?