Changes in uspace/lib/posix/stdio.c [4c8f5e7:2a53f71] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/stdio.c
r4c8f5e7 r2a53f71 257 257 assert(stream != NULL); 258 258 259 /* Ret rieve the node. */259 /* Retieve the node. */ 260 260 struct stat st; 261 261 int rc; … … 265 265 } else { 266 266 rc = stat(filename, &st); 267 if (-rc == ENOENT) {268 /* file does not exist, create new file */269 FILE* tmp = fopen(filename, mode);270 if (tmp != NULL) {271 fclose(tmp);272 /* try again */273 rc = stat(filename, &st);274 }275 }276 267 } 277 268 … … 284 275 fdi_node_t node = { 285 276 .fs_handle = st.fs_handle, 286 . service_id = st.service_id,277 .devmap_handle = st.devmap_handle, 287 278 .index = st.index 288 279 }; … … 317 308 318 309 return stream; 310 } 311 312 /** 313 * 314 * @param buf 315 * @param size 316 * @param mode 317 * @return 318 */ 319 FILE *posix_fmemopen(void *restrict buf, size_t size, 320 const char *restrict mode) 321 { 322 // TODO 323 not_implemented(); 324 } 325 326 /** 327 * 328 * @param bufp 329 * @param sizep 330 * @return 331 */ 332 FILE *posix_open_memstream(char **bufp, size_t *sizep) 333 { 334 // TODO 335 not_implemented(); 319 336 } 320 337
Note:
See TracChangeset
for help on using the changeset viewer.