diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/devfs-core.c | 2 | ||||
-rw-r--r-- | fs/fs.c | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/fs/devfs-core.c b/fs/devfs-core.c index 382606f1cf..26fffbb6c2 100644 --- a/fs/devfs-core.c +++ b/fs/devfs-core.c @@ -332,6 +332,8 @@ static struct cdev *__devfs_add_partition(struct cdev *cdev, devfs_create(new); + cdev_create_default_automount(new); + return new; } @@ -328,6 +328,20 @@ int automount_add(const char *path, const char *cmd) } EXPORT_SYMBOL(automount_add); +void cdev_create_default_automount(struct cdev *cdev) +{ + char *path, *cmd; + + path = basprintf("/mnt/%s", cdev->name); + cmd = basprintf("mount %s", cdev->name); + + make_directory(path); + automount_add(path, cmd); + + free(cmd); + free(path); +} + void automount_print(void) { struct automount *am; |