Thread (11 messages) 11 messages, 3 authors, 2012-08-13

Re: [PATCH 1/4] fs/mount: add autodetection type support

From: Sascha Hauer <s.hauer@pengutronix.de>
Date: 2012-08-12 12:46:32

On Sun, Aug 12, 2012 at 01:49:36PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
if NULL is pass as type mount will try to autodetect the filesystem type

+static const char * detect_fs(const char *filename)
+{
+	enum filetype type = file_name_detect_type(filename);
+	struct driver_d *drv;
+	struct fs_driver_d *fdrv;
+
+	if (type == filetype_unknown)
+		return NULL;
+
+	for_each_driver(drv) {
+		fdrv = drv_to_fs_driver(drv);
+
+		if (drv->bus != &fs_bus)
+			continue;
Please convert drv to a fdrv after checking that this is really a
filesystem driver, not before.
I know, it's both the same in this case, but it looks confusing.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help