* @return a dynar containing all storages (name) attached to the host
*/
XBT_PUBLIC xbt_dynar_t sg_host_get_attached_storage_list(const_sg_host_t host);
+XBT_PUBLIC void sg_host_disks(sg_host_t host, unsigned int* disk_count, sg_disk_t** disks);
// =========== user-level functions ===============
/** @brief Return the speed of the processor (in flop/s), regardless of the current load on the machine. */
}
// ========= storage related functions ============
+void sg_host_disks(sg_host_t host, unsigned int* disk_count, sg_disk_t** disks)
+{
+ std::vector<sg_disk_t> list = host->get_disks();
+ *disk_count = list.size();
+ *disks = static_cast<sg_disk_t*>(xbt_malloc(sizeof(sg_disk_t) * (*disk_count)));
+ for (size_t i = 0; i < *disk_count; i++)
+ (*disks)[i] = list[i];
+}
+
xbt_dict_t sg_host_get_mounted_storage_list(sg_host_t host)
{
xbt_assert((host != nullptr), "Invalid parameters");