On Sat, 15 May 2021 at 12:14, Sean Anderson <sean...@gmail.com> wrote: > > 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.g...@gmx.de> > Signed-off-by: Sean Anderson <sean...@gmail.com> > --- > > Changes in v2: > - Fix unit test failing if bootdevice was set > > disk/part.c | 6 +++++- > test/dm/part.c | 39 +++++++++++++++++++++++++++++++-------- > 2 files changed, 36 insertions(+), 9 deletions(-)
Reviewed-by: Simon Glass <s...@chromium.org>