Commit bb98a520 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

moved up list_raw_devices - it doesn't need camogm runnning

parent ab5770e7
...@@ -306,6 +306,24 @@ else if ($cmd=="list") { ...@@ -306,6 +306,24 @@ else if ($cmd=="list") {
echo "</".$cmd.">"; echo "</".$cmd.">";
xml_footer(); xml_footer();
} }
else if ($cmd=="list_raw_devices"){
$devices = get_raw_dev();
foreach ($devices as $device => $size) {
echo "<item>";
echo "<raw_device>" . $device . "</raw_device>";
echo "<size>" . round($size / 1048576, 2) . "</size>";
echo "</item>";
}
}
else if ($cmd=="list_partitions"){
$partitions = get_partitions();
foreach ($partitions as $device=>$size) {
echo "<item>";
echo " <device>" . $device . "</device>";
echo " <size>" . round($size / 1048576, 2) . "</size>";
echo "</item>";
}
}
else else
{ {
$fcmd = fopen($cmd_pipe, "w"); $fcmd = fopen($cmd_pipe, "w");
...@@ -427,15 +445,6 @@ else ...@@ -427,15 +445,6 @@ else
} }
} }
break; break;
case "list_raw_devices":
$devices = get_raw_dev();
foreach ($devices as $device => $size) {
echo "<item>";
echo "<raw_device>" . $device . "</raw_device>";
echo "<size>" . round($size / 1048576, 2) . "</size>";
echo "</item>";
}
break;
case "mkdir": case "mkdir":
$dir_name = $_GET['name']; $dir_name = $_GET['name'];
if (isset($dir_name) && (($dir_name != "") || ($dir_name != " "))) if (isset($dir_name) && (($dir_name != "") || ($dir_name != " ")))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment