[BusyBox] modprobe in busybox

rmy at tigress.co.uk rmy at tigress.co.uk
Mon Nov 26 08:57:04 UTC 2001


Erik,

Recently modprobe has been added to busybox.  There are a couple of problems
with this (aside from the fact that it doesn't handle module dependencies).

The code to build the insmod command line is this:

    sprintf(cmd, "insmod %s %s %s",
            do_syslog ? "-s" : "",
            quiet ? "-q" : "",
            autoclean ? "-k" : "");
    while (optind < argc) {
        strcat(cmd, argv[optind]);
        strcat(cmd, " ");
        optind++;
    }

If the '-k' flag is present the first module name is appended to it with no
intervening space, so insmod treats the module name as further options.

If the '-s' flag is given to modprobe it's passed on to insmod, but the
busybox implmentation of insmod doesn't support a '-s' flag.

Ron





More information about the busybox mailing list