summaryrefslogtreecommitdiff
path: root/tools/depmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/depmod.c')
-rw-r--r--tools/depmod.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/depmod.c b/tools/depmod.c
index 58f0f58..b1b5874 100644
--- a/tools/depmod.c
+++ b/tools/depmod.c
@@ -2112,11 +2112,18 @@ static int output_devname(struct depmod *depmod, FILE *out)
minor = min;
}
- if (type != '\0' && devname != NULL) {
+ if (type != '\0' && devname != NULL)
+ break;
+ }
+
+ if (devname != NULL) {
+ if (type != '\0')
fprintf(out, "%s %s %c%u:%u\n", mod->modname,
devname, type, major, minor);
- break;
- }
+ else
+ ERR("Module '%s' has devname (%s) but "
+ "lacks major and minor information. "
+ "Ignoring.\n", mod->modname, devname);
}
}