summaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2023-07-21 02:21:45 -0700
committerJakub Kicinski <kuba@kernel.org>2023-07-24 16:06:20 -0700
commit004a04b97bbcbb630421e44aadfe675fe6b4c460 (patch)
tree4e1c407c8b1f8953a3dab1210b342870b4ebba19 /lib/memory-notifier-error-inject.c
parent9f64b6e459d3eee73ca4ea6226653e008d1c1e61 (diff)
netconsole: Use kstrtobool() instead of kstrtoint()
Replace kstrtoint() by kstrtobool() in the sysfs _store() functions. This improves the user usability and simplify the code. With this fix, it is now possible to use [YyNn] to set and unset a feature. Old behaviour is still unchanged. kstrtobool() is also safer and doesn't need the extra validation that is required when converting a string to bool (end field in the struct), which makes the code simpler. Suggested-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/r/20230721092146.4036622-2-leitao@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions