Rev 5215 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5215 | Rev 6744 | ||
---|---|---|---|
Line 113... | Line 113... | ||
113 | 113 | ||
114 | hid = __io_alloc(); |
114 | hid = __io_alloc(); |
115 | if(hid < 0) |
115 | if(hid < 0) |
116 | { |
116 | { |
- | 117 | errno = EMFILE; |
|
117 | errno = EMFILE; |
118 | __io_free(hid); |
118 | return (-1); |
119 | return (-1); |
Line 119... | Line 120... | ||
119 | }; |
120 | }; |
120 | 121 | ||
Line 134... | Line 135... | ||
134 | flags & O_CREAT ) |
135 | flags & O_CREAT ) |
135 | { |
136 | { |
136 | if( !err ) |
137 | if( !err ) |
137 | { |
138 | { |
138 | errno = EEXIST; |
139 | errno = EEXIST; |
- | 140 | __io_free(hid); |
|
139 | return (-1); |
141 | return (-1); |
140 | }; |
142 | }; |
141 | } |
143 | } |
Line 142... | Line 144... | ||
142 | 144 | ||
Line 145... | Line 147... | ||
145 | if(flags & O_CREAT) |
147 | if(flags & O_CREAT) |
146 | err=create_file(buf); |
148 | err=create_file(buf); |
147 | if( err ) |
149 | if( err ) |
148 | { |
150 | { |
149 | errno = EACCES; |
151 | errno = EACCES; |
- | 152 | __io_free(hid); |
|
150 | return -1; |
153 | return -1; |
151 | }; |
154 | }; |
152 | }; |
155 | }; |
Line 153... | Line 156... | ||
153 | 156 |