diff options
author | Ian Lepore <ian@FreeBSD.org> | 2014-03-14 00:49:02 +0000 |
---|---|---|
committer | Ian Lepore <ian@FreeBSD.org> | 2014-03-14 00:49:02 +0000 |
commit | 1c598434b907932ea476ff9b0737b29182063766 (patch) | |
tree | dcda3696e310b2f8aedd78cf3bf86d0cadfea28d | |
parent | 17eadb912e3e6b400ca3adb5e4feaebb068e4b8f (diff) | |
download | src-1c598434b907932ea476ff9b0737b29182063766.tar.gz src-1c598434b907932ea476ff9b0737b29182063766.zip |
Notes
-rw-r--r-- | sys/boot/uboot/common/main.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/boot/uboot/common/main.c b/sys/boot/uboot/common/main.c index 531d72857294..20d385039340 100644 --- a/sys/boot/uboot/common/main.c +++ b/sys/boot/uboot/common/main.c @@ -298,9 +298,10 @@ get_load_device(int *type, int *unit, int *slice, int *partition) } static int -probe_disks(int load_type, int load_unit, int load_slice, int load_partition) +probe_disks(int devidx, int load_type, int load_unit, int load_slice, + int load_partition) { - int i, open_result, unit; + int open_result, unit; struct open_file f; currdev.d_disk.slice = load_slice; @@ -317,7 +318,7 @@ probe_disks(int load_type, int load_unit, int load_slice, int load_partition) printf("Checking unit=%d slice=%d partition=%d...", currdev.d_unit, currdev.d_disk.slice, currdev.d_disk.partition); - open_result = devsw[i]->dv_open(&f, &currdev); + open_result = devsw[devidx]->dv_open(&f, &currdev); if (open_result == 0) { printf(" good.\n"); return (0); @@ -337,7 +338,7 @@ probe_disks(int load_type, int load_unit, int load_slice, int load_partition) printf("Checking unit=%d slice=%d partition=%d...", currdev.d_unit, currdev.d_disk.slice, currdev.d_disk.partition); - open_result = devsw[i]->dv_open(&f, &currdev); + open_result = devsw[devidx]->dv_open(&f, &currdev); if (open_result == 0) { printf(" good.\n"); return (0); @@ -351,7 +352,7 @@ probe_disks(int load_type, int load_unit, int load_slice, int load_partition) printf("Checking unit=%d slice=%d partition=%d...", currdev.d_unit, currdev.d_disk.slice, currdev.d_disk.partition); - open_result = devsw[i]->dv_open(&f,&currdev); + open_result = devsw[devidx]->dv_open(&f,&currdev); if (open_result == 0) { printf("good.\n"); return (0); @@ -440,7 +441,7 @@ main(void) if ((load_type == -1 || (load_type & DEV_TYP_STOR)) && strcmp(devsw[i]->dv_name, "disk") == 0) { - if (probe_disks(load_type, load_unit, load_slice, + if (probe_disks(i, load_type, load_unit, load_slice, load_partition) == 0) break; } |