Commit b07575cb authored by Mikhail Karpenko's avatar Mikhail Karpenko

Change list_raw_device return format

parent 6d817aee
...@@ -320,12 +320,18 @@ else if ($cmd=="list") { ...@@ -320,12 +320,18 @@ else if ($cmd=="list") {
} }
else if ($cmd=="list_raw_devices"){ else if ($cmd=="list_raw_devices"){
$devices = get_raw_dev(); $devices = get_raw_dev();
xml_header();
echo "<command>".$cmd."</command>";
echo "<".$cmd.">";
foreach ($devices as $device => $size) { foreach ($devices as $device => $size) {
echo "<item>"; echo "<item>";
echo "<raw_device>" . $device . "</raw_device>"; echo "<raw_device>" . $device . "</raw_device>";
echo "<size>" . round($size / 1048576, 2) . "</size>"; echo "<size>" . round($size / 1048576, 2) . "</size>";
echo "</item>"; echo "</item>";
} }
echo "</".$cmd.">";
xml_footer();
} }
else if ($cmd=="list_partitions"){ else if ($cmd=="list_partitions"){
$partitions = get_partitions(); $partitions = get_partitions();
......
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