mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-02 08:42:48 +00:00
Avoid using dmesg to find devices, the buffer may not be big enough.
Reviewed by: phk Submitted by: Mike Spengler <mks@networkcs.com>
This commit is contained in:
parent
c5a5d65bf8
commit
0e8380df1f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40056
@ -10,10 +10,8 @@
|
||||
# N.B. /usr is not mounted.
|
||||
#
|
||||
atm_pass1() {
|
||||
# Locate all probed ATM adapters by scanning dmesg output
|
||||
saveifs="${IFS}"
|
||||
IFS=$IFS:
|
||||
atmdev=`dmesg | while read dev junk; do
|
||||
# Locate all probed ATM adapters
|
||||
atmdev=`atm sh stat int | while read dev junk; do
|
||||
case ${dev} in
|
||||
hea[0-9]|hea[0-9][0-9])
|
||||
echo "${dev} "
|
||||
@ -26,7 +24,6 @@ atm_pass1() {
|
||||
;;
|
||||
esac
|
||||
done`
|
||||
IFS="${saveifs}"
|
||||
|
||||
if [ -z "${atmdev}" ]; then
|
||||
echo "No ATM adapters found."
|
||||
|
@ -10,10 +10,8 @@
|
||||
# N.B. /usr is not mounted.
|
||||
#
|
||||
atm_pass1() {
|
||||
# Locate all probed ATM adapters by scanning dmesg output
|
||||
saveifs="${IFS}"
|
||||
IFS=$IFS:
|
||||
atmdev=`dmesg | while read dev junk; do
|
||||
# Locate all probed ATM adapters
|
||||
atmdev=`atm sh stat int | while read dev junk; do
|
||||
case ${dev} in
|
||||
hea[0-9]|hea[0-9][0-9])
|
||||
echo "${dev} "
|
||||
@ -26,7 +24,6 @@ atm_pass1() {
|
||||
;;
|
||||
esac
|
||||
done`
|
||||
IFS="${saveifs}"
|
||||
|
||||
if [ -z "${atmdev}" ]; then
|
||||
echo "No ATM adapters found."
|
||||
|
@ -10,10 +10,8 @@
|
||||
# N.B. /usr is not mounted.
|
||||
#
|
||||
atm_pass1() {
|
||||
# Locate all probed ATM adapters by scanning dmesg output
|
||||
saveifs="${IFS}"
|
||||
IFS=$IFS:
|
||||
atmdev=`dmesg | while read dev junk; do
|
||||
# Locate all probed ATM adapters
|
||||
atmdev=`atm sh stat int | while read dev junk; do
|
||||
case ${dev} in
|
||||
hea[0-9]|hea[0-9][0-9])
|
||||
echo "${dev} "
|
||||
@ -26,7 +24,6 @@ atm_pass1() {
|
||||
;;
|
||||
esac
|
||||
done`
|
||||
IFS="${saveifs}"
|
||||
|
||||
if [ -z "${atmdev}" ]; then
|
||||
echo "No ATM adapters found."
|
||||
|
@ -10,10 +10,8 @@
|
||||
# N.B. /usr is not mounted.
|
||||
#
|
||||
atm_pass1() {
|
||||
# Locate all probed ATM adapters by scanning dmesg output
|
||||
saveifs="${IFS}"
|
||||
IFS=$IFS:
|
||||
atmdev=`dmesg | while read dev junk; do
|
||||
# Locate all probed ATM adapters
|
||||
atmdev=`atm sh stat int | while read dev junk; do
|
||||
case ${dev} in
|
||||
hea[0-9]|hea[0-9][0-9])
|
||||
echo "${dev} "
|
||||
@ -26,7 +24,6 @@ atm_pass1() {
|
||||
;;
|
||||
esac
|
||||
done`
|
||||
IFS="${saveifs}"
|
||||
|
||||
if [ -z "${atmdev}" ]; then
|
||||
echo "No ATM adapters found."
|
||||
|
@ -10,10 +10,8 @@
|
||||
# N.B. /usr is not mounted.
|
||||
#
|
||||
atm_pass1() {
|
||||
# Locate all probed ATM adapters by scanning dmesg output
|
||||
saveifs="${IFS}"
|
||||
IFS=$IFS:
|
||||
atmdev=`dmesg | while read dev junk; do
|
||||
# Locate all probed ATM adapters
|
||||
atmdev=`atm sh stat int | while read dev junk; do
|
||||
case ${dev} in
|
||||
hea[0-9]|hea[0-9][0-9])
|
||||
echo "${dev} "
|
||||
@ -26,7 +24,6 @@ atm_pass1() {
|
||||
;;
|
||||
esac
|
||||
done`
|
||||
IFS="${saveifs}"
|
||||
|
||||
if [ -z "${atmdev}" ]; then
|
||||
echo "No ATM adapters found."
|
||||
|
@ -10,10 +10,8 @@
|
||||
# N.B. /usr is not mounted.
|
||||
#
|
||||
atm_pass1() {
|
||||
# Locate all probed ATM adapters by scanning dmesg output
|
||||
saveifs="${IFS}"
|
||||
IFS=$IFS:
|
||||
atmdev=`dmesg | while read dev junk; do
|
||||
# Locate all probed ATM adapters
|
||||
atmdev=`atm sh stat int | while read dev junk; do
|
||||
case ${dev} in
|
||||
hea[0-9]|hea[0-9][0-9])
|
||||
echo "${dev} "
|
||||
@ -26,7 +24,6 @@ atm_pass1() {
|
||||
;;
|
||||
esac
|
||||
done`
|
||||
IFS="${saveifs}"
|
||||
|
||||
if [ -z "${atmdev}" ]; then
|
||||
echo "No ATM adapters found."
|
||||
|
Loading…
Reference in New Issue
Block a user