Improve add-context command
[lttng-tools.git] / lttng / commands / list.c
index 9ec01b47a7fdcdb80b72134ac730e0baacc27ecb..0b4afa308047b3ce951b27c2519494b61f1bf269 100644 (file)
@@ -3,8 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation; only version 2
+ * of the License.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,7 +22,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "cmd.h"
+#include "../cmd.h"
 
 static int opt_pid;
 static int opt_channels;
@@ -89,6 +89,9 @@ static char *get_cmdline_by_pid(pid_t pid)
        /* Caller must free() *cmdline */
        cmdline = malloc(PATH_MAX);
        ret = fread(cmdline, 1, PATH_MAX, fp);
+       if (ret < 0) {
+               perror("fread proc list");
+       }
        fclose(fp);
 
 end:
This page took 0.023177 seconds and 4 git commands to generate.