GNOME Bugzilla – Bug 789933
gio has msdos instead of fat fs type
Last modified: 2017-11-06 16:16:38 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)
Created attachment 363007 [details] [review] Patch
Created attachment 363008 [details] msdos
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.
*** Bug 607095 has been marked as a duplicate of this bug. ***
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.
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.
**restrained
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.
I’ve commented on https://gitlab.gnome.org/GNOME/nautilus/issues/98#note_8057.
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.
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.
I wonder if Nautilus have access to a userfriendly name? (ie FAT) Rather than the superblock magic codes?