summaryrefslogtreecommitdiff
path: root/src/bootchart/store.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-04-02 13:24:30 +0200
committerDaniel Mack <daniel@zonque.org>2015-04-03 15:29:18 +0200
commit039958632036808f9baa207e72b9827fa97b7a10 (patch)
tree44071876f82fd9e6b85705e168af50db60734a09 /src/bootchart/store.c
parent61192f1d6954196d5066942241a024de4712243c (diff)
bootchart: switch to log_* helpers
Let the helper functions take care of the string message output.
Diffstat (limited to 'src/bootchart/store.c')
-rw-r--r--src/bootchart/store.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/bootchart/store.c b/src/bootchart/store.c
index fb3dc9ad6e..0663e100e8 100644
--- a/src/bootchart/store.c
+++ b/src/bootchart/store.c
@@ -143,10 +143,8 @@ void log_sample(int sample, struct list_sample_data **ptr) {
if (vmstat < 0) {
/* block stuff */
vmstat = openat(procfd, "vmstat", O_RDONLY);
- if (vmstat == -1) {
- log_error_errno(errno, "Failed to open /proc/vmstat: %m");
- exit(EXIT_FAILURE);
- }
+ if (vmstat == -1)
+ return log_error_errno(errno, "Failed to open /proc/vmstat: %m");
}
n = pread(vmstat, buf, sizeof(buf) - 1, 0);