]> git.datanom.net - omvzfs.git/commitdiff
Some minor bug fixes
authorMichael Rasmussen <mir@datanom.net>
Fri, 18 Jul 2014 13:36:36 +0000 (15:36 +0200)
committerMichael Rasmussen <mir@datanom.net>
Fri, 18 Jul 2014 13:36:36 +0000 (15:36 +0200)
src/Vdev.php

index bdaab9cd4c1a3ebc95cf364be7084c5f651e2806..2c5f9995a110f780e3779eb10472d0f43a47619e 100644 (file)
@@ -45,7 +45,7 @@ class OMVModuleZFSVdev {
      * @throws OMVModuleZFSException
         */
 
      * @throws OMVModuleZFSException
         */
 
-       public function __construct($pool, OMVModuleZFSVdevType $type, array $disks) {
+       public function __construct($pool, $type, array $disks) {
                switch ($type) {
                        case OMVModuleZFSVdevType::OMVMODULEZFSPLAIN:
                                break;
                switch ($type) {
                        case OMVModuleZFSVdevType::OMVMODULEZFSPLAIN:
                                break;
@@ -65,6 +65,8 @@ class OMVModuleZFSVdev {
                                if (count($disks) < 5)
                                        throw new OMVModuleZFSException("A Raidz3 must contain at least 5 disks");
                                break;
                                if (count($disks) < 5)
                                        throw new OMVModuleZFSException("A Raidz3 must contain at least 5 disks");
                                break;
+                       default:
+                               throw new OMVModuleZFSException("$type: Unknown zpool type");
                }
                $this->pool = $pool;
                $this->disks = $disks;
                }
                $this->pool = $pool;
                $this->disks = $disks;
This page took 0.031352 seconds and 5 git commands to generate.