aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-07-26 00:52:04 +0000
committerEric Andersen <andersen@codepoet.org>2000-07-26 00:52:04 +0000
commitcc10a5b42baab5298fef345c3824ffb2018e053c (patch)
tree275830780903518d70148b530cdaece9b4c73cda
parent83e85f6a0837c9cf39146c4798a8583aecba5da3 (diff)
downloadbusybox-cc10a5b42baab5298fef345c3824ffb2018e053c.tar.gz
Fix some bitrot.
-Erik
-rw-r--r--coreutils/tail.c14
-rw-r--r--tail.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/coreutils/tail.c b/coreutils/tail.c
index cea63e840..3043a80d4 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -251,7 +251,7 @@ static int pipe_lines(int fd, long int n_lines)
If `forever' is nonzero, keep reading from the end of the file
until killed. Return the number of bytes read from the file. */
-static long dump_remainder(int fd)
+static long dump_remainder(const char *filename,, int fd)
{
char buffer[BUFSIZ];
int bytes_read;
@@ -582,7 +582,7 @@ file_lines(const char *filename, int fd, long int n_lines, off_t pos)
Buffer the text as a linked list of LBUFFERs, adding them as needed.
Return 0 if successful, 1 if an error occured. */
-static int pipe_lines(int fd, long int n_lines)
+static int pipe_lines(const char *filename, int fd, long int n_lines)
{
struct linebuffer {
int nbytes, nlines;
@@ -816,7 +816,7 @@ static int start_lines(const char *filename, int fd, long int n_lines)
If `forever' is nonzero, keep reading from the end of the file
until killed. Return the number of bytes read from the file. */
-static long dump_remainder(int fd)
+static long dump_remainder(const char *filename, int fd)
{
char buffer[BUFSIZ];
int bytes_read;
@@ -891,7 +891,7 @@ static void tail_forever(char **names, int nfiles)
write_header(names[i], NULL);
last = i;
}
- file_sizes[i] += dump_remainder(file_descs[i]);
+ file_sizes[i] += dump_remainder(names[i], file_descs[i]);
}
/* If none of the files changed size, sleep. */
@@ -921,7 +921,7 @@ static int tail_bytes(const char *filename, int fd, off_t n_bytes)
lseek(fd, n_bytes, SEEK_CUR);
else if (start_bytes(filename, fd, n_bytes))
return 1;
- dump_remainder(fd);
+ dump_remainder(filename, fd);
} else {
if (S_ISREG(stats.st_mode)) {
off_t current_pos, end_pos;
@@ -987,9 +987,9 @@ static int tail_lines(const char *filename, int fd, long int n_lines)
length = lseek(fd, (off_t) 0, SEEK_END);
if (length != 0 && file_lines(filename, fd, n_lines, length))
return 1;
- dump_remainder(fd);
+ dump_remainder(filename, fd);
} else
- return pipe_lines(fd, n_lines);
+ return pipe_lines(filename, fd, n_lines);
}
return 0;
}
diff --git a/tail.c b/tail.c
index cea63e840..3043a80d4 100644
--- a/tail.c
+++ b/tail.c
@@ -251,7 +251,7 @@ static int pipe_lines(int fd, long int n_lines)
If `forever' is nonzero, keep reading from the end of the file
until killed. Return the number of bytes read from the file. */
-static long dump_remainder(int fd)
+static long dump_remainder(const char *filename,, int fd)
{
char buffer[BUFSIZ];
int bytes_read;
@@ -582,7 +582,7 @@ file_lines(const char *filename, int fd, long int n_lines, off_t pos)
Buffer the text as a linked list of LBUFFERs, adding them as needed.
Return 0 if successful, 1 if an error occured. */
-static int pipe_lines(int fd, long int n_lines)
+static int pipe_lines(const char *filename, int fd, long int n_lines)
{
struct linebuffer {
int nbytes, nlines;
@@ -816,7 +816,7 @@ static int start_lines(const char *filename, int fd, long int n_lines)
If `forever' is nonzero, keep reading from the end of the file
until killed. Return the number of bytes read from the file. */
-static long dump_remainder(int fd)
+static long dump_remainder(const char *filename, int fd)
{
char buffer[BUFSIZ];
int bytes_read;
@@ -891,7 +891,7 @@ static void tail_forever(char **names, int nfiles)
write_header(names[i], NULL);
last = i;
}
- file_sizes[i] += dump_remainder(file_descs[i]);
+ file_sizes[i] += dump_remainder(names[i], file_descs[i]);
}
/* If none of the files changed size, sleep. */
@@ -921,7 +921,7 @@ static int tail_bytes(const char *filename, int fd, off_t n_bytes)
lseek(fd, n_bytes, SEEK_CUR);
else if (start_bytes(filename, fd, n_bytes))
return 1;
- dump_remainder(fd);
+ dump_remainder(filename, fd);
} else {
if (S_ISREG(stats.st_mode)) {
off_t current_pos, end_pos;
@@ -987,9 +987,9 @@ static int tail_lines(const char *filename, int fd, long int n_lines)
length = lseek(fd, (off_t) 0, SEEK_END);
if (length != 0 && file_lines(filename, fd, n_lines, length))
return 1;
- dump_remainder(fd);
+ dump_remainder(filename, fd);
} else
- return pipe_lines(fd, n_lines);
+ return pipe_lines(filename, fd, n_lines);
}
return 0;
}