Changeset 7258c6a in buchla-68k for libcio/open.c
- Timestamp:
- 07/09/2017 04:45:34 PM (7 years ago)
- Branches:
- master
- Children:
- 8618599
- Parents:
- 0292fbb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcio/open.c
r0292fbb r7258c6a 12 12 #include "stddefs.h" 13 13 14 extern int _badfd(void);15 extern int _noper(void);16 extern int _inifcb(struct fcb *fcp, char *name, char *ext, int mode);17 extern int _opfcb(struct fcb *fcp);18 19 extern char *FilName(char *s, char*p);20 extern char *FilExt(char *s, char*p);21 22 int _fileop(char *name, int flag, int mode, struct channel *chp, struct devtabl *dp);23 int _filecl(struct fcb *fp);14 extern int16_t _badfd(void); 15 extern int16_t _noper(void); 16 extern int16_t _inifcb(struct fcb *fcp, int8_t *name, int8_t *ext, int16_t mode); 17 extern int16_t _opfcb(struct fcb *fcp); 18 19 extern int8_t *FilName(int8_t *s, int8_t *p); 20 extern int8_t *FilExt(int8_t *s, int8_t *p); 21 22 int16_t _fileop(int8_t *name, int16_t flag, int16_t mode, struct channel *chp, struct devtabl *dp); 23 int16_t _filecl(struct fcb *fp); 24 24 25 25 static struct device condev = { 2, 2, 1, 0, _noper }; … … 55 55 */ 56 56 57 int open(char *name, int flag, int mode)57 int16_t open(int8_t *name, int16_t flag, int16_t mode) 58 58 { 59 59 register struct devtabl *dp; 60 60 register struct channel *chp; 61 61 register struct device *dev; 62 int fd, mdmask;62 int16_t fd, mdmask; 63 63 64 64 /* search for a free channel */ … … 131 131 */ 132 132 133 int opena(char *name, int flag, int mode)133 int16_t opena(int8_t *name, int16_t flag, int16_t mode) 134 134 { 135 135 return(open(name, flag, mode)); … … 145 145 */ 146 146 147 int openb(char *name, int flag, int mode)147 int16_t openb(int8_t *name, int16_t flag, int16_t mode) 148 148 { 149 149 return(open(name, flag|O_RAW, mode)); … … 164 164 */ 165 165 166 int creat(char *name, int mode)166 int16_t creat(int8_t *name, int16_t mode) 167 167 { 168 168 return(open(name, O_WRONLY|O_TRUNC|O_CREAT, mode)); … … 183 183 */ 184 184 185 int creata(char *name, int mode)185 int16_t creata(int8_t *name, int16_t mode) 186 186 { 187 187 return(open(name, O_WRONLY|O_TRUNC|O_CREAT, mode)); … … 198 198 */ 199 199 200 int creatb(char *name, int mode)200 int16_t creatb(int8_t *name, int16_t mode) 201 201 { 202 202 return(open(name, O_WRONLY|O_TRUNC|O_CREAT|O_RAW, mode)); … … 215 215 */ 216 216 217 int _fileop(char *name, int flag, int mode, struct channel *chp, struct devtabl *dp)217 int16_t _fileop(int8_t *name, int16_t flag, int16_t mode, struct channel *chp, struct devtabl *dp) 218 218 { 219 219 register struct fcb *fp; 220 chartmpname[9], tmpext[4];220 int8_t tmpname[9], tmpext[4]; 221 221 222 222 /* search for an available fcb entry */
Note:
See TracChangeset
for help on using the changeset viewer.