From 7ca482aee00b6f1d31b09931ce65acdef42f6963 Mon Sep 17 00:00:00 2001 From: andersen Date: Mon, 20 Mar 2006 18:07:13 +0000 Subject: Fix some obvious compile problems. Make the -f' fakeIt option actually work. git-svn-id: svn://busybox.net/trunk/busybox@14583 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- util-linux/mount.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) llist_t *fslist = 0; -void delete_block_backed_filesystems(void); #if ENABLE_FEATURE_CLEAN_UP static void delete_block_backed_filesystems(void) { @@ -189,8 +188,10 @@ static void delete_block_backed_filesystems(void) #if ENABLE_FEATURE_MTAB_SUPPORT static int useMtab; +static int fakeIt; #else #define useMtab 0 +#define fakeIt 0 #endif // Perform actual mount of specific filesystem at specific location. @@ -202,6 +203,8 @@ static int mount_it_now(struct mntent *mp, int vfsflags) parse_mount_options(mp->mnt_opts, &filteropts); + if (fakeIt) { return 0; } + // Mount, with fallback to read-only if necessary. for(;;) { @@ -333,8 +336,10 @@ static int singlemount(struct mntent *mp) if (!fslist) { fslist = get_block_backed_filesystems(); +#if ENABLE_FEATURE_CLEAN_UP if (ENABLE_FEATURE_CLEAN_UP && fslist) atexit(delete_block_backed_filesystems); +#endif } for (fl = fslist; fl; fl = fl->link) { -- cgit v1.2.3-55-g6feb