From 145230cf264a41837f34b6a6749bb81f36dd7575 Mon Sep 17 00:00:00 2001 From: compudj Date: Thu, 15 Sep 2005 23:52:16 +0000 Subject: [PATCH] fix libltt error messages git-svn-id: http://ltt.polymtl.ca/svn@1204 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/libltt/libltt.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ltt/branches/poly/libltt/libltt.c b/ltt/branches/poly/libltt/libltt.c index 6cb81c30..662a0587 100644 --- a/ltt/branches/poly/libltt/libltt.c +++ b/ltt/branches/poly/libltt/libltt.c @@ -329,13 +329,14 @@ int lttctl_create_trace(const struct lttctl_handle *h, if(err != 0) { errno = err; lttctl_perror("Create Trace Error"); - return -1; + return err; } return 0; senderr: lttctl_perror("Create Trace Error"); + err = EPERM; return err; } @@ -372,13 +373,14 @@ int lttctl_destroy_trace(const struct lttctl_handle *h, if(err != 0) { errno = err; lttctl_perror("Destroy Trace Channels Error"); - return -1; + return err; } return 0; senderr: lttctl_perror("Destroy Trace Channels Error"); + err = EPERM; return err; } @@ -417,12 +419,13 @@ int lttctl_start(const struct lttctl_handle *h, if(err != 0) { errno = err; lttctl_perror("Start Trace Error"); - return -1; + return err; } return 0; senderr: + err = EPERM; lttctl_perror("Start Trace Error"); return err; @@ -461,12 +464,13 @@ int lttctl_stop(const struct lttctl_handle *h, if(err != 0) { errno = err; lttctl_perror("Stop Trace Error"); - return -1; + return err; } return 0; senderr: + err = EPERM; lttctl_perror("Stop Trace Error"); return err; } -- 2.34.1