Changeset 975f62f in mainline for uspace/lib/libc/generic/io/stream.c
- Timestamp:
- 2007-07-12T16:02:25Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 358ec13
- Parents:
- 7918fce
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/io/stream.c
r7918fce r975f62f 66 66 static ssize_t read_stdin(void *param, void *buf, size_t count) 67 67 { 68 ipcarg_t r0, r1;68 ipcarg_t r0, r1; 69 69 size_t i = 0; 70 70 71 71 while (i < count) { 72 if (async_req_2(streams[0].phone, CONSOLE_GETCHAR, 0, 0, &r0, &r1) < 0) { 72 if (async_req_2(streams[0].phone, CONSOLE_GETCHAR, 0, 0, &r0, 73 &r1) < 0) { 73 74 return -1; 74 75 } … … 83 84 84 85 for (i = 0; i < count; i++) 85 async_msg(streams[1].phone, CONSOLE_PUTCHAR, ((const char *) buf)[i]); 86 async_msg(streams[1].phone, CONSOLE_PUTCHAR, 87 ((const char *) buf)[i]); 86 88 87 89 return count; … … 93 95 94 96 if (console_phone < 0) { 95 while ((console_phone = ipc_connect_me_to(PHONE_NS, SERVICE_CONSOLE, 0)) < 0) { 97 while ((console_phone = ipc_connect_me_to(PHONE_NS, 98 SERVICE_CONSOLE, 0)) < 0) { 96 99 usleep(10000); 97 100 } … … 111 114 112 115 if (console_phone < 0) { 113 while ((console_phone = ipc_connect_me_to(PHONE_NS, SERVICE_CONSOLE, 0)) < 0) { 116 while ((console_phone = ipc_connect_me_to(PHONE_NS, 117 SERVICE_CONSOLE, 0)) < 0) { 114 118 usleep(10000); 115 119 }
Note:
See TracChangeset
for help on using the changeset viewer.