summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/device.py
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2025-07-19 09:19:10 -0500
committerMike Marshall <hubcap@omnibond.com>2025-07-22 12:39:29 -0400
commit2138e89cb066b40386b1d9ddd61253347d356474 (patch)
tree79124b5e660e14372f39f787c348e69be6026eac /scripts/gdb/linux/device.py
parent313bf5b79ed1e218b8b793bb297e5d24bdeed0cc (diff)
fs/orangefs: Allow 2 more characters in do_c_string()
The do_k_string() and do_c_string() functions do essentially the same thing which is they add a string and a comma onto the end of an existing string. At the end, the caller will overwrite the last comma with a newline. Later, in orangefs_kernel_debug_init(), we add a newline to the string. The change to do_k_string() is just cosmetic. I moved the "- 1" to the other side of the comparison and made it "+ 1". This has no effect on runtime, I just wanted the functions to match each other and the rest of the file. However in do_c_string(), I removed the "- 2" which allows us to print two extra characters. I noticed this issue while reviewing the code and I doubt affects anything in real life. My guess is that this was double counting the comma and the newline. The "+ 1" accounts for the newline, and the caller will delete the final comma which ensures there is enough space for the newline. Removing the "- 2" lets us print 2 more characters, but mainly it makes the code more consistent and understandable for reviewers. Fixes: 44f4641073f1 ("orangefs: clean up debugfs globals") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'scripts/gdb/linux/device.py')
0 files changed, 0 insertions, 0 deletions