Changes in uspace/lib/c/generic/io/io.c [82582e4:79ae36dd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/io.c
r82582e4 r79ae36dd 44 44 #include <io/klog.h> 45 45 #include <vfs/vfs.h> 46 #include <vfs/vfs_sess.h> 46 47 #include <ipc/devmap.h> 47 48 #include <adt/list.h> 48 49 #include "../private/io.h" 50 #include "../private/stdio.h" 49 51 50 52 static void _ffillbuf(FILE *stream); … … 56 58 .eof = true, 57 59 .klog = false, 58 . phone = -1,60 .sess = NULL, 59 61 .btype = _IONBF, 60 62 .buf = NULL, … … 70 72 .eof = false, 71 73 .klog = true, 72 . phone = -1,74 .sess = NULL, 73 75 .btype = _IOLBF, 74 76 .buf = NULL, … … 84 86 .eof = false, 85 87 .klog = true, 86 . phone = -1,88 .sess = NULL, 87 89 .btype = _IONBF, 88 90 .buf = NULL, … … 255 257 stream->eof = false; 256 258 stream->klog = false; 257 stream-> phone = -1;259 stream->sess = NULL; 258 260 stream->need_sync = false; 259 261 _setvbuf(stream); … … 277 279 stream->eof = false; 278 280 stream->klog = false; 279 stream-> phone = -1;281 stream->sess = NULL; 280 282 stream->need_sync = false; 281 283 _setvbuf(stream); … … 309 311 stream->eof = false; 310 312 stream->klog = false; 311 stream-> phone = -1;313 stream->sess = NULL; 312 314 stream->need_sync = false; 313 315 _setvbuf(stream); … … 324 326 fflush(stream); 325 327 326 if (stream-> phone >= 0)327 async_hangup(stream-> phone);328 if (stream->sess != NULL) 329 async_hangup(stream->sess); 328 330 329 331 if (stream->fd >= 0) … … 732 734 } 733 735 734 if ( stream->fd >= 0 && stream->need_sync) {736 if ((stream->fd >= 0) && (stream->need_sync)) { 735 737 /** 736 738 * Better than syncing always, but probably still not the … … 770 772 } 771 773 772 int fphone(FILE *stream)774 async_sess_t *fsession(exch_mgmt_t mgmt, FILE *stream) 773 775 { 774 776 if (stream->fd >= 0) { 775 if (stream-> phone < 0)776 stream-> phone = fd_phone(stream->fd);777 778 return stream-> phone;779 } 780 781 return -1;777 if (stream->sess == NULL) 778 stream->sess = fd_session(mgmt, stream->fd); 779 780 return stream->sess; 781 } 782 783 return NULL; 782 784 } 783 785
Note:
See TracChangeset
for help on using the changeset viewer.