summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorEric Andersen2002-12-05 07:24:08 +0000
committerEric Andersen2002-12-05 07:24:08 +0000
commitdeca106b6dad70ad0a1312a82d762aa8d8ad52ba (patch)
treef11db23c430298ac9da2f3de80ec6c86cc75be70 /util-linux
parent6f9b45b9eff22c664b93ace82d20669340a762f8 (diff)
downloadbusybox-deca106b6dad70ad0a1312a82d762aa8d8ad52ba.zip
busybox-deca106b6dad70ad0a1312a82d762aa8d8ad52ba.tar.gz
Kill CONFIG_FEATURE_USE_DEVPS_PATCH and the devps patch. I'm not
maintaining it anymore, and it is now terribly out of date. -Erik
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mount.c82
1 files changed, 1 insertions, 81 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 829d316..32d0dd5 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -53,9 +53,6 @@
#include <mntent.h>
#include <ctype.h>
#include "busybox.h"
-#if defined CONFIG_FEATURE_USE_DEVPS_PATCH
-# include <linux/devmtab.h> /* For Erik's nifty devmtab device driver */
-#endif
enum {
MS_MGC_VAL = 0xc0ed0000, /* Magic number indicatng "new" flags */
@@ -247,39 +244,6 @@ static int mount_one(char *blockDevice, char *directory, char *filesystemType,
int mount_all)
{
int status = 0;
-
-#if defined CONFIG_FEATURE_USE_DEVPS_PATCH
- if (strcmp(filesystemType, "auto") == 0) {
- static const char *noauto_array[] =
- { "tmpfs", "shm", "proc", "ramfs", "devpts", "devfs", "usbdevfs",
-0 };
- const char **noauto_fstype;
- const int num_of_filesystems = sysfs(3, 0, 0);
- char buf[255];
- int i = 0;
-
- filesystemType = buf;
-
- while (i < num_of_filesystems) {
- sysfs(2, i++, filesystemType);
- for (noauto_fstype = noauto_array; *noauto_fstype;
- noauto_fstype++) {
- if (!strcmp(filesystemType, *noauto_fstype)) {
- break;
- }
- }
- if (!*noauto_fstype) {
- status =
- do_mount(blockDevice, directory, filesystemType,
- flags | MS_MGC_VAL, string_flags, useMtab,
- fakeIt, mtab_opts, mount_all);
- if (status) {
- break;
- }
- }
- }
- }
-#else
if (strcmp(filesystemType, "auto") == 0) {
char buf[255];
FILE *f;
@@ -346,9 +310,7 @@ static int mount_one(char *blockDevice, char *directory, char *filesystemType,
}
}
fclose(f);
- }
-#endif
- else {
+ } else {
status =
do_mount(blockDevice, directory, filesystemType,
flags | MS_MGC_VAL, string_flags, useMtab, fakeIt,
@@ -366,47 +328,6 @@ static int mount_one(char *blockDevice, char *directory, char *filesystemType,
static void show_mounts(char *onlytype)
{
-#if defined CONFIG_FEATURE_USE_DEVPS_PATCH
- int fd, i, numfilesystems;
- char device[] = "/dev/mtab";
- struct k_mntent *mntentlist;
-
- /* open device */
- fd = open(device, O_RDONLY);
- if (fd < 0) {
- perror_msg_and_die("open failed for `%s'", device);
- }
-
- /* How many mounted filesystems? We need to know to
- * allocate enough space for later... */
- numfilesystems = ioctl(fd, DEVMTAB_COUNT_MOUNTS);
- if (numfilesystems < 0) {
- perror_msg_and_die("\nDEVMTAB_COUNT_MOUNTS");
- }
- mntentlist =
- (struct k_mntent *) xcalloc(numfilesystems, sizeof(struct k_mntent));
-
- /* Grab the list of mounted filesystems */
- if (ioctl(fd, DEVMTAB_GET_MOUNTS, mntentlist) < 0) {
- perror_msg_and_die("\nDEVMTAB_GET_MOUNTS");
- }
-
- for (i = 0; i < numfilesystems; i++) {
- if (!onlytype || (strcmp(mntentlist[i].mnt_type, onlytype) == 0)) {
- printf("%s %s %s %s %d %d\n", mntentlist[i].mnt_fsname,
- mntentlist[i].mnt_dir, mntentlist[i].mnt_type,
- mntentlist[i].mnt_opts, mntentlist[i].mnt_freq,
- mntentlist[i].mnt_passno);
- }
- }
-#ifdef CONFIG_FEATURE_CLEAN_UP
- /* Don't bother to close files or free memory. Exit
- * does that automagically, so we can save a few bytes */
- free(mntentlist);
- close(fd);
-#endif
- exit(EXIT_SUCCESS);
-#else
FILE *mountTable = setmntent(mtab_file, "r");
if (mountTable) {
@@ -433,7 +354,6 @@ static void show_mounts(char *onlytype)
perror_msg_and_die("%s", mtab_file);
}
exit(EXIT_SUCCESS);
-#endif
}
extern int mount_main(int argc, char **argv)