Currently, if a value that doesn't match a kernel version
("%u.%u") is passed in, depmod silently falls back to
using uname. Make it clear to the user that this is happening
by giving a message to the user.
---
 tools/depmod.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/depmod.c b/tools/depmod.c
index 30f6191..f491542 100644
--- a/tools/depmod.c
+++ b/tools/depmod.c
@@ -2480,6 +2480,11 @@ static int do_depmod(int argc, char *argv[])
                cfg.kversion = argv[optind];
                optind++;
        } else {
+               if (optind < argc) {
+                       ERR("Bad version passed %s\n", argv[optind]);
+                       ERR("Falling back to uname\n");
+               }
+
                if (uname(&un) < 0) {
                        CRIT("uname() failed: %s\n", strerror(errno));
                        goto cmdline_failed;
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to