Changeset View
Changeset View
Standalone View
Standalone View
stand/uboot/lib/disk.c
Show First 20 Lines • Show All 248 Lines • ▼ Show 20 Lines | stor_print(int verbose) | ||||
printf("%s devices:", uboot_storage.dv_name); | printf("%s devices:", uboot_storage.dv_name); | ||||
if ((ret = pager_output("\n")) != 0) | if ((ret = pager_output("\n")) != 0) | ||||
return (ret); | return (ret); | ||||
for (i = 0; i < stor_info_no; i++) { | for (i = 0; i < stor_info_no; i++) { | ||||
dev.dd.d_dev = &uboot_storage; | dev.dd.d_dev = &uboot_storage; | ||||
dev.dd.d_unit = i; | dev.dd.d_unit = i; | ||||
dev.d_slice = -1; | dev.d_slice = D_SLICENONE; | ||||
dev.d_partition = -1; | dev.d_partition = D_PARTNONE; | ||||
snprintf(line, sizeof(line), "\tdisk%d (%s)\n", i, | snprintf(line, sizeof(line), "\tdisk%d (%s)\n", i, | ||||
ub_stor_type(SI(&dev).type)); | ub_stor_type(SI(&dev).type)); | ||||
if ((ret = pager_output(line)) != 0) | if ((ret = pager_output(line)) != 0) | ||||
break; | break; | ||||
if (stor_opendev(&dev) == 0) { | if (stor_opendev(&dev) == 0) { | ||||
sprintf(line, "\tdisk%d", i); | sprintf(line, "\tdisk%d", i); | ||||
ret = disk_print(&dev, line, verbose); | ret = disk_print(&dev, line, verbose); | ||||
disk_close(&dev); | disk_close(&dev); | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |