Changeset 1d2a1a9 in mainline for uspace/lib/posix/stdio.c


Ignore:
Timestamp:
2011-08-17T20:44:32Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0cc32f2
Parents:
bb285b4 (diff), c53a705 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge libposix changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/stdio.c

    rbb285b4 r1d2a1a9  
    257257        assert(stream != NULL);
    258258       
    259         /* Retieve the node. */
     259        /* Retrieve the node. */
    260260        struct stat st;
    261261        int rc;
     
    265265        } else {
    266266                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                }
    267276        }
    268277       
     
    275284        fdi_node_t node = {
    276285                .fs_handle = st.fs_handle,
    277                 .devmap_handle = st.devmap_handle,
     286                .service_id = st.service_id,
    278287                .index = st.index
    279288        };
     
    308317       
    309318        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();
    336319}
    337320
Note: See TracChangeset for help on using the changeset viewer.