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
This commit is contained in:
Jonh Wendell 2013-07-22 16:15:57 -03:00
parent 30faa5e1d9
commit 611eb34028
2 changed files with 6 additions and 0 deletions

View file

@ -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;

View file

@ -71,6 +71,7 @@ gsd_should_ignore_unix_mount (GUnixMountEntry *mount)
"proc",
"procfs",
"ptyfs",
"rootfs",
"rpc_pipefs",
"selinuxfs",
"smbfs",