Commit b07575cb authored by Mikhail Karpenko's avatar Mikhail Karpenko

Change list_raw_device return format

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