Skip to content
Commit 26de4296 authored by Sean Anderson's avatar Sean Anderson Committed by Tom Rini
Browse files

part: Add check for NULL dev_part_str



Some callers (e.g. cmd/fs.c) of fs_set_blk_dev may use a NULL dev_part_str.
While blk_get_device_part_str handles this fine,
part_get_info_by_dev_and_name does not. This fixes commands crashing when
implicitly using bootdevice.

The unit test has also been updated to set bootdevice to a known value and
to restore it after we are done.

Fixes: 7194527b ("cmd: fs: Use part_get_info_by_dev_and_name_or_num to parse partitions")
Reported-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: default avatarSean Anderson <seanga2@gmail.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 1e787904
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment