Skip to contentSkip to conversation

fixup! detect_fs: use device instead of file

PATCH Superseded Peter Mamonov 2 participants 4 messages Oct 12, 2015 – Oct 13, 2015 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fixup! detect_fs: use device instead of file

---
 fs/fs.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
fs/fs.c +5 -1
index c041e41..c2a20e1 100644
@@ -1201,10 +1201,14 @@ EXPORT_SYMBOL(register_fs_driver);
 
 static const char *detect_fs(const char *filename)
 {
-	enum filetype type = cdev_detect_type(filename);
+	enum filetype type;
 	struct driver_d *drv;
 	struct fs_driver_d *fdrv;
 
+	if (!strncmp(filename, "/dev/", 5))
+		filename += 5;
+	type = cdev_detect_type(filename);
+
 	if (type == filetype_unknown)
 		return NULL;
 
Signature · 7 lines
2.1.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

Hi Peter,

I was about to apply this one, but there are two problems with it. First I cannot apply this as a fixup patch since the patch breaking it is already in master which I do not rebase. So we need a patch with a proper commit message. I would add that myself, but I noticed that your patch misses a proper signed-off-by. Could you add that and resend?

Sascha

Quoted 33 lines · Peter Mamonov
---
 fs/fs.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
fs/fs.c +5 -1
index c041e41..c2a20e1 100644
@@ -1201,10 +1201,14 @@ EXPORT_SYMBOL(register_fs_driver);
 
 static const char *detect_fs(const char *filename)
 {
-	enum filetype type = cdev_detect_type(filename);
+	enum filetype type;
 	struct driver_d *drv;
 	struct fs_driver_d *fdrv;
 
+	if (!strncmp(filename, "/dev/", 5))
+		filename += 5;
+	type = cdev_detect_type(filename);
+
 	if (type == filetype_unknown)
 		return NULL;
 
Signature · 7 lines
2.1.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH RESEND 1/1 fixup! detect_fs: use device instead of file

---
 fs/fs.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
fs/fs.c +5 -1
index c041e41..c2a20e1 100644
@@ -1201,10 +1201,14 @@ EXPORT_SYMBOL(register_fs_driver);
 
 static const char *detect_fs(const char *filename)
 {
-	enum filetype type = cdev_detect_type(filename);
+	enum filetype type;
 	struct driver_d *drv;
 	struct fs_driver_d *fdrv;
 
+	if (!strncmp(filename, "/dev/", 5))
+		filename += 5;
+	type = cdev_detect_type(filename);
+
 	if (type == filetype_unknown)
 		return NULL;
 
Signature · 7 lines
2.1.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#3 lore raw
Quoted 4 lines · Peter Mamonov
---
 fs/fs.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Applied, thanks

Sascha

Quoted 25 lines
fs/fs.c +5 -1
index c041e41..c2a20e1 100644
@@ -1201,10 +1201,14 @@ EXPORT_SYMBOL(register_fs_driver);
 
 static const char *detect_fs(const char *filename)
 {
-	enum filetype type = cdev_detect_type(filename);
+	enum filetype type;
 	struct driver_d *drv;
 	struct fs_driver_d *fdrv;
 
+	if (!strncmp(filename, "/dev/", 5))
+		filename += 5;
+	type = cdev_detect_type(filename);
+
 	if (type == filetype_unknown)
 		return NULL;
 
Signature · 1 line
2.1.4
Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox