diff options
-rw-r--r-- | fs/fs.c | 5 | ||||
-rw-r--r-- | include/fs.h | 2 |
2 files changed, 4 insertions, 3 deletions
@@ -808,8 +808,8 @@ int mount(const char *device, const char *fsname, const char *_path) dev = &fsdev->dev; /* add mtab entry */ - entry = &fsdev->mtab; - safe_strncpy(entry->path, path, PATH_MAX); + entry = &fsdev->mtab; + entry->path = xstrdup(path); entry->dev = dev; entry->parent_device = parent_device; @@ -860,6 +860,7 @@ int umount(const char *pathname) return errno; } + free(entry->path); list_del(&entry->list); if (entry == mtab_root) mtab_root = NULL; diff --git a/include/fs.h b/include/fs.h index d31fb20522..f1a1931630 100644 --- a/include/fs.h +++ b/include/fs.h @@ -77,7 +77,7 @@ struct fs_driver_d { }; struct mtab_entry { - char path[PATH_MAX]; + char *path; struct device_d *dev; struct device_d *parent_device; struct list_head list; |