mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-21 15:34:59 +00:00
dfu: Fix listing devices using the ST reference bootloader
This commit is contained in:
parent
877df1dda3
commit
c6a8deeb4c
@ -677,7 +677,7 @@ dfu_target_dfuse_func (void)
|
||||
g_free (tmp);
|
||||
|
||||
/* multiple sectors */
|
||||
ret = dfu_target_parse_sectors (target, "@Flash1 /0x08000000/2*001 Ka,4*001 Kg", &error);
|
||||
ret = dfu_target_parse_sectors (target, "@Flash1 /0x08000000/2*001Ka,4*001Kg", &error);
|
||||
g_assert_no_error (error);
|
||||
g_assert (ret);
|
||||
tmp = dfu_target_sectors_to_string (target);
|
||||
|
@ -213,13 +213,10 @@ dfu_target_parse_sector (DfuTarget *target,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* optional spaces */
|
||||
while (tmp[0] == ' ')
|
||||
tmp++;
|
||||
|
||||
/* get multiplier */
|
||||
switch (tmp[0]) {
|
||||
case 'B': /* byte */
|
||||
case ' ': /* byte, ST reference bootloader :/ */
|
||||
break;
|
||||
case 'K': /* Kilo */
|
||||
sector_size *= 0x400;
|
||||
|
@ -1817,7 +1817,9 @@ dfu_tool_list_target (DfuTarget *target)
|
||||
if (tmp != NULL) {
|
||||
/* TRANSLATORS: interface name, e.g. "Flash" */
|
||||
dfu_tool_print_indent (_("Name"), tmp, 2);
|
||||
} else {
|
||||
} else if (!g_error_matches (error_local,
|
||||
DFU_ERROR,
|
||||
DFU_ERROR_NOT_FOUND)) {
|
||||
g_autofree gchar *str = NULL;
|
||||
str = g_strdup_printf ("Error: %s", error_local->message);
|
||||
dfu_tool_print_indent (_("Name"), str, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user