1
0
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:
Poul-Henning Kamp 1998-10-08 08:56:01 +00:00
parent c5a5d65bf8
commit 0e8380df1f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40056
6 changed files with 12 additions and 30 deletions

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -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."