diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-01-30 18:10:33 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-01-30 18:10:33 +0000 |
commit | aaca5292c564c95d527a97e4ff61763d8b3965dc (patch) | |
tree | a73604c16a1174f81414a2c7fe32679795d0a703 | |
parent | 5ff59ba3efd52e01be86d15b3bc84983c6764d20 (diff) |
xpp: init_card_4_30: add comment
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9709 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rwxr-xr-x | drivers/dahdi/xpp/init_card_4_30 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/dahdi/xpp/init_card_4_30 b/drivers/dahdi/xpp/init_card_4_30 index 2f0a79d..d70cfdc 100755 --- a/drivers/dahdi/xpp/init_card_4_30 +++ b/drivers/dahdi/xpp/init_card_4_30 @@ -348,6 +348,11 @@ sub port_setup($) { } else { my $file = sprintf "/sys/bus/xpds/devices/%02d:%1d:%1d/pri_protocol", $ENV{XBUS_NUMBER}, $ENV{UNIT_NUMBER}, $portno; + # The 'open' will fail if the port does not exist. + # (or rather: the XPD for it does not exist). While + # we only read this file to get the default E1/T1 value, + # if it does not exist, it also implies the commands sent would + # get nowhere. So we might as well quit now. open(F, $file) || return; $sysfs_pri_protocol = <F>; close F; |