From: Jim Meyering Date: Wed, 22 Jun 1994 14:11:23 +0000 (+0000) Subject: . X-Git-Tag: textutils-1_12_1~680 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d62acd19e98feebbc176a8021ad0274f2c4b3b57;p=thirdparty%2Fcoreutils.git . --- diff --git a/src/tac.c b/src/tac.c index bbc483a4c6..f5669a91a8 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; }