Remove dahdi_map, obsoleted by span_assignments

dahdi_map can be replaced by span_assignments list / dumpconfig

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
This commit is contained in:
Tzafrir Cohen 2013-10-02 21:54:58 +03:00
parent 680f3e1d1d
commit 2f688f83c4
3 changed files with 1 additions and 88 deletions

View File

@ -105,7 +105,7 @@ endif
MAN_PAGES:=$(wildcard $(BINS:%=doc/%.8)) MAN_PAGES:=$(wildcard $(BINS:%=doc/%.8))
PINNED_DATA_SCRIPTS:=handle_device span_config PINNED_DATA_SCRIPTS:=handle_device span_config
PINNED_UTILS:=dahdi_map span_assignments span_types PINNED_UTILS:=span_assignments span_types
PINNED_CONF:=pinned-spans.conf spantype.conf PINNED_CONF:=pinned-spans.conf spantype.conf
TEST_BINS:=patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest dahdi_maint TEST_BINS:=patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest dahdi_maint

View File

@ -1,39 +0,0 @@
#! /bin/sh
#
# Show a map of dahdi devices with the following fields:
# - spanno (or '-' if not assigned yet)
# - (vendor assigned) name
# - local spanno
# - hardware_id (or empty if none)
# - location (prefixed by '@')
devbase="/sys/bus/dahdi_devices/devices"
[ -d "$devbase" ] || {
echo >&2 "$0: Missing '$devbase' (Old driver?)"
exit 1
}
fmt="%-4s %-17s %-3s %-12s %s\n"
printf "$fmt" 'SPAN' 'NAME' '#' 'HARDWARE_ID' 'LOCATION'
DEVICES=`echo $devbase/*`
for device in $DEVICES
do
hw_id=`cat "$device/hardware_id"`
location=`cd "$device" && pwd -P | sed 's,/sys/devices/,,'`
for local_spanno in `cut -d: -f1 "$device/spantype"`
do
span=`grep 2>/dev/null -Hw "$local_spanno" "$device/span-"*"/local_spanno" | \
sed -e 's,/local_spanno:.*,,' -e 's,.*/,,'`
if [ "$span" != '' ]; then
spanno=`echo $span | sed 's/^.*-//'`
name=`cat 2>/dev/null "$device/$span/name"`
else
spanno='-'
fi
printf "$fmt" "$spanno" "$name" "($local_spanno)" "[$hw_id]" "@$location"
done | sort -n
done

View File

@ -1,48 +0,0 @@
.TH dahdi_test 8 "2013-05-24"
.SH "NAME"
dahdi_map \(em List hardware IDs and locations of DAHDI spans
.SH "SYNOPSIS"
.B dahdi_map
.SH DESCRIPTION
.B dahdi_map
prints a list of hardware IDs and locations of any DAHDI span on the system
(possibly not yet assigned).
It takes no extra options or parameters.
Example output:
.EX
SPAN NAME # HARDWARE_ID LOCATION
5 XBUS-00/XPD-00 (1) [usb:INT06380] @pci0000:00/0000:00:10.4/usb1/1-3/xbus-00/astribanks:xbus-00
6 XBUS-00/XPD-01 (2) [usb:INT06380] @pci0000:00/0000:00:10.4/usb1/1-3/xbus-00/astribanks:xbus-00
7 XBUS-00/XPD-02 (3) [usb:INT06380] @pci0000:00/0000:00:10.4/usb1/1-3/xbus-00/astribanks:xbus-00
8 XBUS-00/XPD-03 (4) [usb:INT06380] @pci0000:00/0000:00:10.4/usb1/1-3/xbus-00/astribanks:xbus-00
9 XBUS-00/XPD-04 (5) [usb:INT06380] @pci0000:00/0000:00:10.4/usb1/1-3/xbus-00/astribanks:xbus-00
10 XBUS-00/XPD-05 (6) [usb:INT06380] @pci0000:00/0000:00:10.4/usb1/1-3/xbus-00/astribanks:xbus-00
11 XBUS-00/XPD-06 (7) [usb:INT06380] @pci0000:00/0000:00:10.4/usb1/1-3/xbus-00/astribanks:xbus-00
12 XBUS-00/XPD-07 (8) [usb:INT06380] @pci0000:00/0000:00:10.4/usb1/1-3/xbus-00/astribanks:xbus-00
13 XBUS-00/XPD-10 (9) [usb:INT06380] @pci0000:00/0000:00:10.4/usb1/1-3/xbus-00/astribanks:xbus-00
14 XBUS-00/XPD-20 (10) [usb:INT06380] @pci0000:00/0000:00:10.4/usb1/1-3/xbus-00/astribanks:xbus-00
15 XBUS-00/XPD-30 (11) [usb:INT06380] @pci0000:00/0000:00:10.4/usb1/1-3/xbus-00/astribanks:xbus-00
16 XBUS-01/XPD-00 (1) [] @pci0000:00/0000:00:10.4/usb1/1-4/xbus-01/astribanks:xbus-01
1 XBUS-02/XPD-00 (1) [usb:XILINX_4] @pci0000:00/0000:00:10.4/usb1/1-1/xbus-02/astribanks:xbus-02
2 XBUS-02/XPD-10 (2) [usb:XILINX_4] @pci0000:00/0000:00:10.4/usb1/1-1/xbus-02/astribanks:xbus-02
3 XBUS-02/XPD-20 (3) [usb:XILINX_4] @pci0000:00/0000:00:10.4/usb1/1-1/xbus-02/astribanks:xbus-02
4 XBUS-02/XPD-30 (4) [usb:XILINX_4] @pci0000:00/0000:00:10.4/usb1/1-1/xbus-02/astribanks:xbus-02
.EE
.SH FILES
.B /sys/bus/dahdi_devices/devices
.RS
Information taken from that area in SysFS.
.RE
.SH SEE ALSO
dahdi_cfg(8)
.SH AUTHOR
This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU General Public License, Version 2 any
later version published by the Free Software Foundation.