Fix some obvious compile problems. Make the -f' fakeIt option actually work.
This commit is contained in:
parent
a6db0eef59
commit
19b5b8ff6a
@ -179,7 +179,6 @@ static llist_t *get_block_backed_filesystems(void)
|
|||||||
|
|
||||||
llist_t *fslist = 0;
|
llist_t *fslist = 0;
|
||||||
|
|
||||||
void delete_block_backed_filesystems(void);
|
|
||||||
#if ENABLE_FEATURE_CLEAN_UP
|
#if ENABLE_FEATURE_CLEAN_UP
|
||||||
static void delete_block_backed_filesystems(void)
|
static void delete_block_backed_filesystems(void)
|
||||||
{
|
{
|
||||||
@ -189,8 +188,10 @@ static void delete_block_backed_filesystems(void)
|
|||||||
|
|
||||||
#if ENABLE_FEATURE_MTAB_SUPPORT
|
#if ENABLE_FEATURE_MTAB_SUPPORT
|
||||||
static int useMtab;
|
static int useMtab;
|
||||||
|
static int fakeIt;
|
||||||
#else
|
#else
|
||||||
#define useMtab 0
|
#define useMtab 0
|
||||||
|
#define fakeIt 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Perform actual mount of specific filesystem at specific location.
|
// 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);
|
parse_mount_options(mp->mnt_opts, &filteropts);
|
||||||
|
|
||||||
|
if (fakeIt) { return 0; }
|
||||||
|
|
||||||
// Mount, with fallback to read-only if necessary.
|
// Mount, with fallback to read-only if necessary.
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
@ -333,8 +336,10 @@ static int singlemount(struct mntent *mp)
|
|||||||
|
|
||||||
if (!fslist) {
|
if (!fslist) {
|
||||||
fslist = get_block_backed_filesystems();
|
fslist = get_block_backed_filesystems();
|
||||||
|
#if ENABLE_FEATURE_CLEAN_UP
|
||||||
if (ENABLE_FEATURE_CLEAN_UP && fslist)
|
if (ENABLE_FEATURE_CLEAN_UP && fslist)
|
||||||
atexit(delete_block_backed_filesystems);
|
atexit(delete_block_backed_filesystems);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
for (fl = fslist; fl; fl = fl->link) {
|
for (fl = fslist; fl; fl = fl->link) {
|
||||||
|
Loading…
Reference in New Issue
Block a user