mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-07 00:50:50 +00:00
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:
parent
dd8a74e74d
commit
5138ffa877
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue