From 639c3d47b09114628f8e1f8817c27c10bf1fb28c Mon Sep 17 00:00:00 2001 From: Miguel Date: Sat, 18 Aug 2018 16:20:26 +0200 Subject: reviving old drivers: mouse, pci, e1000 --- userspace/cat.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'userspace/cat.c') diff --git a/userspace/cat.c b/userspace/cat.c index 8980546..688ebcc 100644 --- a/userspace/cat.c +++ b/userspace/cat.c @@ -3,13 +3,16 @@ int main() { + char c; - char buf[256]; + printf("-- read from stderr byte by byte --\n"); while(has_data_waiting(2)){ - fread(buf,1,5,stderr); // read stderr; - printf("[%s]\n",buf); + fread(&c,1,1,stderr); + printf("%c",c); } + printf("\n-- no more data on stderr --\n"); + return 0; } -- cgit v1.2.3