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