diff options
author | Marek Vasut <marex@denx.de> | 2025-04-30 18:45:52 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-05-05 14:19:20 -0600 |
commit | 4d3b5c679bc9d5c6cbbeedcc1e4a186f1cc35541 (patch) | |
tree | 9cc4a3ecfe160a165ff829e2683c3d9f233cca8e | |
parent | 4ba2fe14f2cecf7b614220e8e19c1fcdda92b748 (diff) |
fs: exfat: Inhibit unused exfat_humanize_bytes() and exfat_print_info()
Make sure unused exfat_humanize_bytes() and exfat_print_info()
functions are not compiled into U-Boot code base. This also removes
CID 550300: Integer handling issues (INTEGER_OVERFLOW)
in exfat_humanize_bytes() , which is now surely unreachable.
Signed-off-by: Marek Vasut <marex@denx.de>
-rw-r--r-- | fs/exfat/exfat.h | 2 | ||||
-rw-r--r-- | fs/exfat/utils.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/fs/exfat/exfat.h b/fs/exfat/exfat.h index cce3e3021ca..ca6f22b9d58 100644 --- a/fs/exfat/exfat.h +++ b/fs/exfat/exfat.h @@ -210,9 +210,11 @@ uint32_t exfat_vbr_start_checksum(const void* sector, size_t size); uint32_t exfat_vbr_add_checksum(const void* sector, size_t size, uint32_t sum); le16_t exfat_calc_name_hash(const struct exfat* ef, const le16_t* name, size_t length); +#ifndef __UBOOT__ void exfat_humanize_bytes(uint64_t value, struct exfat_human_bytes* hb); void exfat_print_info(const struct exfat_super_block* sb, uint32_t free_clusters); +#endif bool exfat_match_option(const char* options, const char* option_name); int exfat_utf16_to_utf8(char* output, const le16_t* input, size_t outsize, diff --git a/fs/exfat/utils.c b/fs/exfat/utils.c index 0d97b65dcab..f99dcba7e3d 100644 --- a/fs/exfat/utils.c +++ b/fs/exfat/utils.c @@ -134,6 +134,7 @@ le16_t exfat_calc_name_hash(const struct exfat* ef, const le16_t* name, return cpu_to_le16(hash); } +#ifndef __UBOOT__ void exfat_humanize_bytes(uint64_t value, struct exfat_human_bytes* hb) { size_t i; @@ -178,6 +179,7 @@ void exfat_print_info(const struct exfat_super_block* sb, exfat_humanize_bytes(avail_space, &hb); printf("Available space %10"PRIu64" %s\n", hb.value, hb.unit); } +#endif bool exfat_match_option(const char* options, const char* option_name) { |