diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2022-11-19 20:32:18 +0300 |
---|---|---|
committer | Alexander Gordeev <agordeev@linux.ibm.com> | 2022-11-29 16:17:03 +0300 |
commit | 2473be453c9023bafd6cc785a7f2ecd0eabda2fd (patch) | |
tree | a6a37484445f53b1a6e226f3e40fdf5f1d0e7f71 /drivers/s390 | |
parent | e036ea81c0a12c5fad55fa4c5350019ce99c3e8d (diff) | |
download | linux-2473be453c9023bafd6cc785a7f2ecd0eabda2fd.tar.xz |
s390/sclp: use kstrobool() to parse sclp_con_drop parameter
Use kstrobool() to parse sclp_con_drop parameter. This way handling of
valid values for the sclp_con_drop parameter is identical to the
con3215_drop parameter. In particular this allows to pass values like
"yes" and "true", which was not possible before.
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 | 9 | ||||
-rw-r--r-- | drivers/s390/char/sclp.h | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index ae1d6ee382a5..05f6951095c1 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c @@ -69,7 +69,7 @@ static struct init_sccb *sclp_init_sccb; /* Number of console pages to allocate, used by sclp_con.c and sclp_vt220.c */ int sclp_console_pages = SCLP_CONSOLE_PAGES; /* Flag to indicate if buffer pages are dropped on buffer full condition */ -int sclp_console_drop = 1; +bool sclp_console_drop = true; /* Number of times the console dropped buffer pages */ unsigned long sclp_console_full; @@ -195,12 +195,7 @@ __setup("sclp_con_pages=", sclp_setup_console_pages); static int __init sclp_setup_console_drop(char *str) { - int drop, rc; - - rc = kstrtoint(str, 0, &drop); - if (!rc) - sclp_console_drop = drop; - return 1; + return kstrtobool(str, &sclp_console_drop) == 0; } __setup("sclp_con_drop=", sclp_setup_console_drop); diff --git a/drivers/s390/char/sclp.h b/drivers/s390/char/sclp.h index 86dd2cde0f78..909ba7f08688 100644 --- a/drivers/s390/char/sclp.h +++ b/drivers/s390/char/sclp.h @@ -307,7 +307,7 @@ enum { extern int sclp_init_state; extern int sclp_console_pages; -extern int sclp_console_drop; +extern bool sclp_console_drop; extern unsigned long sclp_console_full; extern bool sclp_mask_compat_mode; |