sysprof-cli: check for /var/run/host

Give users some info if there is a good chance their decode will be bad.
This commit is contained in:
Christian Hergert
2023-08-31 14:51:55 -07:00
parent d1d665503c
commit 3b3f78131c

View File

@ -433,6 +433,13 @@ Examples:\n\
}
}
/* Warn about access if we're in a container */
if (g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS))
{
if (!g_file_test ("/var/run/host/usr", G_FILE_TEST_EXISTS))
g_printerr ("Warning: Flatpak detected but cannot access host, set --filesystem=host\n");
}
profiler = sysprof_profiler_new ();
if (argc == 2)