ref: e745dd2a6e97a80f630621c6aa3bf7d4f9b767c1
parent: 155c5fa5816cc6d942e531d525493318ceae8fd6
author: Natanael Copa <ncopa@alpinelinux.org>
date: Mon Nov 23 15:43:28 CST 2015
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
--- a/nlplug-findfs.c
+++ b/nlplug-findfs.c
@@ -799,7 +799,7 @@
err(1, "poll");
}
if (r == 0) {
- dbg("exit due to timeout");
+ dbg("exit due to timeout (%i)", conf.timeout);
break;
}
@@ -848,7 +848,8 @@
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;
}
}