From: <mga...@us...> - 2010-12-08 15:01:54
|
Revision: 2979 http://scst.svn.sourceforge.net/scst/?rev=2979&view=rev Author: mgandalf Date: 2010-12-08 15:01:48 +0000 (Wed, 08 Dec 2010) Log Message: ----------- - Exit 0 and issue warning on empty config file. Modified Paths: -------------- trunk/scstadmin/scstadmin.sysfs/scstadmin Modified: trunk/scstadmin/scstadmin.sysfs/scstadmin =================================================================== --- trunk/scstadmin/scstadmin.sysfs/scstadmin 2010-12-08 14:57:48 UTC (rev 2978) +++ trunk/scstadmin/scstadmin.sysfs/scstadmin 2010-12-08 15:01:48 UTC (rev 2979) @@ -1516,6 +1516,11 @@ readConfigFile() if (!$CONFIG); + if (!scalar keys %{$CONFIG}) { + print "-> WARNING: Configuration is empty or unreadable, aborting.\n\n"; + exit 0; + } + # Check for a minimum sane configuration if (!defined($$CONFIG{'TARGET_DRIVER'}) || !(scalar keys %{$$CONFIG{'TARGET_DRIVER'}})) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |