Changeset 080ad7f in mainline for uspace/lib/libc/generic/io/io.c
- Timestamp:
- 2009-06-09T11:10:00Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ebe70f1
- Parents:
- bd8bfcbd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/io/io.c
rbd8bfcbd r080ad7f 193 193 } 194 194 195 FILE *fdopen(int fd, const char *mode) 196 { 197 /* Open file. */ 198 FILE *stream = malloc(sizeof(FILE)); 199 if (stream == NULL) { 200 errno = ENOMEM; 201 return NULL; 202 } 203 204 stream->fd = fd; 205 stream->error = false; 206 stream->eof = false; 207 stream->klog = false; 208 stream->phone = -1; 209 210 list_append(&stream->link, &files); 211 212 return stream; 213 } 214 195 215 FILE *fopen_node(fdi_node_t *node, const char *mode) 196 216 { … … 379 399 } 380 400 401 void rewind(FILE *stream) 402 { 403 (void) fseek(stream, 0, SEEK_SET); 404 } 405 381 406 int fflush(FILE *stream) 382 407 {
Note:
See TracChangeset
for help on using the changeset viewer.