diff options
Diffstat (limited to 'common/console.c')
-rw-r--r-- | common/console.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/console.c b/common/console.c index d04aae58f9..e6e029848d 100644 --- a/common/console.c +++ b/common/console.c @@ -272,6 +272,9 @@ static int fops_open(struct cdev *cdev, unsigned long flags) { struct console_device *priv = cdev->priv; + if ((flags & (O_WRONLY | O_RDWR)) && !priv->puts ) + return -EPERM; + return console_open(priv); } |