Index: boot/uboot/lib/disk.c =================================================================== --- boot/uboot/lib/disk.c (revision 256304) +++ boot/uboot/lib/disk.c (working copy) @@ -179,12 +179,25 @@ { va_list ap; struct disk_devdesc *dev; + int i, rc; va_start(ap, f); dev = va_arg(ap, struct disk_devdesc *); va_end(ap); - return (stor_opendev(dev)); + for (i = 0; i < stor_info_no; i++) { + dev->d_unit = i; + dev->d_slice = 0; + dev->d_partition = 0; + if (stor_opendev(dev) == 0) + return (0); + if (SI(dev).opened > 0) { + ub_dev_close(stor_info[i].handle); + SI(dev).opened--; + } + } + + return (ENXIO); } static int