mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] fs: export file system detection functionality
@ 2022-09-30 15:40 Ahmad Fatoum
  2022-10-05  6:27 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2022-09-30 15:40 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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@pengutronix.de>
---
 fs/fs.c      | 4 ++--
 include/fs.h | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-05  6:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-30 15:40 [PATCH] fs: export file system detection functionality Ahmad Fatoum
2022-10-05  6:27 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox