[PATCH 4/4] fs: pass path directly to cdev_open

Sascha Hauer s.hauer at pengutronix.de
Tue Oct 13 00:51:54 PDT 2015


Now that cdev_open handles a path we no longer have to add /dev/ to
the name.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 fs/fs.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/fs.c b/fs/fs.c
index 2d7578b..4983fc7 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -1222,12 +1222,7 @@ static const char *detect_fs(const char *filename)
 
 int fsdev_open_cdev(struct fs_device_d *fsdev)
 {
-	const char *backingstore = fsdev->backingstore;
-
-	if (!strncmp(backingstore , "/dev/", 5))
-		backingstore += 5;
-
-	fsdev->cdev = cdev_open(backingstore, O_RDWR);
+	fsdev->cdev = cdev_open(fsdev->backingstore, O_RDWR);
 	if (!fsdev->cdev)
 		return -EINVAL;
 
-- 
2.6.0




More information about the barebox mailing list