]> git.datanom.net - omvzfs.git/blobdiff - src/Dataset.php
Minor change to snapshots in Dataset and Zvol classes.
[omvzfs.git] / src / Dataset.php
index 9ee6579c78c0322c3037e7fc234dbec136104fc2..28bd4d1fd864ec40a3322d6b239b12ac2b933604 100644 (file)
@@ -67,13 +67,10 @@ class OMVModuleZFSDataset {
                                continue;
                        }
                }
-               $qname = preg_quote($name . "@", '/');
-               $cmd = "zfs list -H -t snapshot 2>&1";
-               $this->exec($cmd, $out, $res);
-               foreach ($out as $line) {
-                       if (preg_match('/^(' . $qname . '[^\s]+)\t.*$/', $line, $res)) {
-                               $this->snapshots[$res[1]] = new OMVModuleZFSSnapshot($res[1]);
-                       }
+               $cmd = "zfs list -r -o name -H -t snapshot " . $name . " 2>&1";
+               $this->exec($cmd, $out2, $res2);
+               foreach ($out2 as $line2) {
+                       $this->snapshots[$line2] = new OMVModuleZFSSnapshot($line2);
                }
        }
 
This page took 0.049175 seconds and 5 git commands to generate.