* Mini umount implementation for busybox
*
*
- * Copyright (C) 1999 by Lineo, inc.
+ * Copyright (C) 1999,2000 by Lineo, inc.
* Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
*
* This program is free software; you can redistribute it and/or modify
#include <stdio.h>
#include <sys/mount.h>
#include <mntent.h>
-#include <fstab.h>
#include <errno.h>
} else {
#if !defined BB_MTAB
if (strcmp(cur->device, "/dev/root") == 0) {
- struct fstab *fstabItem;
-
- fstabItem = getfsfile("/");
- if (fstabItem != NULL)
- return fstabItem->fs_spec;
+ /* Adjusts device to be the real root device,
+ * or leaves device alone if it can't find it */
+ find_real_root_device_name( cur->device);
+ return ( cur->device);
}
#endif
return cur->device;
return mp;
}
+/* Don't bother to clean up, since exit() does that
+ * automagically, so we can save a few bytes */
+#if 0
void mtab_free(void)
{
struct _mtab_entry_t *this, *next;
this = next;
}
}
+#endif
static int do_umount(const char *name, int useMtab)
{
doRemount = TRUE;
break;
#endif
+ case 'v':
+ break; /* ignore -v */
default:
usage(umount_usage);
}