Message ID | 20221114222024.2435776-2-rostedt@goodmis.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 1388ed664739b89e0221e25696b525c527c560a6 |
Headers | show |
Series | libtracefs: Minor fixes | expand |
diff --git a/src/tracefs-record.c b/src/tracefs-record.c index dbe0e9f01aad..71d1df99bb02 100644 --- a/src/tracefs-record.c +++ b/src/tracefs-record.c @@ -495,6 +495,10 @@ int tracefs_cpu_flush_write(struct tracefs_cpu *tcpu, int wfd) if (ret > 0) ret = write(wfd, buffer, ret); + /* It's OK if there's no data to read */ + if (ret < 0 && errno == EAGAIN) + ret = 0; + return ret; }