X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng%2Fcommands%2Flist.c;h=0b4afa308047b3ce951b27c2519494b61f1bf269;hp=9ec01b47a7fdcdb80b72134ac730e0baacc27ecb;hb=3301e7404d026657c2e466bcdf504b93ddbe58e3;hpb=7d29a2477524f7ee2ee46a94e538e6141f5ecc0e diff --git a/lttng/commands/list.c b/lttng/commands/list.c index 9ec01b47a..0b4afa308 100644 --- a/lttng/commands/list.c +++ b/lttng/commands/list.c @@ -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 #include -#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: