OSDN Git Service

watchdog: Use sysfs_emit() and sysfs_emit_at() in "show" functions
authorJuerg Haefliger <juerg.haefliger@canonical.com>
Tue, 11 May 2021 06:18:12 +0000 (08:18 +0200)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Mon, 21 Jun 2021 06:49:03 +0000 (08:49 +0200)
commit3bb21781d13516baf14dc051dbe2b3145c704cda
tree60a0b0c558688435c85d38bd5f6ae04e9fb34c0c
parentd0212f095ab56672f6f36aabc605bda205e1e0bf
watchdog: Use sysfs_emit() and sysfs_emit_at() in "show" functions

Convert sprintf() in sysfs "show" functions to sysfs_emit() and
sysfs_emit_at() in order to check for buffer overruns in sysfs outputs.

Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210511061812.480172-1-juergh@canonical.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/aspeed_wdt.c
drivers/watchdog/watchdog_dev.c
drivers/watchdog/watchdog_pretimeout.c
drivers/watchdog/ziirave_wdt.c