From 5ef6911d65dbb02b29ee00cdbe06c87533a1069b Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Tue, 23 May 2023 15:37:57 -0700 Subject: [PATCH] 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. --- src/libsysprof-analyze/sysprof-mount-namespace.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libsysprof-analyze/sysprof-mount-namespace.c b/src/libsysprof-analyze/sysprof-mount-namespace.c index 7f2c3e73..7e146471 100644 --- a/src/libsysprof-analyze/sysprof-mount-namespace.c +++ b/src/libsysprof-analyze/sysprof-mount-namespace.c @@ -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;