Commit eb27ad00 authored by Mikhail Karpenko's avatar Mikhail Karpenko
Browse files

Filter mountpoints in camogmgui

parent 47834f84
Loading
Loading
Loading
Loading
+34 −25
Original line number Diff line number Diff line
@@ -349,6 +349,8 @@ else
		case "listdevices":
			exec ("cat /proc/partitions", $arr1);
			exec ("cat /proc/mounts", $arr2);
			$ret = get_mnt_dev();
			$mnt_dev = $ret["devices"];
			$j = 0;
			// first two lines are header and empty  line separator, skip them
			$i = 2;
@@ -372,6 +374,12 @@ else
			}
			$j = 0;
			foreach ($partitions as $partition) {
				$include = false;
				foreach ($mnt_dev as $dev) {
					if (strpos($dev, $partition))
						$include = true;
				}
				if ($include) {
					echo "<item>";
					echo "<partition>/dev/".$partition."</partition>";
					echo "<size>".round($size[$j]/1024/1024, 2) ." GB</size>";
@@ -400,6 +408,7 @@ else
					}
					echo "</item>";
				}
			}
			break;
		case "list_raw_devices":
			$devices = get_raw_dev();