mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-02 15:33:55 +01:00
usbdump: Add support to scan maximum possible partitions
This change adds support to search for valid FAT32 partition throughout the device during crashdump collection on USB, despite encountering any invalid-partition on the loop. Change-Id: Ic6bda03a2448c38f0e93d32214340c2ee896f385 Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
This commit is contained in:
parent
5cc17efe90
commit
06ceaec8fd
1 changed files with 5 additions and 5 deletions
|
|
@ -402,7 +402,8 @@ static int do_dumpqca_data(unsigned int dump_level)
|
|||
#if defined(CONFIG_USB_STORAGE) && defined(CONFIG_FS_FAT)
|
||||
static block_dev_desc_t *stor_dev;
|
||||
disk_partition_t info;
|
||||
int dev_indx, part_indx, max_dev_avail = 0, part = -1;
|
||||
int dev_indx, max_dev_avail = 0;
|
||||
int part_indx = 0, part = -1;
|
||||
int fat_fs = 0;
|
||||
char dev_str[3]; //dev_str = dev:part
|
||||
|
||||
|
|
@ -426,10 +427,6 @@ static int do_dumpqca_data(unsigned int dump_level)
|
|||
|
||||
snprintf(dev_str, sizeof(dev_str)+1, "%d:%d", dev_indx, part_indx);
|
||||
part = get_device_and_partition("usb", dev_str, &stor_dev, &info, 1);
|
||||
if (part < 0) {
|
||||
printf("No valid partition available for device %d\n", dev_indx);
|
||||
break;
|
||||
}
|
||||
|
||||
if (fat_set_blk_dev(stor_dev, &info) == 0) {
|
||||
fat_fs = 1;
|
||||
|
|
@ -438,6 +435,9 @@ static int do_dumpqca_data(unsigned int dump_level)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (part < 0)
|
||||
printf("No valid partition available for device %d\n", dev_indx);
|
||||
}
|
||||
|
||||
if (fat_fs == 1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue