diff options
author | Sean Anderson <seanga2@gmail.com> | 2021-05-15 21:13:54 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-05-27 00:26:07 +0300 |
commit | 26de4296cc20bb45eb40560b4a4a98fa90a16a28 (patch) | |
tree | de1445c07026f8560505516b883685397fbbcb34 /fs | |
parent | 1e7879045f6c20f68ce2c6fcce7ec187e8844b51 (diff) | |
download | u-boot-26de4296cc20bb45eb40560b4a4a98fa90a16a28.tar.xz |
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: 7194527b6a ("cmd: fs: Use part_get_info_by_dev_and_name_or_num to parse partitions")
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions