X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Frtapelib.c;h=19d2d2dd7d885f221ccae788be6f0230b1637685;hb=865e5f32959ed99b99f42ecd98de6158e98f53e5;hp=2116cb655295df789716c4249fdd9a4609d56f07;hpb=43085596a3eb57cc1666ca26a39db2ff2b608d37;p=chaz%2Ftar diff --git a/src/rtapelib.c b/src/rtapelib.c index 2116cb6..19d2d2d 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. */ @@ -328,7 +328,9 @@ encode_oflag (char *buf, int oflag) default: abort (); } +#ifdef O_APPEND if (oflag & O_APPEND) strcat (buf, "|O_APPEND"); +#endif if (oflag & O_CREAT) strcat (buf, "|O_CREAT"); #ifdef O_DSYNC if (oflag & O_DSYNC) strcat (buf, "|O_DSYNC"); @@ -379,7 +381,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 +672,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