From 40cafe03dedf59a073e09cd8b370deae58a0e47b Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 10 May 2019 14:51:31 -0700 Subject: [PATCH] libsysprof: simplify error message --- src/libsysprof/sysprof-perf-source.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/libsysprof/sysprof-perf-source.c b/src/libsysprof/sysprof-perf-source.c index 7880079b..966d23d7 100644 --- a/src/libsysprof/sysprof-perf-source.c +++ b/src/libsysprof/sysprof-perf-source.c @@ -650,17 +650,10 @@ sysprof_perf_source_start_pid (SysprofPerfSource *self, if (fd == -1) { - if (errno == EPERM || errno == EACCES) - g_set_error (error, - G_IO_ERROR, - G_IO_ERROR_PERMISSION_DENIED, - _("Sysprof requires authorization to access your computers performance counters.")); - else - g_set_error (error, - G_IO_ERROR, - G_IO_ERROR_FAILED, - _("An error occurred while attempting to access performance counters: %s"), - g_strerror (errno)); + g_set_error (error, + G_IO_ERROR, + G_IO_ERROR_FAILED, + _("An error occurred while attempting to access performance counters")); sysprof_source_stop (SYSPROF_SOURCE (self));