summaryrefslogtreecommitdiff
path: root/inotail.c
diff options
context:
space:
mode:
Diffstat (limited to 'inotail.c')
-rw-r--r--inotail.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/inotail.c b/inotail.c
index 7f191c6..da793db 100644
--- a/inotail.c
+++ b/inotail.c
@@ -138,11 +138,18 @@ static int bytes_to_offset(struct file_struct *f, int n_lines)
return (ret < 0 ? 0 : ret);
}
-/* We will just tail everything here */
static int tail_pipe(struct file_struct *f)
{
+ int rc;
+ char buf[BUFFER_SIZE];
+
if (verbose)
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);
+
return 0;
}
_init() can be removed. This patch kills memblock_init() and initializes memblock with struct initializer. The only difference is that the first dummy entries don't have .nid set to MAX_NUMNODES initially. This doesn't cause any behavior difference. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Russell King <linux@arm.linux.org.uk> Cc: Michal Simek <monstr@monstr.eu> Cc: Paul Mundt <lethal@linux-sh.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: "H. Peter Anvin" <hpa@zytor.com>
Diffstat (limited to 'arch/microblaze/kernel/prom.c')