* @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);
+XBT_PUBLIC void sg_host_disks(const_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. */
IoImpl& IoImpl::set_timeout(double timeout)
{
- s4u::Host* host = get_disk() ? get_disk()->get_host() : s4u::Host::by_name(get_storage()->get_host());
+ const s4u::Host* host = get_disk() ? get_disk()->get_host() : s4u::Host::by_name(get_storage()->get_host());
timeout_detector_ = host->pimpl_cpu->sleep(timeout);
timeout_detector_->set_activity(this);
return *this;
}
// ========= storage related functions ============
-void sg_host_disks(sg_host_t host, unsigned int* disk_count, sg_disk_t** disks)
+void sg_host_disks(const_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();