diff options
author | Jonh Wendell <jonh.wendell@intel.com> | 2013-07-22 16:15:57 -0300 |
---|---|---|
committer | Jonh Wendell <jonh.wendell@intel.com> | 2013-07-23 09:05:42 -0300 |
commit | 611eb340289fcb416f766e4acedfbfdcaaa2ceed (patch) | |
tree | 45a6c09c1115949ef11992a678f583387dfa7956 | |
parent | 30faa5e1d98bf2b19de142515466957a43b160cc (diff) | |
download | gnome-control-center-611eb340289fcb416f766e4acedfbfdcaaa2ceed.tar.gz |
info: show disk info even if there's no /etc/fstab file
the g_unix_mount_points_get() function checks for entry mount
points. if there are none, it returns NULL and we end up showing
no information about disks.
if that's the case, this patch calls g_unix_mounts_get() which
checks for mounted filesystems in /etc/mtab.
also we need to update the list of ignored filesystems to
include rootfs, which is always present and is a duplicate of
an actual filesystem mount point.
https://bugzilla.gnome.org/show_bug.cgi?id=704702
-rw-r--r-- | panels/info/cc-info-panel.c | 5 | ||||
-rw-r--r-- | panels/info/gsd-disk-space-helper.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c index 1f7954000..c863f1fb5 100644 --- a/panels/info/cc-info-panel.c +++ b/panels/info/cc-info-panel.c @@ -608,6 +608,11 @@ get_primary_disc_info (CcInfoPanel *self) GList *p; points = g_unix_mount_points_get (NULL); + + /* If we do not have /etc/fstab around, try /etc/mtab */ + if (points == NULL) + points = g_unix_mounts_get (NULL); + for (p = points; p != NULL; p = p->next) { GUnixMountEntry *mount = p->data; diff --git a/panels/info/gsd-disk-space-helper.c b/panels/info/gsd-disk-space-helper.c index 198733744..455520d0d 100644 --- a/panels/info/gsd-disk-space-helper.c +++ b/panels/info/gsd-disk-space-helper.c @@ -71,6 +71,7 @@ gsd_should_ignore_unix_mount (GUnixMountEntry *mount) "proc", "procfs", "ptyfs", + "rootfs", "rpc_pipefs", "selinuxfs", "smbfs", |