From 67b3738d3d9a7cd2befda8b695411383015a481d Mon Sep 17 00:00:00 2001 From: Niclas Berglind Date: Sat, 5 Apr 2014 00:14:40 +0200 Subject: [PATCH] Minor fixes to Dataset and Zvol constructors. Signed-off-by: Niclas Berglind --- src/Dataset.php | 4 +--- src/Zvol.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Dataset.php b/src/Dataset.php index 19dbc67..f61baa1 100644 --- a/src/Dataset.php +++ b/src/Dataset.php @@ -68,12 +68,10 @@ class OMVModuleZFSDataset { $ds_exists = false; } if ($ds_exists) { - $cmd = "zfs list -r -o name -H -t snapshot " . $name . " 2>&1"; + $cmd = "zfs list -r -d 1 -o name -H -t snapshot " . $name . " 2>&1"; $this->exec($cmd, $out2, $res2); foreach ($out2 as $line2) { - if (preg_match('/^' . preg_quote($name, '/') . '\@.*$/', $line2)) { $this->snapshots[$line2] = new OMVModuleZFSSnapshot($line2); - } } } else { $this->create(); diff --git a/src/Zvol.php b/src/Zvol.php index aea0ca2..fb86eeb 100644 --- a/src/Zvol.php +++ b/src/Zvol.php @@ -69,7 +69,7 @@ class OMVModuleZFSZvol { $zvol_exists = false; } if ($zvol_exists) { - $cmd = "zfs list -r -o name -H -t snapshot " . $name . " 2>&1"; + $cmd = "zfs list -r -d 1 -o name -H -t snapshot " . $name . " 2>&1"; $this->exec($cmd, $out2, $res2); foreach ($out2 as $line2) { $this->snapshots[$line2] = new OMVModuleZFSSnapshot($line2); -- 2.39.2