Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4252 → Rev 3386

/branches/network/uspace/lib/libc/generic/io/fprintf.c
File deleted
/branches/network/uspace/lib/libc/generic/io/stdio.c
File deleted
/branches/network/uspace/lib/libc/generic/io/stream.c
42,8 → 42,7
#include <ipc/ns.h>
#include <ipc/fb.h>
#include <ipc/services.h>
#include <ipc/console.h>
#include <kbd/kbd.h>
#include <console.h>
#include <unistd.h>
#include <async.h>
#include <sys/types.h>
59,17 → 58,13
{
open_console();
if (console_phone >= 0) {
kbd_event_t ev;
int rc;
ipcarg_t r0, r1;
size_t i = 0;
while (i < count) {
do {
rc = kbd_get_event(&ev);
if (rc < 0) return -1;
} while (ev.c == 0 || ev.type == KE_RELEASE);
 
((char *) buf)[i++] = ev.c;
if (async_req_0_2(console_phone, CONSOLE_GETCHAR, &r0, &r1) < 0)
return -1;
((char *) buf)[i++] = r0;
}
return i;
} else {
115,19 → 110,11
(void) __SYSCALL3(SYS_KLOG, 1, NULL, 0);
}
 
int get_console_phone(void)
int get_cons_phone(void)
{
if (console_phone < 0)
console_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_CONSOLE, 0, 0);
open_console();
return console_phone;
}
 
void console_wait(void)
{
while (console_phone < 0)
get_console_phone();
}
 
/** @}
*/