summaryrefslogtreecommitdiff
path: root/util-linux/mount.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-03-20 18:07:13 +0000
committerEric Andersen <andersen@codepoet.org>2006-03-20 18:07:13 +0000
commit19b5b8ff6a40bd72685bf63963394dc2b2707e68 (patch)
treeeb23ac62bc3a6473da68c8b9c72db9aa7fdd7d8f /util-linux/mount.c
parenta6db0eef59ece2b9da6807fa9bdab59a87db8da3 (diff)
downloadbusybox-w32-19b5b8ff6a40bd72685bf63963394dc2b2707e68.tar.gz
busybox-w32-19b5b8ff6a40bd72685bf63963394dc2b2707e68.tar.bz2
busybox-w32-19b5b8ff6a40bd72685bf63963394dc2b2707e68.zip
Fix some obvious compile problems. Make the -f' fakeIt option actually work.
Diffstat (limited to 'util-linux/mount.c')
-rw-r--r--util-linux/mount.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 5ddf54cb1..4750989ce 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -179,7 +179,6 @@ static llist_t *get_block_backed_filesystems(void)
179 179
180llist_t *fslist = 0; 180llist_t *fslist = 0;
181 181
182void delete_block_backed_filesystems(void);
183#if ENABLE_FEATURE_CLEAN_UP 182#if ENABLE_FEATURE_CLEAN_UP
184static void delete_block_backed_filesystems(void) 183static void delete_block_backed_filesystems(void)
185{ 184{
@@ -189,8 +188,10 @@ static void delete_block_backed_filesystems(void)
189 188
190#if ENABLE_FEATURE_MTAB_SUPPORT 189#if ENABLE_FEATURE_MTAB_SUPPORT
191static int useMtab; 190static int useMtab;
191static int fakeIt;
192#else 192#else
193#define useMtab 0 193#define useMtab 0
194#define fakeIt 0
194#endif 195#endif
195 196
196// Perform actual mount of specific filesystem at specific location. 197// Perform actual mount of specific filesystem at specific location.
@@ -202,6 +203,8 @@ static int mount_it_now(struct mntent *mp, int vfsflags)
202 203
203 parse_mount_options(mp->mnt_opts, &filteropts); 204 parse_mount_options(mp->mnt_opts, &filteropts);
204 205
206 if (fakeIt) { return 0; }
207
205 // Mount, with fallback to read-only if necessary. 208 // Mount, with fallback to read-only if necessary.
206 209
207 for(;;) { 210 for(;;) {
@@ -333,8 +336,10 @@ static int singlemount(struct mntent *mp)
333 336
334 if (!fslist) { 337 if (!fslist) {
335 fslist = get_block_backed_filesystems(); 338 fslist = get_block_backed_filesystems();
339#if ENABLE_FEATURE_CLEAN_UP
336 if (ENABLE_FEATURE_CLEAN_UP && fslist) 340 if (ENABLE_FEATURE_CLEAN_UP && fslist)
337 atexit(delete_block_backed_filesystems); 341 atexit(delete_block_backed_filesystems);
342#endif
338 } 343 }
339 344
340 for (fl = fslist; fl; fl = fl->link) { 345 for (fl = fslist; fl; fl = fl->link) {