summaryrefslogtreecommitdiff
path: root/inotail.c
diff options
context:
space:
mode:
Diffstat (limited to 'inotail.c')
-rw-r--r--inotail.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/inotail.c b/inotail.c
index 6b7af47..79bad64 100644
--- a/inotail.c
+++ b/inotail.c
@@ -221,8 +221,13 @@ static ssize_t tail_pipe(struct file_struct *f)
write_header(f->name);
/* We will just tail everything here */
- while ((rc = read(f->fd, buf, BUFFER_SIZE)) > 0)
- write(STDOUT_FILENO, buf, (size_t) rc);
+ while ((rc = read(f->fd, buf, BUFFER_SIZE)) > 0) {
+ if (write(STDOUT_FILENO, buf, (size_t) rc)) {
+ /* e.g. when writing to a pipe which gets closed */
+ fprintf(stderr, "Error: Could not write to stdout: %s\n", strerror(errno));
+ return -1;
+ }
+ }
return rc;
}
t/diff/Documentation/media/uapi?h=nds-private-remove&id=71daabca344b503f98c59e4bdd53a818cd01f2af&id2=4506697d9f8537a8d33e9e002f8efceb32d10757'>diff)
dt-bindings: modify document of Rockchip power domains
Rockchip Socs contain quality of service (qos) blocks managing priority, bandwidth, etc of the connection of each domain to the interconnect. These blocks loose state when their domain gets disabled and therefore need to be saved when disabling and restored when enabling a power-domain. These qos blocks also are similar over all currently available Rockchip SoCs. Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'Documentation/media/uapi')