From: Karel Zak Date: Tue, 21 Dec 2010 08:55:25 +0000 (+0100) Subject: mount: add mnt_init_debug() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=803f844a1097d9f5d028bc6f28ea838e1e3f2c50;p=util-linux mount: add mnt_init_debug() Signed-off-by: Karel Zak --- 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)