mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05:00
tools/sdiodevs2h.awk: introduce palias
Some of the defined names are not the direct 1:1 mapping with vendor and device names used by Linux device drivers. Introduce a p(roduct)alias so we can map the one device entry I came across without much extra hassle and generate a name device drivers know about: palias BROADCOM_CYPRESS_43439 CYPRESS_43439 Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46455 (cherry picked from commit b4ef1b1be753952a4aafa505817164624f712c37)
This commit is contained in:
parent
794e20f807
commit
dfc9df8106
1 changed files with 16 additions and 0 deletions
|
|
@ -149,6 +149,18 @@ function product(hfile)
|
|||
printf("\n") > hfile
|
||||
}
|
||||
|
||||
function palias(hfile)
|
||||
{
|
||||
nproducts++
|
||||
|
||||
products[nproducts, 1] = $2; # vendor name
|
||||
products[nproducts, 2] = $3; # product id
|
||||
products[nproducts, 3] = $4; # id
|
||||
if (hfile)
|
||||
printf("#define\tSDIO_DEVICE_ID_%s\tSDIO_DEVICE_ID_%s\n", \
|
||||
$2, $3) > hfile
|
||||
}
|
||||
|
||||
function dump_dfile(dfile)
|
||||
{
|
||||
printf("\n") > dfile
|
||||
|
|
@ -243,6 +255,10 @@ while ((getline < srcfile) > 0) {
|
|||
product(hfile)
|
||||
continue
|
||||
}
|
||||
if ($1 == "palias") {
|
||||
palias(hfile)
|
||||
continue
|
||||
}
|
||||
if ($0 == "")
|
||||
blanklines++
|
||||
if (hfile)
|
||||
|
|
|
|||
Loading…
Reference in a new issue