diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-09-18 18:24:47 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-10-31 10:12:32 +0100 |
| commit | b2c43efc3c8d9cda34eb8421249d15e6fed4d650 (patch) | |
| tree | 79af29e13ae947fd80d2832a43fe0020f26d3b8f /scripts/lib/abi/helpers.py | |
| parent | 3a8660878839faadb4f1a6dd72c3179c1df56787 (diff) | |
initrd: Replace simple_strtol with kstrtoint to improve ramdisk_start_setup
Replace simple_strtol() with the recommended kstrtoint() for parsing the
'ramdisk_start=' boot parameter. Unlike simple_strtol(), which returns a
a long, kstrtoint() converts the string directly to an integer and
avoids implicit casting.
Check the return value of kstrtoint() and reject invalid values. This
adds error handling while preserving existing behavior for valid values,
and removes use of the deprecated simple_strtol() helper.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'scripts/lib/abi/helpers.py')
0 files changed, 0 insertions, 0 deletions
