Re: [PATCH] block: fix and simplify blkdevparts= cmdline parsing

From: Jens Axboe
Date: Fri May 03 2024 - 11:58:28 EST



On Sun, 21 Apr 2024 16:39:52 +0900, INAGAKI Hiroshi wrote:
> Fix the cmdline parsing of the "blkdevparts=" parameter using strsep(),
> which makes the code simpler.
>
> Before commit 146afeb235cc ("block: use strscpy() to instead of
> strncpy()"), we used a strncpy() to copy a block device name and partition
> names. The commit simply replaced a strncpy() and NULL termination with
> a strscpy(). It did not update calculations of length passed to strscpy().
> While the length passed to strncpy() is just a length of valid characters
> without NULL termination ('\0'), strscpy() takes it as a length of the
> destination buffer, including a NULL termination.
>
> [...]

Applied, thanks!

[1/1] block: fix and simplify blkdevparts= cmdline parsing
commit: bc2e07dfd2c49aaa4b52302cf7b55cf94e025f79

Best regards,
--
Jens Axboe