docs: notifier-error-inject: fix non-working usage of negative values
Subsystems (3)
Hi!
Quoted 12 lines · Akinobu Mita
Quoted 10 lines
2022年9月15日(木) 18:01 Zhao Gongyi <[email protected]>:
Quoted 9 lines
Fault injection uses debugfs in a way that the provided values via sysfs are interpreted as u64. Providing negative numbers results in an error:
# cd sys/kernel/debug/notifier-error-inject/memory # echo -12 > actions/MEM_GOING_ONLINE/error -bash: echo: write error: Invalid argument
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Update the docs and examples to use "printf %#x <val>" in these cases.
I'd rather fix the notifier-error-inject module than change the user
interface.
Quoted 2 lines
I'll send a patch, so could you check if that solves the problem.
That will also make patch #2 unnecessary, correct?
Yes. But there is another commit 005747526d4f3c2ec995891e95cb7625161022f9 that has the same problem.
Thanks!
Quoted 5 lines
--
Thanks,David / dhildenb
Quoted 18 lines · zhaogongyi
Hi!
Quoted 16 lines · Akinobu Mita
Quoted 6 lines
2022年9月15日(木) 18:01 Zhao Gongyi <[email protected]>:
Quoted 5 lines
Fault injection uses debugfs in a way that the provided values via sysfs are interpreted as u64. Providing negative numbers results in an error:
Quoted 7 lines
Quoted 5 lines
# cd sys/kernel/debug/notifier-error-inject/memory # echo -12 > actions/MEM_GOING_ONLINE/error -bash: echo: write error: Invalid argumentUpdate the docs and examples to use "printf %#x <val>" in these cases.
I'd rather fix the notifier-error-inject module than change the user
interface.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
I'll send a patch, so could you check if that solves the problem.
That will also make patch #2 unnecessary, correct?
Yes. But there is another commit
005747526d4f3c2ec995891e95cb7625161022f9that has the same problem.Thanks!
Right. See my reply to the other patch:
https://lkml.kernel.org/r/[email protected]
simple_attr_read()/simple_attr_write() fmt behavior is odd.
Signature · 3 lines
Thanks, David / dhildenb