diff options
author | Sam Protsenko <semen.protsenko@linaro.org> | 2017-09-21 23:01:00 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-10-06 18:28:16 +0300 |
commit | 19d141a0f90c640a8d5ed699745cbc8169918945 (patch) | |
tree | b1398220bb1c4f82dd3069d0542711dcfeafa77d /arch | |
parent | 7b09dffc3b07ae08b0b1006ab799c2d1a0364504 (diff) | |
download | u-boot-19d141a0f90c640a8d5ed699745cbc8169918945.tar.xz |
omap: Omit fastboot.userdata_size related errors
When using regular $partitions variable (for Linux boot), we can see
some unwanted messages:
> ERROR: cannot find partition: 'userdata'
> at arch/arm/mach-omap2/utils.c:96/omap_mmc_get_part_size()
> Warning: fastboot.userdata_size: unable to calc
Let's remove those, as missing 'userdata' partition is correct behavior
for Linux partition, and we don't want to see some Android-related
messages in this case.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/utils.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c index f2fafae2a1..f556da4b19 100644 --- a/arch/arm/mach-omap2/utils.c +++ b/arch/arm/mach-omap2/utils.c @@ -92,10 +92,8 @@ static u32 omap_mmc_get_part_size(const char *part) } res = part_get_info_by_name(dev_desc, part, &info); - if (res < 0) { - pr_err("cannot find partition: '%s'\n", part); + if (res < 0) return 0; - } /* Calculate size in bytes */ sz = (info.size * (u64)info.blksz); @@ -111,13 +109,10 @@ static void omap_set_fastboot_userdata_size(void) u32 sz_kb; sz_kb = omap_mmc_get_part_size("userdata"); - if (sz_kb == 0) { - buf[0] = '\0'; - printf("Warning: fastboot.userdata_size: unable to calc\n"); - } else { - sprintf(buf, "%u", sz_kb); - } + if (sz_kb == 0) + return; /* probably it's not Android partition table */ + sprintf(buf, "%u", sz_kb); env_set("fastboot.userdata_size", buf); } #else |