diff options
Diffstat (limited to 'xpp/perl_modules/Dahdi/Utils.pm')
-rw-r--r-- | xpp/perl_modules/Dahdi/Utils.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/xpp/perl_modules/Dahdi/Utils.pm b/xpp/perl_modules/Dahdi/Utils.pm index dcb7441..4ca468b 100644 --- a/xpp/perl_modules/Dahdi/Utils.pm +++ b/xpp/perl_modules/Dahdi/Utils.pm @@ -23,6 +23,20 @@ sub AUTOLOAD { } } +# Initialize ProcFS and SysFS pathes, in case the user set +# DAHDI_VIRT_TOP +BEGIN { + if (exists $ENV{DAHDI_VIRT_TOP}) { + $Dahdi::virt_base = $ENV{DAHDI_VIRT_TOP}; + } else { + $Dahdi::virt_base = ''; + } + $Dahdi::proc_dahdi_base = "$Dahdi::virt_base/proc/dahdi"; + $Dahdi::proc_xpp_base = "$Dahdi::virt_base/proc/xpp"; + $Dahdi::proc_usb_base = "$Dahdi::virt_base/proc/bus/usb"; + $Dahdi::sys_base = "$Dahdi::virt_base/sys"; +} + sub xpp_dump($) { my $self = shift || die; printf STDERR "Dump a %s\n", ref($self); |