[Bug 591] modprobe-small: incorrect alias detection

bugzilla at busybox.net bugzilla at busybox.net
Sun Sep 6 18:58:17 UTC 2009


--- Comment #3 from Jiri J. <jirij.jabb at gmail.com>  2009-09-06 18:58:16 UTC ---
Created an attachment (id=639)
 --> (https://bugs.busybox.net/attachment.cgi?id=639)
patch: first version with two additional malloc calls

After reading through the file a bit, I made this patch. Tested under various
circumstances - for example usage with mdev as hotplug - upon triggering the
pci device "add" uevent, it loads the piix module, which triggers another
hotplug event, mdev reads "ide:m-disk" and "ide:m-cdrom" modaliases, passes
them one-by-one to modprobe (using mdev.conf entry), ide-gd_mod gets loaded
(along with ide-cd_mod) and /dev/hd[ac] device files are created.

You may notice there are two new allocation calls (xstrdup), which isn't so
nice, but I found this solution to be the cleanest. If it's really that
problematic, it should be possible to add new config entry - something like
"use strict module names", ie. omit the
ide-gd_mod/ide_gd-mod/ide_gd_mod/ide-gd-mod modutils-like "check" and strictly
use module filename (which frees us of the "TODO" there and spares 2 malloc()

Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the busybox-cvs mailing list