]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
fs: exfat: Remove unused label code
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Thu, 17 Jul 2025 15:29:21 +0000 (16:29 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 24 Jul 2025 19:30:20 +0000 (13:30 -0600)
Smatch reported a possible buffer overflow in exfat_set_label but it
turns out that this code is unused so just guard the function with
'#ifndef __UBOOT__' as well as exfat_get_label that is also unused and
the helper static find_label.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
fs/exfat/exfat.h
fs/exfat/node.c

index ca6f22b9d5846e0a8118d69e9af161c043b51447..bd2965c394282d2178af3ac9109518127e86f38d 100644 (file)
@@ -237,8 +237,10 @@ int exfat_rename(struct exfat* ef, const char* old_path, const char* new_path);
 void exfat_utimes(struct exfat_node* node, const struct timespec tv[2]);
 void exfat_update_atime(struct exfat_node* node);
 void exfat_update_mtime(struct exfat_node* node);
+#ifndef __UBOOT__
 const char* exfat_get_label(struct exfat* ef);
 int exfat_set_label(struct exfat* ef, const char* label);
+#endif /* __UBOOT__ */
 
 int exfat_soil_super_block(const struct exfat* ef);
 int exfat_mount(struct exfat* ef, const char* spec, const char* options);
index 88b1357189c2f3ac2aed6e7bda3550074e437736..b7406fbf3edc6ddbabf5b5caf274f67f3cea4a46 100644 (file)
@@ -1188,6 +1188,7 @@ void exfat_update_mtime(struct exfat_node* node)
        node->is_dirty = true;
 }
 
+#ifndef __UBOOT__
 const char* exfat_get_label(struct exfat* ef)
 {
        return ef->label;
@@ -1241,3 +1242,4 @@ int exfat_set_label(struct exfat* ef, const char* label)
        strcpy(ef->label, label);
        return 0;
 }
+#endif /* __UBOOT__ */