diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2022-11-19 18:56:19 +0100 |
---|---|---|
committer | Alexander Gordeev <agordeev@linux.ibm.com> | 2022-11-29 14:17:04 +0100 |
commit | 1143f6f55d967ab414a10a559d58a2700f32a54d (patch) | |
tree | e8764a16082269ee5e580226bcc1d4985925496f /drivers/s390 | |
parent | a086c53de982d6ae3f1e7e3c0f94efa66743b333 (diff) |
s390/sclp: allow to change sclp_console_drop during runtime
Make sclp's con_drop sysfs attribute also writable, and allow to
change its value during runtime. This way handling of sclp console
drop handling is consistent with the 3215 device driver.
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/sclp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index f0696f05a186..8f74db689a0c 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c @@ -1205,12 +1205,20 @@ static ssize_t con_pages_show(struct device_driver *dev, char *buf) static DRIVER_ATTR_RO(con_pages); +static ssize_t con_drop_store(struct device_driver *dev, const char *buf, size_t count) +{ + int rc; + + rc = kstrtobool(buf, &sclp_console_drop); + return rc ?: count; +} + static ssize_t con_drop_show(struct device_driver *dev, char *buf) { return sysfs_emit(buf, "%i\n", sclp_console_drop); } -static DRIVER_ATTR_RO(con_drop); +static DRIVER_ATTR_RW(con_drop); static ssize_t con_full_show(struct device_driver *dev, char *buf) { |