加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
my-find-supplements 581 Bytes
一键复制 编辑 原始数据 按行查看 历史
Stefan Dirsch 提交于 2018-10-02 04:49 . - created package
#!/bin/bash
PCI_ID_FILE=$1
shift
tmp=$(mktemp)
trap 'rm -f "$tmp"' EXIT
/usr/lib/rpm/find-supplements.ksyms "$@" >"$tmp"
# the system script currently only generates modalias(...) lines, but allow
# other dependencies just in case
grep -v '^modalias(' "$tmp"
# determine the kernel flavor
krel=$(sed -rn 's/modalias\(([^:]*):.*/\1/p; T; q' "$tmp")
if test -z "$krel"; then
exit
fi
# and create our own list of modalias supplements
for id in $(cat ${PCI_ID_FILE} | cut -d " " -f 1|sed 's/0x//g'); do
echo "modalias(${krel}:pci:v000010DEd0000${id}sv*sd*bc03sc0[02]i00*)"
done
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化