int ret;
int i;
+ if (part_drv->test(desc))
+ continue;
+
for (i = 1; i < part_drv->max_entries; i++) {
ret = part_drv->get_info(desc, i, &pinfo);
- if (ret) {
- /* no more entries in table */
- break;
- }
+ if (ret)
+ continue;
ptr = &part_list[str_len];
tmp_len = strlen((const char *)pinfo.name);
/* One byte for space(" ") delimiter */
ptr[tmp_len] = ' ';
}
+ if (*part_list)
+ part_list[strlen(part_list) - 1] = 0;
+ break;
}
- if (*part_list)
- part_list[strlen(part_list) - 1] = 0;
debug("setenv gpt_partition_list %s\n", part_list);
return env_set("gpt_partition_list", part_list);
if (ret)
goto fail;
- ret = env_set_ulong("gpt_partition_entry", i);
+ ret = env_set_hex("gpt_partition_entry", i);
if (ret)
goto fail;
for (i = 1; i < part_drv->max_entries; i++) {
ret = part_drv->get_info(desc, i, &pinfo);
- if (ret) {
- /* no more entries in table */
- break;
- }
+ if (ret)
+ continue;
if (!strcmp(name, (const char *)pinfo.name)) {
/* match found, setup environment variables */
" gpt_partition_name, gpt_partition_entry\n"
" gpt enumerate mmc 0\n"
" - store list of partitions to gpt_partition_list environment variable\n"
- " read <interface> <dev>\n"
- " - read GPT into a data structure for manipulation\n"
" gpt guid <interface> <dev>\n"
" - print disk GUID\n"
" gpt guid <interface> <dev> <varname>\n"