Alan Jenkins napsal(a):
> On 9/10/09, Michal Marek <mmarek@xxxxxxx> wrote:
>> The kernel installs a modules.builtin file listing all builtin
>> modules. Let depmod generate a modules.builtin.bin file and use
>> this in modprobe: If a module is not found in modules.dep or
>> modules.alias, check if the module is builtin and print
>> "builtin <module>" instead of trying to load anything.
>> It is done in this order to not slow down the common case.
>>
>> Signed-off-by: Michal Marek <mmarek@xxxxxxx>
>
> Cool. I've seen the problem this fixes a couple of times.
>
> Hmm, the last time I saw this was in a debian initramfs. I guess you
> know that modules.order and now modules.builtin need to be copied into
> the initramfs, so SuSE will do that. Do update-initramfs (debian) and
> dracut (the new fedora initramfs project) know that?
>
> Might we need more such files in future? I guess the future-proof way
> is to copy modules.* into the initramfs staging directory before
> running depmod.
>
>> @@ -1331,6 +1349,11 @@ int do_modprobe(char *modname,
>> modname, 0, flags & mit_remove,
>> &modoptions, &commands,
>> &aliases, &blacklist);
>> + /* builtin module? */
>> + if (!aliases && module_builtin(dirname, modname) == 1) {
>> + info("builtin %s\n", modname);
>> + return 0;
>> + }
>> }
>> }
>
> It looks like "modprobe -r $builtin_module" will return success. I
> think it should fail and print an error instead. That would be
> analogous to the situation where a module cannot be unloaded because
> it is still in use.
>
> Similarly "modprobe --first-time $builtin-module" should cause an error.
Agreed.
> I thought the "builtin" message was inconsistent at first, because
> "modprobe -v $module" is currently silent if $module is already
> loaded. But I see it is useful because "lsmod" won't work for builtin
> modules.
I changed it to only print "builtin <module>" if --show-depends was
given, because it normally prints "insmod <module>" even for loaded
modules. See next email for the updated patch.
Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Home]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Video Projectors]
[PDAs]
[Free Online Dating]
[Hacking TiVo]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Big List of Linux Books]
[16.7MP]