summaryrefslogtreecommitdiff
path: root/src/tac.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-06-22 14:11:23 +0000
committerJim Meyering <jim@meyering.net>1994-06-22 14:11:23 +0000
commitd62acd19e98feebbc176a8021ad0274f2c4b3b57 (patch)
treeb018a285e295e256c2d4b6b7b4c330872641763b /src/tac.c
parent7a3fb2d7ad5117e0a156ef90ab6f08a32f7436f7 (diff)
downloadcoreutils-d62acd19e98feebbc176a8021ad0274f2c4b3b57.tar.xz
.
Diffstat (limited to 'src/tac.c')
-rw-r--r--src/tac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tac.c b/src/tac.c
index bbc483a4c..f5669a91a 100644
--- a/src/tac.c
+++ b/src/tac.c
@@ -411,7 +411,7 @@ tac_file (file)
{
int fd, errors;
- fd = open (file, 0);
+ fd = open (file, O_RDONLY);
if (fd == -1)
{
error (0, errno, "%s", file);
@@ -470,7 +470,7 @@ tac (fd, file)
lseek (fd, file_pos, SEEK_SET);
if (safe_read (fd, buffer, saved_record_size) != saved_record_size)
{
- error (0, 1, "%s", file);
+ error (0, errno, "%s", file);
return 1;
}