diff options
| author | Glenn L McGrath <bug1@ihug.co.nz> | 2001-03-02 22:21:34 +0000 |
|---|---|---|
| committer | Glenn L McGrath <bug1@ihug.co.nz> | 2001-03-02 22:21:34 +0000 |
| commit | 323434be429554d41f3f4764c34fd85bfbeed79a (patch) | |
| tree | 179079ed7bce2c5283efe2411b43de7ec845e6ba /util-linux | |
| parent | 446dd27843cd9ba7dfa45ef4b28abb2dd83cde8d (diff) | |
| download | busybox-w32-323434be429554d41f3f4764c34fd85bfbeed79a.tar.gz busybox-w32-323434be429554d41f3f4764c34fd85bfbeed79a.tar.bz2 busybox-w32-323434be429554d41f3f4764c34fd85bfbeed79a.zip | |
Dont try to automount some specific filesystem types
Diffstat (limited to 'util-linux')
| -rw-r--r-- | util-linux/mount.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index cddccadb4..fd68dafd6 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
| @@ -239,18 +239,28 @@ mount_one(char *blockDevice, char *directory, char *filesystemType, | |||
| 239 | int status = 0; | 239 | int status = 0; |
| 240 | 240 | ||
| 241 | if (strcmp(filesystemType, "auto") == 0) { | 241 | if (strcmp(filesystemType, "auto") == 0) { |
| 242 | int i=0; | 242 | static const char *strings[] = { "tmpfs", "shm", "proc", "ramfs", "devpts", 0 }; |
| 243 | const char** nodevfss; | ||
| 243 | const int num_of_filesystems = sysfs(3, 0, 0); | 244 | const int num_of_filesystems = sysfs(3, 0, 0); |
| 244 | char buf[255]; | 245 | char buf[255]; |
| 246 | int i=0; | ||
| 247 | |||
| 245 | filesystemType=buf; | 248 | filesystemType=buf; |
| 246 | 249 | ||
| 247 | while(i < num_of_filesystems) { | 250 | while(i < num_of_filesystems) { |
| 248 | sysfs(2, i++, filesystemType); | 251 | sysfs(2, i++, filesystemType); |
| 249 | status = do_mount(blockDevice, directory, filesystemType, | 252 | for (nodevfss = strings; *nodevfss; nodevfss++) { |
| 253 | if (!strcmp(filesystemType, *nodevfss)) { | ||
| 254 | break; | ||
| 255 | } | ||
| 256 | } | ||
| 257 | if (!*nodevfss) { | ||
| 258 | status = do_mount(blockDevice, directory, filesystemType, | ||
| 250 | flags | MS_MGC_VAL, string_flags, | 259 | flags | MS_MGC_VAL, string_flags, |
| 251 | useMtab, fakeIt, mtab_opts); | 260 | useMtab, fakeIt, mtab_opts); |
| 252 | if (status == TRUE) | 261 | if (status == TRUE) |
| 253 | break; | 262 | break; |
| 263 | } | ||
| 254 | } | 264 | } |
| 255 | } else { | 265 | } else { |
| 256 | status = do_mount(blockDevice, directory, filesystemType, | 266 | status = do_mount(blockDevice, directory, filesystemType, |
