fix libltt error messages
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 15 Sep 2005 23:52:16 +0000 (23:52 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 15 Sep 2005 23:52:16 +0000 (23:52 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1204 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/libltt/libltt.c

index 6cb81c304a2b35ac03c554b66647c4aa4b3963cd..662a05871521d5ac39c78649cfacf44ee4b01d85 100644 (file)
@@ -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;
 }
This page took 0.027053 seconds and 4 git commands to generate.