From 6da69b83a65bfdfd4171c58213ef20c549f7f7c8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 22 Dec 2011 11:07:21 +0100 Subject: [PATCH] losetup: check to control debug output Signed-off-by: Karel Zak --- sys-utils/losetup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c index af4d1b0988..b03dc90a71 100644 --- a/sys-utils/losetup.c +++ b/sys-utils/losetup.c @@ -228,10 +228,7 @@ int main(int argc, char **argv) uint64_t offset = 0, sizelimit = 0; int res = 0, showdev = 0, lo_flags = 0; - loopcxt_init(&lc, 0); - /*loopcxt_enable_debug(&lc, TRUE);*/ - - static const struct option longopts[] = { + static const struct option longopts[] = { { "all", 0, 0, 'a' }, { "set-capacity", 1, 0, 'c' }, { "detach", 1, 0, 'd' }, @@ -253,6 +250,9 @@ int main(int argc, char **argv) bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + loopcxt_init(&lc, 0); + loopcxt_enable_debug(&lc, getenv("LOOPDEV_DEBUG") ? TRUE : FALSE); + while ((c = getopt_long(argc, argv, "ac:d:De:E:fhj:o:p:rsv", longopts, NULL)) != -1) { -- 2.47.3