libsysprof-analyze: ignore /sysroot devices

I highly doubt this is foolproof, but this makes Silverblue more likely to
resolve the proper fstab entry when translating to paths we can access
from the host system.
This commit is contained in:
Christian Hergert
2023-05-23 15:37:57 -07:00
parent b6f3379c2e
commit 5ef6911d65

View File

@ -178,9 +178,16 @@ sysprof_mount_namespace_find_device (SysprofMountNamespace *self,
if (subvolume != NULL)
{
const char *device_subvolume = sysprof_mount_device_get_subvolume (device);
const char *mount_point = sysprof_mount_device_get_mount_point (device);
if (g_strcmp0 (subvolume, device_subvolume) != 0)
continue;
/* Just ignore /sysroot, as it seems to be a convention on systems like
* Silverblue or GNOME OS.
*/
if (g_strcmp0 (mount_point, "/sysroot") == 0)
continue;
}
return device;