diff options
| author | Tom Rini <trini@konsulko.com> | 2021-08-02 13:32:20 -0400 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2021-08-02 13:32:20 -0400 |
| commit | 51aef405550e603ff702c034f0e2cd0f15bdf2bb (patch) | |
| tree | 15216d11d6890cd497b6a97176c7aad4c4d63ecf /drivers/dfu/dfu_sf.c | |
| parent | 73994c452fc5a960114360a651201ac48b135e81 (diff) | |
| parent | e6951139c0544116330b12e287fe45e30bbab11c (diff) | |
Merge branch '2021-08-02-numeric-input-cleanups'
- Merge in a series that cleans up and makes more consistent how we deal
with numeric input on the CLI. This saves a few bytes in a lot of
places.
Diffstat (limited to 'drivers/dfu/dfu_sf.c')
| -rw-r--r-- | drivers/dfu/dfu_sf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dfu/dfu_sf.c b/drivers/dfu/dfu_sf.c index 8f8c4259772..7e64ab772f0 100644 --- a/drivers/dfu/dfu_sf.c +++ b/drivers/dfu/dfu_sf.c @@ -171,9 +171,9 @@ int dfu_fill_entity_sf(struct dfu_entity *dfu, char *devstr, char *s) st = strsep(&s, " "); if (!strcmp(st, "raw")) { dfu->layout = DFU_RAW_ADDR; - dfu->data.sf.start = simple_strtoul(s, &s, 16); + dfu->data.sf.start = hextoul(s, &s); s++; - dfu->data.sf.size = simple_strtoul(s, &s, 16); + dfu->data.sf.size = hextoul(s, &s); } else if (CONFIG_IS_ENABLED(DFU_SF_PART) && (!strcmp(st, "part") || !strcmp(st, "partubi"))) { char mtd_id[32]; @@ -184,9 +184,9 @@ int dfu_fill_entity_sf(struct dfu_entity *dfu, char *devstr, char *s) dfu->layout = DFU_RAW_ADDR; - dev = simple_strtoul(s, &s, 10); + dev = dectoul(s, &s); s++; - part = simple_strtoul(s, &s, 10); + part = dectoul(s, &s); sprintf(mtd_id, "%s%d,%d", "nor", dev, part - 1); printf("using id '%s'\n", mtd_id); |
