Hotplug patches from Debian

Alexander E. Patrakov see at the.sig
Fri Jun 4 02:32:07 PDT 2004

I have examined patches contained in the Debian source package 
"hotplug_0.0.20040329-8". Note that we use hotplug-20040401. Results:

SUMMARY: I have to add two more hotplug patches to the patches projects 
and probably add them and the "overcurrent" patch to the book. Also we 
need to decide what to do with network interface hotplug. Together with 
our custom initscript, there will be 8 (eight!) LFS-related changes to 
this package. It's probably too much for a single package, isn't it? 
Even OpenOffice has less patches!


000_remove_gettex: This patch removes gettext calls ($"text" -> "text") 
from scripts. The translations are not provided anyway. Probably no gain 
and no harm for LFS.

005_defaults_file_path: Debian-specific change of /etc/sysconfig/usb 
file path

006_env_replacement: provides a bash-only replacement of the "env" 
command just in case when /usr is not mounted. Will be unneeded in LFS 
when we disable hotplug by default in the kernel: hotplug events will be 
handled only if /usr is mounted.

006_hotplug_usb_wait: allows user to the timeout for waiting for 
/proc/bus/usb/xxx/yyy files to appear. A real solution is to change the 
racy code in the kernel. Not done yet.

006_try_all_drivers: if there is more than one driver for a PCI dvice, 
try them all instead of just the first. Not sure if it should go into LFS.

007_more_logging, 008_mesg_logging: just debugging. We don't need these.

008_usb.agent_empty_lines: allow empty lines in usb handler map file. 
Will submit to the patches project.

009_input.agent_ignore_no_bits, 009_usb.agent_remover, 
010_load_drivers_module_name, 011_hotplug.functions_quote_loaded: 
already present in hotplug-20040401

011_usb.rc_dont_force_hcds: prevents *-hcd modules from being loaded if 
they are blacklisted. A more stupid version is in the patches project 

012_pci.rc_return_value: similar fix is already present in hotplug-20040401

012_usb.agent_check_driver: prevents the second driver from being loaded 
if a USB device already has one driver loaded. Not sure whether this 
should go into LFS.

012_usb.rc_try_all_interfaces: this is an attempt to better match 
synthetic USB hotplug events with real ones. For me, my -device-2 patch 
works better, and it is in the book. However, if anyone here has Sharp 
Zaurus or another USB device with multiple interfaces, please check if 
my patch works correctly.

013_load_drivers_check_module_dup: don't try to load the same 
USB-related module twice. May give some speedup, but, strictly speaking, 
not needed. Also, there are no duplicates on my system. Can anyone with 
two USB printers verify that?

014_load_drivers_blacklist_dir: adds a Debian-specific 
/etc/hotplug/blacklist.d directory.

015_ieee1394.agent_check_env: some devices may invoke ieee1394.agent 
without VENDOR_ID or so. In this case, posix shell may complains to fail 
to evaluate $((0x)). Probably good, will add to the patches project.

015_load_drivers_mesg_format: Debian-specific cosmetic change in the 
text shown on the screen.

016_pci.rc_ignore_pci_class_display: prevents framebuffer drivers from 
being loaded if the user says in the Debian-specific config file that he 
doesn't want them. LFSer will just omit them when compiling his kernel.

050_net.agent_ifupdown: debian specific network management with 
ifupdown. We have to do something similar sooner or later.

051_check_runlevel: "./hotplug stop" will do nothing in runlevels 0 and 
6 after this patch. We don't need it since we never call KXXhotplug from 

Alexander E. Patrakov
To get my address: echo '0!42!+/6 at 5-3.535.25' | tr [!-:] [a-z] | tr n .

More information about the lfs-dev mailing list