diff options
| author | Miguel <m.i@gmx.at> | 2018-08-18 16:20:26 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-08-18 16:20:26 +0200 |
| commit | 639c3d47b09114628f8e1f8817c27c10bf1fb28c (patch) | |
| tree | f0381de25cc8f2de96a87b47cc76f7d09548bf7e /userspace/cat.c | |
| parent | 7b0d88b2dff9b635d9ff69f6d51b6832c1ca4c40 (diff) | |
reviving old drivers: mouse, pci, e1000
Diffstat (limited to 'userspace/cat.c')
| -rw-r--r-- | userspace/cat.c | 9 |
1 files changed, 6 insertions, 3 deletions
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; } |
