diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-11-29 20:45:23 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-11-29 20:45:23 +0100 |
commit | e0f4fb2c982d66210dfd5ffaf92912bf1c6c6586 (patch) | |
tree | 6095eff90c4f335e47dc2454be6edc671dfe5e1b /fs | |
parent | 97e0b488a94c6f8c9bac5100b0f8542264d555be (diff) | |
parent | 6fa8c93a5ecefe4effa0e0425441a8ff6b2ce6ab (diff) | |
download | barebox-e0f4fb2c982d66210dfd5ffaf92912bf1c6c6586.tar.gz barebox-e0f4fb2c982d66210dfd5ffaf92912bf1c6c6586.tar.xz |
Merge branch 'master' into next
Conflicts:
drivers/ata/disk_drive.c
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fat/fat.c | 2 | ||||
-rw-r--r-- | fs/fs.c | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 4219801bde..8420f3a097 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -354,6 +354,8 @@ static int fat_stat(struct device_d *dev, const char *filename, struct stat *s) FILINFO finfo; int ret; + memset(&finfo, 0, sizeof(FILINFO)); + ret = f_stat(&priv->fat, filename, &finfo); if (ret) return ret; @@ -743,6 +743,7 @@ int mount(const char *device, const char *fsname, const char *_path) struct mtab_entry *entry; struct fs_device_d *fsdev; struct device_d *dev, *parent_device = NULL; + struct cdev *cdev = NULL; int ret; char *path = normalise_path(_path); @@ -808,6 +809,12 @@ int mount(const char *device, const char *fsname, const char *_path) goto out2; } + if (!strncmp(device, "/dev/", 5)) { + cdev = cdev_by_name(device + 5); + if(cdev) + parent_device = cdev->dev; + } + if (parent_device) dev_add_child(parent_device, &fsdev->dev); |