From 803f844a1097d9f5d028bc6f28ea838e1e3f2c50 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 21 Dec 2010 09:55:25 +0100 Subject: [PATCH] mount: add mnt_init_debug() Signed-off-by: Karel Zak --- mount/fstab.c | 3 ++- mount/mount.c | 4 ++++ mount/umount.c | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mount/fstab.c b/mount/fstab.c index 74cbf21b..2d3767ab 100644 --- a/mount/fstab.c +++ b/mount/fstab.c @@ -307,9 +307,10 @@ getmntdevbackward (const char *name, struct mntentchn *mcprev) { mc0 = mtab_head(); if (!mcprev) mcprev = mc0; - for (mc = mcprev->prev; mc && mc != mc0; mc = mc->prev) + for (mc = mcprev->prev; mc && mc != mc0; mc = mc->prev) { if (streq(mc->m.mnt_fsname, name)) return mc; + } return NULL; } diff --git a/mount/mount.c b/mount/mount.c index c4955ffd..3c4a1010 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -2484,6 +2484,10 @@ main(int argc, char *argv[]) { printf("mount: eUID: %u\n", geteuid()); } +#ifdef HAVE_LIBMOUNT_MOUNT + mnt_init_debug(0); +#endif + argc -= optind; argv += optind; diff --git a/mount/umount.c b/mount/umount.c index 6e24779b..e7626538 100644 --- a/mount/umount.c +++ b/mount/umount.c @@ -738,6 +738,9 @@ main (int argc, char *argv[]) { atexit(unlock_mtab); +#ifdef HAVE_LIBMOUNT_MOUNT + mnt_init_debug(0); +#endif if (all) { /* nodev stuff: sysfs, usbfs, oprofilefs, ... */ if (types == NULL) -- 2.39.5