* [PATCH] depmod: warn on invalid devname specification
@ 2013-09-09 18:01 Tom Gundersen
2013-09-10 3:55 ` Lucas De Marchi
0 siblings, 1 reply; 2+ messages in thread
From: Tom Gundersen @ 2013-09-09 18:01 UTC (permalink / raw)
To: linux-modules; +Cc: linux-kernel, Tom Gundersen, Kay Sievers, Lucas De Marchi
During the last merge window (3.12) a couple of modules gained devname
aliases, but without the necessary major and minor information. These were
then silently ignored when generating modules.devname.
Complain loudly to avoid such errors sneaking in undetected in the future:
depmod: ERROR: Module 'zram' has devname (zram) but lacks major and minor information. Ignoring.
depmod: ERROR: Module 'uhid' has devname (uhid) but lacks major and minor information. Ignoring.
Cc: Kay Sievers <kay@vrfy.org>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
---
tools/depmod.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/tools/depmod.c b/tools/depmod.c
index 985cf3a..5855b2a 100644
--- a/tools/depmod.c
+++ b/tools/depmod.c
@@ -2120,11 +2120,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);
}
}
--
1.8.4
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] depmod: warn on invalid devname specification
2013-09-09 18:01 [PATCH] depmod: warn on invalid devname specification Tom Gundersen
@ 2013-09-10 3:55 ` Lucas De Marchi
0 siblings, 0 replies; 2+ messages in thread
From: Lucas De Marchi @ 2013-09-10 3:55 UTC (permalink / raw)
To: Tom Gundersen; +Cc: linux-modules, lkml, Kay Sievers, Lucas De Marchi
Hi Tom,
On Mon, Sep 9, 2013 at 3:01 PM, Tom Gundersen <teg@jklm.no> wrote:
> During the last merge window (3.12) a couple of modules gained devname
> aliases, but without the necessary major and minor information. These were
> then silently ignored when generating modules.devname.
>
> Complain loudly to avoid such errors sneaking in undetected in the future:
>
> depmod: ERROR: Module 'zram' has devname (zram) but lacks major and minor information. Ignoring.
> depmod: ERROR: Module 'uhid' has devname (uhid) but lacks major and minor information. Ignoring.
>
> Cc: Kay Sievers <kay@vrfy.org>
> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
> ---
> tools/depmod.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/tools/depmod.c b/tools/depmod.c
> index 985cf3a..5855b2a 100644
> --- a/tools/depmod.c
> +++ b/tools/depmod.c
> @@ -2120,11 +2120,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);
> }
> }
>
> --
Patch has been applied. Thanks.
Lucas De Marchi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-10 3:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-09 18:01 [PATCH] depmod: warn on invalid devname specification Tom Gundersen
2013-09-10 3:55 ` Lucas De Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®