From: Paul Eggert Date: Fri, 3 Dec 1999 13:04:17 +0000 (+0000) Subject: Remove bogus errno FIXMEs. X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=c9f5ead8dec28ea7b774184f3c22e9b02ac6f8e2;p=chaz%2Ftar Remove bogus errno FIXMEs. --- diff --git a/src/buffer.c b/src/buffer.c index d60eaea..0172827 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -912,7 +912,7 @@ flush_write (void) if (tape_length_option && tape_length_option <= bytes_written) { - errno = ENOSPC; /* FIXME: errno should be read-only */ + errno = ENOSPC; status = 0; } else if (dev_null_output) diff --git a/src/extract.c b/src/extract.c index 0aba5e7..9d47c58 100644 --- a/src/extract.c +++ b/src/extract.c @@ -243,7 +243,7 @@ make_directories (char *file_name) break; } - errno = saved_errno; /* FIXME: errno should be read-only */ + errno = saved_errno; return did_something; /* tell them to retry if we made one */ } @@ -648,7 +648,7 @@ extract_archive (void) if (written > size) written = size; - errno = 0; /* FIXME: errno should be read-only */ + errno = 0; sstatus = full_write (fd, data_block->buffer, written); set_next_block_after ((union block *) @@ -886,7 +886,7 @@ extract_archive (void) if (stat (CURRENT_FILE_NAME, &st1) == 0 && S_ISDIR (st1.st_mode)) goto check_perms; - errno = saved_errno; /* FIXME: errno should be read-only */ + errno = saved_errno; } if (maybe_recoverable (CURRENT_FILE_NAME)) diff --git a/src/list.c b/src/list.c index 6b69bc6..b118f88 100644 --- a/src/list.c +++ b/src/list.c @@ -223,7 +223,7 @@ list_archive (void) written = available_space_after (data_block); if (written > size) written = size; - errno = 0; /* FIXME: errno should be read-only */ + errno = 0; check = fwrite (data_block->buffer, sizeof (char), written, stdlis); set_next_block_after ((union block *) (data_block->buffer + written - 1)); diff --git a/src/rmt.c b/src/rmt.c index 0215bff..e960f10 100644 --- a/src/rmt.c +++ b/src/rmt.c @@ -335,7 +335,7 @@ see the file named COPYING for details.")); } top: - errno = 0; /* FIXME: errno should be read-only */ + errno = 0; status = 0; if (safe_read (STDIN_FILENO, &command, 1) != 1) return EXIT_SUCCESS; diff --git a/src/rmt.h b/src/rmt.h index da8f629..17a2a2f 100644 --- a/src/rmt.h +++ b/src/rmt.h @@ -52,7 +52,6 @@ int rmt_ioctl__ PARAMS ((int, int, char *)); #define rmtstat(Path, Buffer) \ (_remdev (Path) ? (errno = EOPNOTSUPP), -1 : stat (Path, Buffer)) - /* FIXME: errno should be read-only */ #define rmtcreat(Path, Mode, Command) \ (_remdev (Path) \ @@ -61,7 +60,6 @@ int rmt_ioctl__ PARAMS ((int, int, char *)); #define rmtlstat(Path, Buffer) \ (_remdev (Path) ? (errno = EOPNOTSUPP), -1 : lstat (Path, Buffer)) - /* FIXME: errno should be read-only */ #define rmtread(Fd, Buffer, Length) \ (_isrmt (Fd) ? rmt_read__ (Fd - __REM_BIAS, Buffer, Length) \ @@ -84,15 +82,12 @@ int rmt_ioctl__ PARAMS ((int, int, char *)); #define rmtdup(Fd) \ (_isrmt (Fd) ? (errno = EOPNOTSUPP), -1 : dup (Fd)) - /* FIXME: errno should be read-only */ #define rmtfstat(Fd, Buffer) \ (_isrmt (Fd) ? (errno = EOPNOTSUPP), -1 : fstat (Fd, Buffer)) - /* FIXME: errno should be read-only */ #define rmtfcntl(Fd, Command, Argument) \ (_isrmt (Fd) ? (errno = EOPNOTSUPP), -1 : fcntl (Fd, Command, Argument)) - /* FIXME: errno should be read-only */ #define rmtisatty(Fd) \ (_isrmt (Fd) ? 0 : isatty (Fd)) diff --git a/src/rtapelib.c b/src/rtapelib.c index 2116cb6..8ec2f81 100644 --- a/src/rtapelib.c +++ b/src/rtapelib.c @@ -104,7 +104,7 @@ _rmt_shutdown (int handle, int errno_value) close (WRITE_SIDE (handle)); READ_SIDE (handle) = -1; WRITE_SIDE (handle) = -1; - errno = errno_value; /* FIXME: errno should be read-only */ + errno = errno_value; } /*-------------------------------------------------------------------------. @@ -173,7 +173,7 @@ get_status_string (int handle, char *command_buffer) if (*cursor == 'E' || *cursor == 'F') { - errno = atoi (cursor + 1); /* FIXME: errno should be read-only */ + errno = atoi (cursor + 1); /* Skip the error message line. */ @@ -379,7 +379,7 @@ rmt_open__ (const char *path, int open_mode, int bias, const char *remote_shell) if (remote_pipe_number == MAXUNIT) { - errno = EMFILE; /* FIXME: errno should be read-only */ + errno = EMFILE; return -1; } @@ -670,7 +670,7 @@ rmt_ioctl__ (int handle, int operation, char *argument) switch (operation) { default: - errno = EOPNOTSUPP; /* FIXME: errno should be read-only */ + errno = EOPNOTSUPP; return -1; #ifdef MTIOCTOP