-
-/* ignored: -v -d -t -i */
-#define OPTION_STRING "fldnra" "vdt:i"
-#define OPT_FORCE (1 << 0)
-#define OPT_LAZY (1 << 1)
-#define OPT_FREELOOP (1 << 2)
-#define OPT_NO_MTAB (1 << 3)
-#define OPT_REMOUNT (1 << 4)
-#define OPT_ALL (ENABLE_FEATURE_UMOUNT_ALL ? (1 << 5) : 0)
-
-// These constants from linux/fs.h must match OPT_FORCE and OPT_LAZY,
-// otherwise "doForce" trick below won't work!
-//#define MNT_FORCE 0x00000001 /* Attempt to forcibly umount */
-//#define MNT_DETACH 0x00000002 /* Just detach from the tree */
+#include "common_bufsiz.h"
+
+#if defined(__dietlibc__)
+// TODO: This does not belong here.
+/* 16.12.2006, Sampo Kellomaki (sampo@iki.fi)
+ * dietlibc-0.30 does not have implementation of getmntent_r() */
+static struct mntent *getmntent_r(FILE* stream, struct mntent* result,
+ char* buffer UNUSED_PARAM, int bufsize UNUSED_PARAM)
+{
+ struct mntent* ment = getmntent(stream);
+ return memcpy(result, ment, sizeof(*ment));
+}
+#endif
+
+/* Ignored: -v -t -i
+ * bbox always acts as if -d is present.
+ * -D can be used to suppress it (bbox extension).
+ * Rationale:
+ * (1) util-linux's umount does it if "loop=..." is seen in /etc/mtab:
+ * thus, on many systems, bare umount _does_ drop loop devices.
+ * (2) many users request this feature.
+ */
+#define OPTION_STRING "fldDnra" "vt:i"
+#define OPT_FORCE (1 << 0) // Same as MNT_FORCE
+#define OPT_LAZY (1 << 1) // Same as MNT_DETACH
+//#define OPT_FREE_LOOP (1 << 2) // -d is assumed always present
+#define OPT_DONT_FREE_LOOP (1 << 3)
+#define OPT_NO_MTAB (1 << 4)
+#define OPT_REMOUNT (1 << 5)
+#define OPT_ALL (ENABLE_FEATURE_UMOUNT_ALL ? (1 << 6) : 0)