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:
parent
30faa5e1d9
commit
611eb34028
2 changed files with 6 additions and 0 deletions
|
@ -608,6 +608,11 @@ get_primary_disc_info (CcInfoPanel *self)
|
||||||
GList *p;
|
GList *p;
|
||||||
|
|
||||||
points = g_unix_mount_points_get (NULL);
|
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)
|
for (p = points; p != NULL; p = p->next)
|
||||||
{
|
{
|
||||||
GUnixMountEntry *mount = p->data;
|
GUnixMountEntry *mount = p->data;
|
||||||
|
|
|
@ -71,6 +71,7 @@ gsd_should_ignore_unix_mount (GUnixMountEntry *mount)
|
||||||
"proc",
|
"proc",
|
||||||
"procfs",
|
"procfs",
|
||||||
"ptyfs",
|
"ptyfs",
|
||||||
|
"rootfs",
|
||||||
"rpc_pipefs",
|
"rpc_pipefs",
|
||||||
"selinuxfs",
|
"selinuxfs",
|
||||||
"smbfs",
|
"smbfs",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue