[sysprof] libsysprof: simplify error message
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] libsysprof: simplify error message
- Date: Wed, 29 May 2019 22:20:39 +0000 (UTC)
commit 40cafe03dedf59a073e09cd8b370deae58a0e47b
Author: Christian Hergert <chergert redhat com>
Date: Fri May 10 14:51:31 2019 -0700
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 7880079..966d23d 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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]