mirror of
https://github.com/sheumann/hush.git
synced 2024-11-05 21:04:56 +00:00
Dont try to automount some specific filesystem types
This commit is contained in:
parent
446dd27843
commit
323434be42
18
mount.c
18
mount.c
@ -239,18 +239,28 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
|
|||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
if (strcmp(filesystemType, "auto") == 0) {
|
if (strcmp(filesystemType, "auto") == 0) {
|
||||||
int i=0;
|
static const char *strings[] = { "tmpfs", "shm", "proc", "ramfs", "devpts", 0 };
|
||||||
|
const char** nodevfss;
|
||||||
const int num_of_filesystems = sysfs(3, 0, 0);
|
const int num_of_filesystems = sysfs(3, 0, 0);
|
||||||
char buf[255];
|
char buf[255];
|
||||||
|
int i=0;
|
||||||
|
|
||||||
filesystemType=buf;
|
filesystemType=buf;
|
||||||
|
|
||||||
while(i < num_of_filesystems) {
|
while(i < num_of_filesystems) {
|
||||||
sysfs(2, i++, filesystemType);
|
sysfs(2, i++, filesystemType);
|
||||||
status = do_mount(blockDevice, directory, filesystemType,
|
for (nodevfss = strings; *nodevfss; nodevfss++) {
|
||||||
|
if (!strcmp(filesystemType, *nodevfss)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!*nodevfss) {
|
||||||
|
status = do_mount(blockDevice, directory, filesystemType,
|
||||||
flags | MS_MGC_VAL, string_flags,
|
flags | MS_MGC_VAL, string_flags,
|
||||||
useMtab, fakeIt, mtab_opts);
|
useMtab, fakeIt, mtab_opts);
|
||||||
if (status == TRUE)
|
if (status == TRUE)
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
status = do_mount(blockDevice, directory, filesystemType,
|
status = do_mount(blockDevice, directory, filesystemType,
|
||||||
|
@ -239,18 +239,28 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
|
|||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
if (strcmp(filesystemType, "auto") == 0) {
|
if (strcmp(filesystemType, "auto") == 0) {
|
||||||
int i=0;
|
static const char *strings[] = { "tmpfs", "shm", "proc", "ramfs", "devpts", 0 };
|
||||||
|
const char** nodevfss;
|
||||||
const int num_of_filesystems = sysfs(3, 0, 0);
|
const int num_of_filesystems = sysfs(3, 0, 0);
|
||||||
char buf[255];
|
char buf[255];
|
||||||
|
int i=0;
|
||||||
|
|
||||||
filesystemType=buf;
|
filesystemType=buf;
|
||||||
|
|
||||||
while(i < num_of_filesystems) {
|
while(i < num_of_filesystems) {
|
||||||
sysfs(2, i++, filesystemType);
|
sysfs(2, i++, filesystemType);
|
||||||
status = do_mount(blockDevice, directory, filesystemType,
|
for (nodevfss = strings; *nodevfss; nodevfss++) {
|
||||||
|
if (!strcmp(filesystemType, *nodevfss)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!*nodevfss) {
|
||||||
|
status = do_mount(blockDevice, directory, filesystemType,
|
||||||
flags | MS_MGC_VAL, string_flags,
|
flags | MS_MGC_VAL, string_flags,
|
||||||
useMtab, fakeIt, mtab_opts);
|
useMtab, fakeIt, mtab_opts);
|
||||||
if (status == TRUE)
|
if (status == TRUE)
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
status = do_mount(blockDevice, directory, filesystemType,
|
status = do_mount(blockDevice, directory, filesystemType,
|
||||||
|
Loading…
Reference in New Issue
Block a user