Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dahdi-bash-completion
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ __dahdi_span_types() {
if [ "$has_cmd" = 1 ]; then
# FIXME: check if devices are settable?
COMPREPLY=( ${COMPREPLY[@]} $( \
grep -l '[EJT]1' /sys/devices/pci0000:00/0000:00:10.4/usb1/1-1/xbus-00/*/spantype 2>/dev/null | sed -e 's|/spantype||') )
grep -l '[EJT]1' /sys/devices/pci0000:00/0000:00:10.4/usb1/1-1/xbus-00/*/dahdi_spantype 2>/dev/null | sed -e 's|/dahdi_spantype||') )
else
COMPREPLY=( ${COMPREPLY[@]} $(compgen -W \
'dumpconfig list set compare' -- $cur) )
Expand Down
6 changes: 3 additions & 3 deletions dahdi_span_assignments
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ show_devices() {
devpath=`cd "$device" && pwd -P`
location='@'`attr_clean "$device/location"`
hardware_id=`attr_clean "$device/hardware_id"`
for local_spanno in `cut -d: -f1 "$device/spantype"`
for local_spanno in `cut -d: -f1 "$device/dahdi_spantype"`
do
span=`grep 2>/dev/null -Hw "$local_spanno" "$device/span-"*"/local_spanno" | \
sed -e 's,/local_spanno:.*,,' -e 's,.*/,,'`
Expand Down Expand Up @@ -193,7 +193,7 @@ dump_config() {
id="$devpath"
fi
echo "# Device: [$hardware_id] @$location $devpath"
for local_spanno in `cut -d: -f1 "$device/spantype"`
for local_spanno in `cut -d: -f1 "$device/dahdi_spantype"`
do
span=`grep 2>/dev/null -Hw "$local_spanno" "$device/span-"*"/local_spanno" | \
sed -e 's,/local_spanno:.*,,' -e 's,.*/,,'`
Expand Down Expand Up @@ -358,7 +358,7 @@ list_devices() {
devpath=`cd "$device" && pwd -P`
location='@'`attr_clean "$device/location"`
hardware_id=`attr_clean "$device/hardware_id"`
for local_spanno in `cut -d: -f1 "$device/spantype"`
for local_spanno in `cut -d: -f1 "$device/dahdi_spantype"`
do
found=`dev_match_conf "$devpath" "$location" "$hardware_id" "$local_spanno"`
if [ "$wanted" = "unmatched" ]; then
Expand Down
10 changes: 5 additions & 5 deletions dahdi_span_types
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ show_spantypes() {
devpath=`cd "$device" && pwd -P`
location='@'`attr_clean "$device/location"`
hardware_id=`attr_clean "$device/hardware_id"`
cat "$device/spantype" | while read st; do
cat "$device/dahdi_spantype" | while read st; do
case "$st" in
*:[ETJ]1)
printf "%-10s %-20s %-30s %s\n" \
Expand All @@ -192,7 +192,7 @@ show_spantypes() {
}

list_pri_spantypes() {
find $DEVICES -follow -maxdepth 1 -name spantype | \
find $DEVICES -follow -maxdepth 1 -name dahdi_spantype | \
xargs cat | \
sed -n '/:[ETJ]1$/s/^.*://p' | \
sort -u | \
Expand Down Expand Up @@ -255,7 +255,7 @@ dump_config() {
id="$devpath"
fi
echo "# Device: [$hardware_id] @$location $devpath"
cat "$device/spantype" | while read st; do
cat "$device/dahdi_spantype" | while read st; do
case "$st" in
*:[ETJ]1)
if [ "$num_spantypes" -eq 1 ]; then
Expand All @@ -281,7 +281,7 @@ filter_conf() {
handle_span() {
device="$1"
spantype="$2"
attr_file="$device/spantype"
attr_file="$device/dahdi_spantype"
devpath=`cd "$device" && pwd -P`
devname=`echo "$device" | sed "s,$devbase/,,"`
location='@'`attr_clean "$device/location"`
Expand Down Expand Up @@ -351,7 +351,7 @@ set_all_devices() {
for device in $DEVICES
do
devname=`echo "$device" | sed "s,$devbase/,,"`
cat "$device/spantype" | while read spantype; do
cat "$device/dahdi_spantype" | while read spantype; do
case "$spantype" in
*:[ETJ]1)
handle_span "$device" "$spantype"
Expand Down
2 changes: 1 addition & 1 deletion dahdi_waitfor_span_assignments
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ devbase='/sys/bus/dahdi_devices/devices'

spans_of() {
dev="$1"
wc -l < "$dev/spantype"
wc -l < "$dev/dahdi_spantype"
}

assigned_spans_of() {
Expand Down