diff options
author | Dave Reisner <dreisner@archlinux.org> | 2018-10-09 01:45:11 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2018-10-09 16:06:14 +0200 |
commit | a3cb799a8f63186b843db6a57da12d74a9320686 (patch) | |
tree | e58cd2a56e4f536bd2d54bdd500bc8d23d9c2fd7 | |
parent | cfcc53c94d0bd67fc69e06c6c5f52bd801ccbe22 (diff) | |
download | mkinitcpio-a3cb799a8f63186b843db6a57da12d74a9320686.tar.gz mkinitcpio-a3cb799a8f63186b843db6a57da12d74a9320686.tar.xz |
install/block: avoid conditional addition of drivers25
Avoid over-optimizing autodetect and always add these. This allows
storage drivers to be builtins and still trigger addition of the block
node driver.
-rw-r--r-- | install/block | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/install/block b/install/block index d9c627f..11c4665 100644 --- a/install/block +++ b/install/block @@ -2,36 +2,27 @@ build() { local filter - local -A blockdevs + + map add_module sd_mod? sr_mod? usb_storage? mmc_block? firewire-sbp2? virtio_blk? # pata, sata, scsi, nvme for filter in 'scsi/.*ata' '/(block|scsi|fusion|nvme)/' 'ata/[ps]ata_' \ 'ata/(ahci|pdc_adma|ata_piix|ata_generic)'; do - add_checked_modules "$filter" && blockdevs['sd_mod']=1 + add_checked_modules "$filter" done # usb - if add_checked_modules -f '(_cs|sl811_hcd|isp116x_hcd)' '/usb/host'; then - blockdevs+=(['usb_storage?']=1 ['sd_mod?']=1 ['sr_mod?']=1) - add_checked_modules '/drivers/usb/storage/' - fi + add_checked_modules -f '(_cs|sl811_hcd|isp116x_hcd)' '/usb/host' + add_checked_modules '/drivers/usb/storage/' # firewire - if add_checked_modules '/drivers/firewire/'; then - blockdevs+=(['firewire-sbp2?']=1 ['sd_mod?']=1 ['sr_mod?']=1) - fi + add_checked_modules '/drivers/firewire/' # mmc - if add_checked_modules '/(mmc|tifm_)'; then - blockdevs+=(['mmc_block?']=1) - fi + add_checked_modules '/(mmc|tifm_)' # virtio - if add_checked_modules 'virtio'; then - blockdevs['virtio_blk?']=1 - fi - - map add_module "${!blockdevs[@]}" + add_checked_modules 'virtio' } help() { |