mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: "open list:BAREBOX" <barebox@lists.infradead.org>
Subject: Re: [PATCH 2/7] filetype: add file_detect_fs_type()
Date: Tue, 18 Mar 2025 16:06:47 +0100	[thread overview]
Message-ID: <Z9mMB8_1LV_YmcxN@pengutronix.de> (raw)
In-Reply-To: <f7975f67-d659-48c3-bf1b-498331fc5401@pengutronix.de>

On Tue, Mar 18, 2025 at 03:51:44PM +0100, Ahmad Fatoum wrote:
> 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()?

Sure, that was the intention at least.

Thanks for catching, fixed this.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2025-03-18 15:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18 14:41 [PATCH 0/7] filetype: Some size reduction patches Sascha Hauer
2025-03-18 14:41 ` [PATCH 1/7] filetype: add file_detect_compression_type() Sascha Hauer
2025-03-18 14:41 ` [PATCH 2/7] filetype: add file_detect_fs_type() Sascha Hauer
2025-03-18 14:51   ` Ahmad Fatoum
2025-03-18 15:06     ` Sascha Hauer [this message]
2025-03-18 14:41 ` [PATCH 3/7] filetype: add function pointer to file_name_detect_type_offset() Sascha Hauer
2025-03-18 14:41 ` [PATCH 4/7] filetype: let cdev_detect_type() only detect filesystems Sascha Hauer
2025-03-18 14:41 ` [PATCH 5/7] filetype: make file type strings optional Sascha Hauer
2025-03-18 14:41 ` [PATCH 6/7] ARM: am33xx: myirtech-myd: add MLO specific device tree Sascha Hauer
2025-03-18 14:41 ` [PATCH 7/7] ARM: am335x_mlo_defconfig: disable file type strings Sascha Hauer
2025-03-18 15:01 ` [PATCH 0/7] filetype: Some size reduction patches Alexander Shiyan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z9mMB8_1LV_YmcxN@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox