aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-03-02 22:21:34 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-03-02 22:21:34 +0000
commit2fcc0a15a746844986b3a62827071cffd24dffc7 (patch)
tree179079ed7bce2c5283efe2411b43de7ec845e6ba
parent91f2c5818322d3dc6232cf42ef2f10e3acace21a (diff)
downloadbusybox-w32-2fcc0a15a746844986b3a62827071cffd24dffc7.tar.gz
busybox-w32-2fcc0a15a746844986b3a62827071cffd24dffc7.tar.bz2
busybox-w32-2fcc0a15a746844986b3a62827071cffd24dffc7.zip
Dont try to automount some specific filesystem types
git-svn-id: svn://busybox.net/trunk/busybox@1958 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--mount.c18
-rw-r--r--util-linux/mount.c18
2 files changed, 28 insertions, 8 deletions
diff --git a/mount.c b/mount.c
index cddccadb4..fd68dafd6 100644
--- a/mount.c
+++ b/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,
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,