diff options
author | valoq <valoq@mailbox.org> | 2016-11-19 22:12:51 +0100 |
---|---|---|
committer | valoq <valoq@mailbox.org> | 2016-11-19 22:12:51 +0100 |
commit | 530db20edeee191a3b60d56b3b87999a3d10979e (patch) | |
tree | 9053d21580917bdf0e6480b2b2875e90b08b1d8c /src/firemon | |
parent | readme updated (diff) | |
parent | qemu profile (diff) | |
download | firejail-530db20edeee191a3b60d56b3b87999a3d10979e.tar.gz firejail-530db20edeee191a3b60d56b3b87999a3d10979e.tar.zst firejail-530db20edeee191a3b60d56b3b87999a3d10979e.zip |
fixed readme
Diffstat (limited to 'src/firemon')
-rw-r--r-- | src/firemon/caps.c | 1 | ||||
-rw-r--r-- | src/firemon/netstats.c | 3 | ||||
-rw-r--r-- | src/firemon/procevent.c | 6 | ||||
-rw-r--r-- | src/firemon/seccomp.c | 4 | ||||
-rw-r--r-- | src/firemon/top.c | 3 |
5 files changed, 9 insertions, 8 deletions
diff --git a/src/firemon/caps.c b/src/firemon/caps.c index 81877ab87..3f8a139ae 100644 --- a/src/firemon/caps.c +++ b/src/firemon/caps.c | |||
@@ -24,7 +24,6 @@ static void print_caps(int pid) { | |||
24 | char *file; | 24 | char *file; |
25 | if (asprintf(&file, "/proc/%d/status", pid) == -1) { | 25 | if (asprintf(&file, "/proc/%d/status", pid) == -1) { |
26 | errExit("asprintf"); | 26 | errExit("asprintf"); |
27 | exit(1); | ||
28 | } | 27 | } |
29 | 28 | ||
30 | FILE *fp = fopen(file, "r"); | 29 | FILE *fp = fopen(file, "r"); |
diff --git a/src/firemon/netstats.c b/src/firemon/netstats.c index 3c020d630..534d783cb 100644 --- a/src/firemon/netstats.c +++ b/src/firemon/netstats.c | |||
@@ -216,6 +216,9 @@ void netstats(void) { | |||
216 | print_proc(i, itv, col); | 216 | print_proc(i, itv, col); |
217 | } | 217 | } |
218 | } | 218 | } |
219 | #ifdef HAVE_GCOV | ||
220 | __gcov_flush(); | ||
221 | #endif | ||
219 | } | 222 | } |
220 | } | 223 | } |
221 | 224 | ||
diff --git a/src/firemon/procevent.c b/src/firemon/procevent.c index 1940f4a34..edae21951 100644 --- a/src/firemon/procevent.c +++ b/src/firemon/procevent.c | |||
@@ -43,10 +43,8 @@ static int pid_is_firejail(pid_t pid) { | |||
43 | 43 | ||
44 | // open /proc/self/comm | 44 | // open /proc/self/comm |
45 | char *file; | 45 | char *file; |
46 | if (asprintf(&file, "/proc/%u/comm", pid) == -1) { | 46 | if (asprintf(&file, "/proc/%u/comm", pid) == -1) |
47 | perror("asprintf"); | 47 | errExit("asprintf"); |
48 | exit(1); | ||
49 | } | ||
50 | 48 | ||
51 | FILE *fp = fopen(file, "r"); | 49 | FILE *fp = fopen(file, "r"); |
52 | if (!fp) { | 50 | if (!fp) { |
diff --git a/src/firemon/seccomp.c b/src/firemon/seccomp.c index abc698bb8..f11c624ea 100644 --- a/src/firemon/seccomp.c +++ b/src/firemon/seccomp.c | |||
@@ -22,10 +22,8 @@ | |||
22 | #define MAXBUF 4098 | 22 | #define MAXBUF 4098 |
23 | static void print_seccomp(int pid) { | 23 | static void print_seccomp(int pid) { |
24 | char *file; | 24 | char *file; |
25 | if (asprintf(&file, "/proc/%d/status", pid) == -1) { | 25 | if (asprintf(&file, "/proc/%d/status", pid) == -1) |
26 | errExit("asprintf"); | 26 | errExit("asprintf"); |
27 | exit(1); | ||
28 | } | ||
29 | 27 | ||
30 | FILE *fp = fopen(file, "r"); | 28 | FILE *fp = fopen(file, "r"); |
31 | if (!fp) { | 29 | if (!fp) { |
diff --git a/src/firemon/top.c b/src/firemon/top.c index b804761dd..94271523c 100644 --- a/src/firemon/top.c +++ b/src/firemon/top.c | |||
@@ -292,6 +292,9 @@ void top(void) { | |||
292 | } | 292 | } |
293 | } | 293 | } |
294 | head_print(col, row); | 294 | head_print(col, row); |
295 | #ifdef HAVE_GCOV | ||
296 | __gcov_flush(); | ||
297 | #endif | ||
295 | } | 298 | } |
296 | } | 299 | } |
297 | 300 | ||