summaryrefslogtreecommitdiffstats
path: root/common/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/console.c')
-rw-r--r--common/console.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/common/console.c b/common/console.c
index 6ca94e2a02..4ca5f1809f 100644
--- a/common/console.c
+++ b/common/console.c
@@ -63,19 +63,21 @@ static int console_std_set(struct device_d *dev, struct param_d *param,
unsigned int flag = 0, i = 0;
if (val) {
- if (strchr(val, 'i') && cdev->f_caps & CONSOLE_STDIN) {
+ if (strchr(val, 'i') && cdev->getc) {
active[i++] = 'i';
flag |= CONSOLE_STDIN;
}
- if (strchr(val, 'o') && cdev->f_caps & CONSOLE_STDOUT) {
- active[i++] = 'o';
- flag |= CONSOLE_STDOUT;
- }
+ if (cdev->putc) {
+ if (strchr(val, 'o')) {
+ active[i++] = 'o';
+ flag |= CONSOLE_STDOUT;
+ }
- if (strchr(val, 'e') && cdev->f_caps & CONSOLE_STDERR) {
- active[i++] = 'e';
- flag |= CONSOLE_STDERR;
+ if (strchr(val, 'e')) {
+ active[i++] = 'e';
+ flag |= CONSOLE_STDERR;
+ }
}
}