Changeset 4a17aeb in buchla-68k for libcio/fsinit.c
- Timestamp:
- 07/11/2017 05:11:50 PM (7 years ago)
- Branches:
- master
- Children:
- 7af8be4
- Parents:
- 4aa78b2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcio/fsinit.c
r4aa78b2 r4a17aeb 39 39 /* 40 40 ============================================================================ 41 _badf d() -- set "bad fd" error41 _badfio() -- set "bad fd" error on I/O 42 42 ============================================================================ 43 43 */ 44 44 45 int16_t _badf d(void)45 int16_t _badfio(io_arg arg, int8_t *buff, int16_t len) 46 46 { 47 47 errno = EBADF; /* set bad fd code */ … … 51 51 /* 52 52 ============================================================================ 53 _ noper() -- null return with no error condition53 _badfc() -- set "bad fd" error on close 54 54 ============================================================================ 55 55 */ 56 56 57 int16_t _noper(void) 57 int16_t _badfc(io_arg arg) 58 { 59 errno = EBADF; /* set bad fd code */ 60 return(FAILURE); /* return with an error indication */ 61 } 62 63 /* 64 ============================================================================ 65 _nopo() -- null open with no error condition 66 ============================================================================ 67 */ 68 69 int16_t _nopo(int8_t *name, int16_t flag, int16_t mode, struct channel *chp, struct devtabl *dp) 70 { 71 return(SUCCESS); /* return with a non-error indication */ 72 } 73 74 /* 75 ============================================================================ 76 _nopc() -- null close with no error condition 77 ============================================================================ 78 */ 79 80 int16_t _nopc(io_arg arg) 58 81 { 59 82 return(SUCCESS); /* return with a non-error indication */ … … 70 93 */ 71 94 72 void InitCH(struct channel *cp, int8_t rdi, int8_t wri, int8_t ioi, int8_t ski, int16_t (*cfp)(), io_arg charg)95 void InitCH(struct channel *cp, int8_t rdi, int8_t wri, int8_t ioi, int8_t ski, chclo cfp, io_arg charg) 73 96 { 74 97 cp->c_read = rdi; … … 128 151 Stdbufs = Stdbuf[MAXDFILE-1]; 129 152 130 InitCH(&chantab[0], 2, 0, 1, 0, _nop er, (io_arg)CON_DEV ); /* 0 - stdin */131 InitCH(&chantab[1], 0, 2, 1, 0, _nop er, (io_arg)CON_DEV ); /* 1 - stdout */132 InitCH(&chantab[2], 0, 2, 1, 0, _nop er, (io_arg)CON_DEV ); /* 2 - stderr */153 InitCH(&chantab[0], 2, 0, 1, 0, _nopc, (io_arg)CON_DEV ); /* 0 - stdin */ 154 InitCH(&chantab[1], 0, 2, 1, 0, _nopc, (io_arg)CON_DEV ); /* 1 - stdout */ 155 InitCH(&chantab[2], 0, 2, 1, 0, _nopc, (io_arg)CON_DEV ); /* 2 - stderr */ 133 156 134 157 for (i = 3; i < MAXCHAN; i++) /* 3..MAXCHAN-1 - not preassigned */ 135 InitCH(&chantab[i], 0, 0, 0, 0, _badf d, (io_arg)0L );158 InitCH(&chantab[i], 0, 0, 0, 0, _badfc, (io_arg)0L ); 136 159 137 160 _bpbin = FALSE; /* BPB isn't in memory */
Note:
See TracChangeset
for help on using the changeset viewer.