GNOME Bugzilla – Bug 639376
System info panel: wrong "Primary Disk" size info
Last modified: 2017-11-23 12:20:42 UTC
The "Primary Disk" size is actually the size of the root filesystem, not the size of the primary disk. Baobab gets it right (gnome-utils/baobab/src/baobab.c, get_filesystem_usage()) using libgtop (well, reading the code it looks it would get it wrong if I had multiple disks). Palimpset (from gnome-disk-utility) gets it right, I didn't look at the code.
Should be better in master.
*** Bug 651204 has been marked as a duplicate of this bug. ***
Created attachment 364266 [details] [review] info: use UDisks to retrieve disk size The current code relies on GLib API and uses the available mounts to calculate the available partition size. This is because this code assumes that more than one OS can be installed in the same drive, and wouldn't make sense to show the whole disk size in this situation. That, however, clashes with the general purpose of the panel, for it is meant to show general information about the user's computer, and it is not reporting the full disk size. https://bugzilla.gnome.org/show_bug.cgi?id=639376 Fix that by using the UDisks API to get the real size of the full disks.
Created attachment 364267 [details] [review] info: use UDisks to retrieve disk size Fixed commit message