u-boot/disk
Sean Anderson 26de4296cc 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>
2021-05-26 17:26:07 -04:00
..
Kconfig rename symbol: CONFIG_TEGRA -> CONFIG_ARCH_TEGRA 2020-05-15 14:47:35 -04:00
Makefile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
part.c part: Add check for NULL dev_part_str 2021-05-26 17:26:07 -04:00
part_amiga.c common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
part_amiga.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
part_dos.c disk: part_dos: update partition table entries after write 2021-02-01 16:32:06 -05:00
part_dos.h disk: dos: add code for creating MBR partition layout 2021-01-15 15:33:09 -05:00
part_efi.c disk: gpt: verify alternate LBA points to last usable LBA 2021-04-12 17:17:11 -04:00
part_iso.c common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
part_iso.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
part_mac.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
part_mac.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00