[PATCH] fs: export file system detection functionality

Sascha Hauer sha at pengutronix.de
Tue Oct 4 23:27:52 PDT 2022


On Fri, Sep 30, 2022 at 05:40:53PM +0200, Ahmad Fatoum wrote:
> This will come in handy when using barebox as EFI loader, so give it a
> more generic name and export it.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
>  fs/fs.c      | 4 ++--
>  include/fs.h | 2 ++
>  2 files changed, 4 insertions(+), 2 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/fs/fs.c b/fs/fs.c
> index a314a49b2db7..95813b6089c7 100644
> --- a/fs/fs.c
> +++ b/fs/fs.c
> @@ -756,7 +756,7 @@ int register_fs_driver(struct fs_driver_d *fsdrv)
>  }
>  EXPORT_SYMBOL(register_fs_driver);
>  
> -static const char *detect_fs(const char *filename, const char *fsoptions)
> +const char *fs_detect(const char *filename, const char *fsoptions)
>  {
>  	enum filetype type;
>  	struct driver_d *drv;
> @@ -2980,7 +2980,7 @@ int mount(const char *device, const char *fsname, const char *pathname,
>  			device, pathname, fsname, fsoptions);
>  
>  	if (!fsname)
> -		fsname = detect_fs(device, fsoptions);
> +		fsname = fs_detect(device, fsoptions);
>  
>  	if (!fsname) {
>  		ret = -ENOENT;
> diff --git a/include/fs.h b/include/fs.h
> index 9ea522dc2cc3..b501db38addd 100644
> --- a/include/fs.h
> +++ b/include/fs.h
> @@ -179,4 +179,6 @@ static inline const char *devpath_to_name(const char *devpath)
>  	return devpath;
>  }
>  
> +const char *fs_detect(const char *filename, const char *fsoptions);
> +
>  #endif /* __FS_H */
> -- 
> 2.30.2
> 
> 
> 

-- 
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 |



More information about the barebox mailing list