From e745dd2a6e97a80f630621c6aa3bf7d4f9b767c1 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 23 Nov 2015 21:43:28 +0100 Subject: nlplug-findfs: improve debug info - print only once when we reset timeout - print what the timeout was set to on exit This helps to show if what we were looking for was found or not --- nlplug-findfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nlplug-findfs.c b/nlplug-findfs.c index 5f6dc5e..b015fb4 100644 --- a/nlplug-findfs.c +++ b/nlplug-findfs.c @@ -799,7 +799,7 @@ int main(int argc, char *argv[]) err(1, "poll"); } if (r == 0) { - dbg("exit due to timeout"); + dbg("exit due to timeout (%i)", conf.timeout); break; } @@ -848,7 +848,8 @@ int main(int argc, char *argv[]) if ((found & FOUND_DEVICE) || ((found & FOUND_BOOTREPO) && (found & FOUND_APKOVL))) { - dbg("setting timeout to 0"); + if (conf.timeout) + dbg("FOUND! setting timeout to 0"); conf.timeout = 0; } } -- cgit v1.2.3