From 5b09167d682c620c14de691579a929d7274627ae Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sun, 30 Jan 2011 18:10:33 +0000 Subject: [PATCH] xpp: init_card_4_30: add comment Signed-off-by: Tzafrir Cohen git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9709 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/xpp/init_card_4_30 | 5 +++++ 1 file changed, 5 insertions(+) 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 = ; close F;