2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

10_ZWAVE.pm: small Firmware patch (Forum #101961)

git-svn-id: https://svn.fhem.de/fhem/trunk@20091 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-09-02 07:00:48 +00:00
parent 4153e7b707
commit b171f87206

View File

@ -5452,9 +5452,10 @@ ZWave_firmware($$)
return("Firmware update with FIRMWARE_UPDATE_MD classversion > 4 ".
"not supported", "EMPTY") if($classVersion > 4);
my ($target, $fwFile) = split / /, $args;
my $usage = "wrong argumets, need: <FwTarget> <FwFileName>";
return ($usage, "EMPTY") if (!$target || !$fwFile);
my $usage = "wrong argumets, need: <FwTargetAsNumber> <FwFileName>";
return ($usage, "EMPTY")
if(!defined($target) || $target !~ m/^\d+$/ || !$fwFile);
my $fName = "$attr{global}{modpath}/FHEM/firmware/$fwFile";
my $l = -s $fName;
return "$fName does not exists, or is empty" if(!$l);