[PATCH 2/7] filetype: add file_detect_fs_type()
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Mar 18 07:51:44 PDT 2025
Hi,
On 3/18/25 15:41, Sascha Hauer wrote:
> add file_detect_fs_type() which only tests if the buffer contains one of
> the supported filesystems without testing for other binary formats.
> +enum filetype file_detect_fs_type(const void *_buf, size_t bufsize)
[snip]
> enum filetype file_detect_type(const void *_buf, size_t bufsize)
> - if (bufsize >= 1536 && buf16[512 + 28] == le16_to_cpu(0xef53))
> - return filetype_ext;
> -
> if (strncmp(buf8 + CH_TOC_section_name, "CHSETTINGS", 10) == 0)
> return filetype_ch_image
Shouldn't file_detec_type() still call file_detect_fs_type()?
Thanks,
Ahmad
More information about the barebox
mailing list