aboutsummaryrefslogtreecommitdiff
path: root/mtab.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-02-01 22:43:49 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-02-01 22:43:49 +0000
commita773090651a1d7b61974fbd637826668e7061449 (patch)
tree47dca5ab2df8982ea929c902216bca6bf9c31f44 /mtab.c
parentdeaca5da3373819de42ee9204f93fa8cfa3f48a5 (diff)
downloadbusybox-w32-a773090651a1d7b61974fbd637826668e7061449.tar.gz
busybox-w32-a773090651a1d7b61974fbd637826668e7061449.tar.bz2
busybox-w32-a773090651a1d7b61974fbd637826668e7061449.zip
Apply a patch from Larry Doolittle to add "-all" and "-none" switches
to multibuild.pl. I did a little formatting adjustments to make it _very_ obvious when things stop working. I also removed the USE_PROCFS config option -- just do the right thing when USE_DEVPS_PATCH is enabled. -Erik git-svn-id: svn://busybox.net/trunk/busybox@1739 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'mtab.c')
-rw-r--r--mtab.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/mtab.c b/mtab.c
index ab805e9c1..33b11c83e 100644
--- a/mtab.c
+++ b/mtab.c
@@ -21,12 +21,8 @@ void erase_mtab(const char *name)
21 21
22 /* Check if reading the mtab file failed */ 22 /* Check if reading the mtab file failed */
23 if (mountTable == 0 23 if (mountTable == 0
24#if ! defined BB_FEATURE_USE_PROCFS 24 /* Bummer. fall back on trying the /proc filesystem */
25 ) { 25 && (mountTable = setmntent("/proc/mounts", "r")) == 0) {
26#else
27 /* Bummer. fall back on trying the /proc filesystem */
28 && (mountTable = setmntent("/proc/mounts", "r")) == 0) {
29#endif
30 perror_msg("%s", mtab_file); 26 perror_msg("%s", mtab_file);
31 return; 27 return;
32 } 28 }
@@ -74,14 +70,12 @@ void write_mtab(char *blockDevice, char *directory,
74 if (length > 1 && directory[length - 1] == '/') 70 if (length > 1 && directory[length - 1] == '/')
75 directory[length - 1] = '\0'; 71 directory[length - 1] = '\0';
76 72
77#ifdef BB_FEATURE_USE_PROCFS
78 if (filesystemType == 0) { 73 if (filesystemType == 0) {
79 struct mntent *p = find_mount_point(blockDevice, "/proc/mounts"); 74 struct mntent *p = find_mount_point(blockDevice, "/proc/mounts");
80 75
81 if (p && p->mnt_type) 76 if (p && p->mnt_type)
82 filesystemType = p->mnt_type; 77 filesystemType = p->mnt_type;
83 } 78 }
84#endif
85 m.mnt_fsname = blockDevice; 79 m.mnt_fsname = blockDevice;
86 m.mnt_dir = directory; 80 m.mnt_dir = directory;
87 m.mnt_type = filesystemType ? filesystemType : "default"; 81 m.mnt_type = filesystemType ? filesystemType : "default";