convert_ifapi: handle the special case of getting interface name

Reviewed by:	jhibbits
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D50445
This commit is contained in:
Li-Wen Hsu 2025-05-28 15:31:53 +08:00
parent 18a62137df
commit f131f3c0bf
No known key found for this signature in database
GPG key ID: 7377A4A02A2954DD

View file

@ -157,7 +157,7 @@ handle_misc() {
old=`echo "$__ifp__->if_"${word}`
new=`echo "if_get"${word}"($__ifp__)"`
new=`echo $new | sed -e 's/&/\\\&/'`
line=`echo $line| sed -e's/'$old'/'$new'/g'`
line=`echo $line| sed -e's/'$old'/'$new'/g' | sed -e 's/if_getxname/if_name/'`
return 0;
fi
return 1;