- Set a default PCM volume so that something can be heard when driver is
[AROS.git] / arch / all-unix / kernel / maygetchar.c
blobc4d2e17103b2289240ae16094cdf9d49ea7f0ec1
1 #include <aros/libcall.h>
3 #include <unistd.h>
5 #include "kernel_base.h"
6 #include "kernel_intern.h"
8 AROS_LH0I(int, KrnMayGetChar,
9 struct KernelBase *, KernelBase, 26, Kernel)
11 AROS_LIBFUNC_INIT
13 char c;
14 int ret;
16 ret = KernelIFace.read (STDERR_FILENO, &c, 1);
17 AROS_HOST_BARRIER
19 return (ret == 1) ? c : -1;
21 AROS_LIBFUNC_EXIT