fwget: remove logging redirects

After adding addpkg() in 10aa369afd
the redirects are no longer needed.  We can now log directly so
simplify the code.

Reported by:	manu
Reviewed by:	manu
Differential Revision: https://reviews.freebsd.org/D40077
This commit is contained in:
Bjoern A. Zeeb 2023-05-12 11:47:49 +00:00
parent dd8a74e74d
commit 5138ffa877
2 changed files with 4 additions and 11 deletions

View file

@ -44,14 +44,9 @@ EOF
exit 1
}
log_start()
{
exec 3>&1 4>&2
}
log()
{
echo $@ 1>&3
echo $@
}
log_verbose()
@ -60,7 +55,7 @@ log_verbose()
return
fi
echo $@ 1>&3
echo $@
}
addpkg()
@ -82,8 +77,6 @@ addpkg()
DRY_RUN=n
VERBOSE=n
log_start
while [ $# -gt 0 ]; do
case $1 in
-n)

View file

@ -94,13 +94,13 @@ pci_search_packages()
fi
device=$(pci_get_device "${fulldevice}")
log_verbose "Trying to match device ${device} in class ${class} and vendor ${vendor} with pci_${class}_${vendor}" 1>&3
log_verbose "Trying to match device ${device} in class ${class} and vendor ${vendor} with pci_${class}_${vendor}"
if [ ! -f ${LIBEXEC_PATH}/pci_${class}_${vendor} ]; then
class=$(pci_fixup_class ${class} ${vendor})
if [ -z "${class}" ]; then
continue
fi
log_verbose "Trying to match device ${device} in fixed up class ${class} and vendor ${vendor} with pci_${class}_${vendor}" 1>&3
log_verbose "Trying to match device ${device} in fixed up class ${class} and vendor ${vendor} with pci_${class}_${vendor}"
if [ ! -f ${LIBEXEC_PATH}/pci_${class}_${vendor} ]; then
continue
fi