Commit Graph

266 Commits

Author SHA1 Message Date
Tzafrir Cohen c1e016fa33 Do the Right Thing when there's no config
Do the "right thing" (hopefully. At least for a system with a single
device) if there is are no configuration files:

* No span-types.conf: just ignore it as before. It is optional.
* No pinned-spans.conf: use span_assignments auto (same as having
  dahdi.auto_assign_spans=1).
* No system.conf: generate a temporary one with dahdi_genconf.

This will hopefully allow having a partially-working system, and help
making ut usable with 'span_assignments dumpconfig'. Or maybe just work
as-is.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-13 10:18:34 -04:00
Oron Peled dc5c7de9fc dahdi_cfg: can optionally read config from stdin
Allow for the convention of '-' marking stdin:

  dahdi_cfg -c -

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-08 10:05:09 -04:00
Oron Peled 1e81ed14cf Augment dahdi_genconf default generators list
Run Add spantypes and pinnedspans generators by default.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-01 22:01:35 +03:00
Oron Peled 44a5285454 add new dahdi_genconf generators
* pinnedspas: For /etc/dahdi/pinned-spans.conf
* spantypes: For /etc/dahdi/span-types.conf

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-01 21:58:04 +03:00
Oron Peled 7a1e222309 remove unused dahdi_cfg_device_args
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-01 21:57:42 +03:00
Tzafrir Cohen 52488d66fa handle_device: don't fail if no config files
Allow the udev rule to work well even if there's no span-types.conf

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-01 21:56:47 +03:00
Oron Peled 00af777a97 Newer version of DAHDI hotplug scripts
A newer version of the scripts fully adapted to pinned spans:
* handle_device does not run dahdi_cfg.
* A separate UDEV rule script for that: span_config. Should also work
  for the non-pinned case.
* span_assignments, span_types: add actions 'auto' (manually enable all)
  and 'dumpconfig' (dump current status in the format of configuration
  file).
* Fixed name of span_types and span_assignments (no '-').
* spantype.conf renamed span-types.conf: configuration files do have a
  dash.
* Those two are useful programs, insstalled to /usr/sbin.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2013-10-01 21:51:46 +03:00
Shaun Ruffell 025985d9b7 build_tools/make_version: Teach version string about git.
This copies in the make_version script from DAHDI-Linux to allow the version to
be properly reported from builds in git checkouts.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-06-26 16:45:03 -05:00
Russ Meyerriecks 2380c99c5f Add support for Digium's new te13x line of cards
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-28 17:06:10 -05:00
Shaun Ruffell 8b493f5ee2 fxotune: Use DAHDI_SPECIFY when opening by integer channel number.
In DAHDI-Linux 2.7 the layout of the /dev/dahdi files changes so that they are
grouped by span. When opening channels by number all utilities need to use
DAHDI_SPECIFY now.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-28 15:17:28 -05:00
Shaun Ruffell 2889d6afee dahdi_cfg: Make -S option based on spannumber instead of order in config file.
If the config file has two spans defined:

  span=1,1,0,esf,b8zs
  bchan=1-23
  dchan=24
  echocanceller=mg2,1-23
  span=2,2,0,esf,b8zs
  bchan=25-47
  dchan=48

And you only want to configure span-2, you would need to pass -S 1 to
dahdi_cfg. Now make the -S option take the span number as assigned in the
config file.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-28 12:34:03 -05:00
Shaun Ruffell 7939579d9e fxstest: Use DAHDI_SPECIFY when opening by integer channel number.
In DAHDI-Linux 2.7 the layout of the /dev/dahdi files changes so that they are
grouped by span. When opening channels by number all utilities need to use
DAHDI_SPECIFY now.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-28 12:34:03 -05:00
Tzafrir Cohen bab1ac48f5 Update the configure script as well.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-24 16:58:15 -05:00
Tzafrir Cohen 3d1fd71af2 optionally install pinned files: --enable-pinned
Add installation of the pinned-spans support to the Makefile. For the
moment, however, they are not installed unless you use ./configure
--enable-pinned or build with 'make DAHDI_PINNED=yes'

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-24 16:58:15 -05:00
Oron Peled ba3289ac9a Make udev run dahdi_cfg on each device:
* New script: dahdi_cfg_device_args:
   - Just like span_assignments, span_types: may be given
     one or more sysfs devpath's
   - Output the required options for dahdi_cfg. E.g:
       "-S 8 -C 15-28"
   - This may be passed (with any other wanted options)
     to the new dahdi_cfg (which supports '-S' and '-C')

 * Use dahdi_cfg_device_args in handle_device so we configure
   each span from udev.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-24 16:58:15 -05:00
Oron Peled 79fff3e278 basic user-space for pinned-spans
handle_device is the basic script intended to be called from udev.

It will call span_types on the span to apply optional
/etc/dahdi/spantype.conf onfiguration settings that need to be applied
before assignment (currently "pri" port types: E1/T1/J1).

Next it assigns span numbers to spans: if configured in
/etc/dahdi/pinned-spans.conf - use those settings. If not: by the order
of loading.

span_types and span_assignments can also be used to report the settings
they are used to configure.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-24 16:58:15 -05:00
Tzafrir Cohen de23ca9c1a Don't fail init script if no modules
No point in loading the modules if nobody built them yet. It is a common
case for one to install the userspace tools package but not (yet?) build
the modules. See, e.g.  http://bugs.debian.org/706046 .

With this changeset, we exit gracefully in such a case.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-23 17:16:27 -05:00
Tzafrir Cohen 1f26e30907 Ignore generated files
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-05-23 17:16:27 -05:00
Shaun Ruffell 17027df04b dahdi_scan: Support gaps in channel numbering.
If, via the sysfs attributed introduced in DAHDI-Linux 2.5.0, a user has
configured spans that do not have contiguous channel numbers, dahdi_scan will
not print several of the span attributes in addition to a bad basechan number.

This patch allows dahdi_scan to try and get the basechan for a span from sysfs
as opposed to calculating based on the number of channels in the previous span
scanned.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2013-04-16 23:25:28 -05:00
Russ Meyerriecks eacc071afe xpp: Fix compile error with fedora 17
One line change to re-include a missing header

Reported-By: Anthony Messina
Internal-Issue-ID: DAHTOOL-60
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2013-03-13 14:36:42 -05:00
Russ Meyerriecks b8d8cc4f8d menuselect: Remove last bits completely from the repo
menuselect has not been used in dahdi-tools since r10411 (7 months ago). This
patch removes menuselect from the repository completely.

Reported-by: Sean Bright
Internal-Issue-ID: DAHTOOL-61
Patches: kill-menuselect.patch by Sean Bright (license #5060)

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>



git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10721 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-21 19:43:49 +00:00
Russ Meyerriecks 79ed81f9f5 dahdi-monitor: Fix broken control-C behavior and -F output option
After hitting control-C when writing a wav file, dahdi_monitor reports
"Failed to read in a full wav header. Expect bad things."

Also when using the -F output option, the wav header is not written.

Reported-by: Richard Miller
Internal-Issue-ID: DAHTOOL-59
Patch: dahdi_monitor.diff by Richard Miller (license #5685)
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10717 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-21 17:25:48 +00:00
Tzafrir Cohen 3114b89905 xpp: add missing include
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10715 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-20 13:46:23 +00:00
Oron Peled 44eb7cbb2a dahdi-tools: xpp: cleanup dead code in xtalk
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10714 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-20 13:45:06 +00:00
Oron Peled 8b7c731fb6 xtalk: checkpatch clean (almost)
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: Xorcom xtalk (r10638)

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10713 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-20 13:43:41 +00:00
Oron Peled b440b2da8c xtalk: Demote one ERR() to DBG()
(caller should decide on policy)

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: Xorcom xtalk (r9304)

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10712 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-20 13:41:00 +00:00
Oron Peled ec71fef275 xtalk: Caller passes xusb_spec to xusb_find_iface()
* This xusb_spec:
  - Is a dummy struct used for this xusb instance only.
  - Is now passed by reference from caller.
  - So caller now manage the life cycle of this struct
* Also, demote one INFO() to DBG() (library should not print
  on its own)
* Also minor fix to DBG() output of spec initialization (leading 0)

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: Xorcom xtalk (r9303)

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10711 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-20 13:40:40 +00:00
Oron Peled 99ebb2a94c xtalk: allow dump_packet() without debug flags
xtalk: dump_packet() may now be used without debug flags by passing
mask == 0.

Origin: Xorcom xtalk (r9302)

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10710 17933a7a-c749-41c5-a318-cba88f637d49
2012-09-20 13:38:39 +00:00
Tzafrir Cohen 241e5e0144 README.Astribank: load module => module load
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10701 17933a7a-c749-41c5-a318-cba88f637d49
2012-07-29 11:31:39 +00:00
Shaun Ruffell 6e3da02523 dahdi_hardware: Detect the Digium TE820 card.
Adding the TE820 vendor and device ID into PCI.pm allows dahdi_hardware to
recognize the card.

Reported-by: Xavier Hienne
Internal-Issue-ID: DAHTOOL-58
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10680 17933a7a-c749-41c5-a318-cba88f637d49
2012-05-14 16:11:06 +00:00
Shaun Ruffell 4873299399 blacklist: Add hfcmulti, hfcpci, and netjet.
If DAHDI is installed the vast majority of users will most likely not want
hfcmulti, hfcpci, or netjet loaded since they may conflict with DAHDI drivers
for the TDM400, B410P, and TE11XP cards.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10601 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-28 16:35:23 +00:00
Oron Peled 4c7786a696 xpp: astribank_hook: wait for udev to settle
When running the astribank_hook (only on Astribanks, in XPP_HOTPLUG_DAHDI
mode), wait for all other Astribanks to create all the required device
files.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10585 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-22 17:38:57 +00:00
Tzafrir Cohen 88818f66cb xpp: astribank_allow: useless debug on write
Remove a useless debug message in the "write" operation.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10549 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-20 10:43:00 +00:00
Tzafrir Cohen 617f45c795 xpp: fix build warnings
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10543 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-19 16:57:24 +00:00
Tzafrir Cohen 3d32d63163 xpp: oct612x: fix build warnings
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10542 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-19 16:45:40 +00:00
Oron Peled cb4eae0e42 xpp: add forgotten include
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10506 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:46:48 +00:00
Oron Peled eff70f98dc xpp: Update product ID's in Dahdi::Hardware::USB
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10505 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:46:27 +00:00
Oron Peled 65066704be xpp: clobber fpga_load
* It was replaced long ago by astribank_hexload/astribank_tool/astribank_allow
* It hasn't been used for several releases now, nor updated.
* Time to move into the eternal bit-bucket.
* Left (very) few strings as a tribute...

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10504 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:45:57 +00:00
Oron Peled be70b5b347 xpp: fix manpage of astribank_hexload
* Fixed 'astribanks_tool' string

Signed-off-by: Oron Peled <oron.peled@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10503 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:45:36 +00:00
Oron Peled 5a123a50e5 xpp: Customizable license markers
* License strings markers (BEGIN.../END...) can be customized
* By default, generate a "generic" license markers
* We accept any (paired) markers from the valid list


Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10502 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:43:57 +00:00
Oron Peled d8213d2adf xpp: Add info to astribank_tool -Q
* In MPP serial protocol add support for SER_STAT_GET command
* Use it to query firmware for:
  - FPGA build configuration number (1 - old main, 2 - new main)
  - Watchdog timer state bit (ready/expired)
  - XPD Alive timer state bit (yes/no)
* Also cleanup the code in mpps_card_info():
  - In all MPP serial commands the send/recive buffers must
    have identical size
  - No need to alias struct pointers to byte-buffers, just use
    the structs themselves as buffers.


Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10501 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:43:18 +00:00
Oron Peled 273230b044 xpp: echo_loader: whitespace cleanup
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10500 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:42:56 +00:00
Oron Peled bccb264100 xpp: bugfix: handle echo_loader errors
* I/O errors of the device were not propagated up by echo_loader
* As a result, Octasic load failure did not prevented USB renumeration
* Make consistent return values:
  - In our functions: ret < 0 is error
  - In Octasic functions (UINT32): return Octasic error codes
* All error paths prints error messages (so we see how the error propagates)
* Also changed error order testing in init_octasic():
  Return status should be tested before the values of by-reference parameters


Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10499 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:42:33 +00:00
Oron Peled d7e24fde01 xpp: echo_loader.c: add AB id to messages
* Define new macros AB_INFO(), AB_ERR() that prefix their message
  with the astribank information (usb device + serial number)
* Replace all INFO()/ERR() messages in echo_loader.c with the new macros


Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10498 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:42:10 +00:00
Oron Peled 3d59ece9b6 improve build_tools/dump_sys_state
* Use the new dahdi_sysfs_copy script
* Clean old/unused code
* Add notification output
* Now always creates a tarball - the gzipped copy is many times smaller.
* Without arguments, tarball name is:
    sys_dump.<hostname>_<date>_<time>.tar.gz


Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10497 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:41:49 +00:00
Oron Peled d11559e143 new build_tools/dahdi_sysfs_copy
Short perl script to copy dahdi related sysfs trees
into a designated directory.


Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10496 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:40:52 +00:00
Oron Peled 9b96dab2c0 xpp: xpp_fxloader: improve output
* Replaced (almost) all $LOGGER to echo:
  - In interactive use -- that what we want anyway
  - When called from UDEV, the subprocess stdout/stderr is piped to
    $LOGGER anyway (at the end of the script)
  - No need for many $LOGGER instances (each with its own pid)


Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10495 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:36:33 +00:00
Oron Peled 3572bb5a13 xpp: sysfs access cleanups
With /proc/xpp code removed, some cleanup can be done.

* No need to search alternative attribute names, so xbus_attr_path() is
  redundant.

* Don't compose xbus sysfs directory in multiple code locations.
  Do it once in Xbus->new() and use the result ($xbus->sysfs_dir)

* Pass XPD directory strings directly to Xpd->new()
  - So we parse it for unit/subunit only in Xpd->new()

* Don't parse xbus sysfs name:
  - Toplevel scan, pass it as is to Xbus->new()
  - Xbus->new() deduce the xbus->num from the naming
    of Xpd's inside (nnⓂ️k) -- this is a hack until
    we add xbus number as an xbus sysfs attribute

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10494 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:32:27 +00:00
Oron Peled 6027d2d1d1 xpp: perl_modules: Remove /proc/xpp usage
* All references to old /proc/xpp interface were removed.
* Everything is now done via sysfs

Information has been available from /sys/bus/astribanks since before
Dahdi-linux 2.2 .

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10492 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:30:41 +00:00
Oron Peled 971a45a807 xpp: clean 'Extrainfo' EEPROM field
* Extrainfo field contains junk data
* Caused by:
  - The field is initialized to 0xFF values
  - There was no null termination (and no room to add it)
* New code:
  - Ensure that show_extrainfo() have null termination even if EEPROM
    field is full.
  - Replace trailing 0xFF characters with '\0' when reading this field
  - Since our default burned EEPROM contain Extrainfo field full of
    0xFF characters, this would make them look as null filled.

Internal Issue-Id: #1341
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10491 17933a7a-c749-41c5-a318-cba88f637d49
2012-03-15 20:29:09 +00:00