[BusyBox] devfsd & modprobe args conflict

Дронников Владимир dronnikov at sdm.ru
Thu Dec 4 14:10:27 UTC 2003


Hi

As far as I see there's a conflict in use BB modprobe with devfsd

devsfd calls /sbin/modprobe -k -C /etc/modules.devfsd
but
modprobe dies if is called with -C option
(see portions of code below)

IMHO it's modprobe's problem since original devsfd also uses -C option
I think BB modprobe should be patched to either silently ignore -C or -c
option or process it correctly

Regards,
Vladimir Dronnikov dronnikov at mail.ru

----------------- devfsd.c -----------------
static void action_modload (const struct devfsd_notify_struct *info,
       const struct config_entry_struct *entry)
{
 char *argv[6];
 char device[STRING_LENGTH];

 argv[0] = MODPROBE;
 argv[1] = "-k";
 argv[2] = "-C";
 argv[3] = CONFIG_MODULES_DEVFS;
 argv[4] = device;
 argv[5] = NULL;
 #ifdef CONFIG_DEVFSD_DEBUG
 msg_logger( NO_DIE, LOG_INFO, "action_modload()\n");
 #endif
 snprintf (device, sizeof (device), "/dev/%s", info->devname);
 fork_and_execute(DIE, argv[0], argv);
}  /*  End Function action_modload  */
#endif
----------------- //devfsd.c -----------------

----------------- modprobe.c -----------------
 while ((opt = getopt(argc, argv, "acdklnqrst:vVC:")) != -1) {
  switch(opt) {
  case 'c': // no config used
  case 'l': // no pattern matching
   return EXIT_SUCCESS;
   break;
  case 'C': // no config used
  case 't': // no pattern matching
   bb_error_msg_and_die("-t and -C not supported");
----------------- //modprobe.c -----------------






More information about the busybox mailing list