]> git.baikalelectronics.ru Git - kernel.git/commit
docs: fault-injection: fix non-working usage of negative values
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 3 Jun 2021 12:58:41 +0000 (14:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:40:55 +0000 (11:40 +0100)
commitc08b48e37affff87f4b6480405a1a79ede5bd94e
tree14f015a76f46c3033b6c50eb6b245172aa04bdcd
parent7a11507002ac7ab3e983314345d4b55ecbcca272
docs: fault-injection: fix non-working usage of negative values

[ Upstream commit 5c5fd0c54b9b915a3aadfc6f0afade66e7594b2a ]

Fault injection uses debugfs in a way that the provided values via sysfs
are interpreted as u64. Providing negative numbers results in an error:

/sys/kernel/debug/fail_function# echo -1 > times
sh: write error: Invalid argument

Update the docs and examples to use "printf %#x <val>" in these cases.
For "retval", reword the paragraph a little and fix a typo.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20210603125841.27436-1-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Stable-dep-of: d472cf797c4e ("debugfs: fix error when writing negative value to atomic_t debugfs file")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Documentation/fault-injection/fault-injection.rst