Changes in uspace/lib/c/generic/io/io.c [7699c21:6fa9a99d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/io.c
r7699c21 r6fa9a99d 42 42 #include <malloc.h> 43 43 #include <async.h> 44 #include <io/k log.h>44 #include <io/kio.h> 45 45 #include <vfs/vfs.h> 46 46 #include <vfs/vfs_sess.h> … … 57 57 .error = true, 58 58 .eof = true, 59 .k log= false,59 .kio = false, 60 60 .sess = NULL, 61 61 .btype = _IONBF, … … 67 67 }; 68 68 69 static FILE stdout_k log= {69 static FILE stdout_kio = { 70 70 .fd = -1, 71 71 .error = false, 72 72 .eof = false, 73 .k log= true,73 .kio = true, 74 74 .sess = NULL, 75 75 .btype = _IOLBF, … … 81 81 }; 82 82 83 static FILE stderr_k log= {83 static FILE stderr_kio = { 84 84 .fd = -1, 85 85 .error = false, 86 86 .eof = false, 87 .k log= true,87 .kio = true, 88 88 .sess = NULL, 89 89 .btype = _IONBF, … … 113 113 stdout = fdopen(1, "w"); 114 114 } else { 115 stdout = &stdout_k log;115 stdout = &stdout_kio; 116 116 list_append(&stdout->link, &files); 117 117 } … … 120 120 stderr = fdopen(2, "w"); 121 121 } else { 122 stderr = &stderr_k log;122 stderr = &stderr_kio; 123 123 list_append(&stderr->link, &files); 124 124 } … … 267 267 stream->error = false; 268 268 stream->eof = false; 269 stream->k log= false;269 stream->kio = false; 270 270 stream->sess = NULL; 271 271 stream->need_sync = false; … … 289 289 stream->error = false; 290 290 stream->eof = false; 291 stream->k log= false;291 stream->kio = false; 292 292 stream->sess = NULL; 293 293 stream->need_sync = false; … … 314 314 315 315 if ((stream != &stdin_null) 316 && (stream != &stdout_k log)317 && (stream != &stderr_k log))316 && (stream != &stdout_kio) 317 && (stream != &stderr_kio)) 318 318 free(stream); 319 319 … … 382 382 ssize_t wr; 383 383 384 if (stream->k log)385 wr = k log_write(buf + done, left);384 if (stream->kio) 385 wr = kio_write(buf + done, left); 386 386 else 387 387 wr = write(stream->fd, buf + done, left); … … 705 705 _fflushbuf(stream); 706 706 707 if (stream->k log) {708 k log_update();707 if (stream->kio) { 708 kio_update(); 709 709 return EOK; 710 710 } … … 740 740 int fileno(FILE *stream) 741 741 { 742 if (stream->k log) {742 if (stream->kio) { 743 743 errno = EBADF; 744 744 return -1;
Note:
See TracChangeset
for help on using the changeset viewer.