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