Changeset f261cc8 in buchla-68k for libcio/filesys.c
- Timestamp:
- 07/16/2017 12:10:45 PM (7 years ago)
- Branches:
- master
- Children:
- 1c4f9be
- Parents:
- 0c06bc5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcio/filesys.c
r0c06bc5 rf261cc8 783 783 ============================================================================= 784 784 _inifcb(fcp, name, ext, mode) -- initialize FCB pointed to by 'fcp' 785 for file named 'name'.'ext' in mode 'mode'.785 for file named 'name'.'ext'. 786 786 Returns SUCCESS (0) if ok, FAILURE (-1) if not. 787 787 ============================================================================= 788 788 */ 789 789 790 int16_t _inifcb(struct fcb *fcp, int8_t *name, int8_t *ext, uint16_t mode)790 int16_t _inifcb(struct fcb *fcp, int8_t *name, int8_t *ext, uint16_t flags) 791 791 { 792 792 int16_t fl; … … 800 800 /* check for valid flags */ 801 801 802 if ( mode& ~(O_WRONLY|O_RDWR|O_NDELAY|O_APPEND|O_CREAT|O_TRUNC|O_EXCL|O_RAW))802 if (flags & ~(O_WRONLY|O_RDWR|O_NDELAY|O_APPEND|O_CREAT|O_TRUNC|O_EXCL|O_RAW)) 803 803 return(FAILURE); 804 804 … … 871 871 /* set the flags in the FCB and exit */ 872 872 873 if ( mode& O_RDONLY)873 if (flags & O_RDONLY) 874 874 fcp->modefl |= FC_RD; 875 875 876 if ( mode& O_WRONLY)876 if (flags & O_WRONLY) 877 877 fcp->modefl |= FC_WR; 878 878 879 if ( mode& O_RDWR)879 if (flags & O_RDWR) 880 880 fcp->modefl |= FC_RW; 881 881 882 if ( mode& O_NDELAY)882 if (flags & O_NDELAY) 883 883 fcp->modefl |= FC_NB; 884 884 885 if ( mode& O_APPEND)885 if (flags & O_APPEND) 886 886 fcp->modefl |= FC_AP; 887 887 888 if ( mode& O_CREAT)888 if (flags & O_CREAT) 889 889 fcp->modefl |= FC_CR; 890 890 891 if ( mode& O_TRUNC)891 if (flags & O_TRUNC) 892 892 fcp->modefl |= FC_TR; 893 893 894 if ( mode& O_EXCL)894 if (flags & O_EXCL) 895 895 fcp->modefl |= FC_EX; 896 896 897 if ( mode& O_RAW)897 if (flags & O_RAW) 898 898 fcp->modefl |= FC_BF; 899 899
Note:
See TracChangeset
for help on using the changeset viewer.