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 639376 - System info panel: wrong "Primary Disk" size info
System info panel: wrong "Primary Disk" size info
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Other Preferences
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 651204 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-01-12 22:30 UTC by Frederic Peters
Modified: 2017-11-23 12:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
info: use UDisks to retrieve disk size (8.38 KB, patch)
2017-11-23 12:18 UTC, Georges Basile Stavracas Neto
none Details | Review
info: use UDisks to retrieve disk size (8.38 KB, patch)
2017-11-23 12:20 UTC, Georges Basile Stavracas Neto
none Details | Review

Description Frederic Peters 2011-01-12 22:30:46 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.
Comment 1 William Jon McCann 2011-01-19 00:29:11 UTC
Should be better in master.
Comment 2 Bastien Nocera 2011-07-11 08:49:01 UTC
*** Bug 651204 has been marked as a duplicate of this bug. ***
Comment 3 Georges Basile Stavracas Neto 2017-11-23 12:18:08 UTC
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.
Comment 4 Georges Basile Stavracas Neto 2017-11-23 12:20:42 UTC
Created attachment 364267 [details] [review]
info: use UDisks to retrieve disk size

Fixed commit message