X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/325a6bb78259a0e6835f69ca6fc2341dc620418d..fe351f7439d06e7b0a7621ba282ea27c536133f9:/include/simgrid/plugins/file_system.h diff --git a/include/simgrid/plugins/file_system.h b/include/simgrid/plugins/file_system.h index 8f8b4d55d7..feb2a74b16 100644 --- a/include/simgrid/plugins/file_system.h +++ b/include/simgrid/plugins/file_system.h @@ -53,21 +53,21 @@ XBT_PUBLIC xbt_dict_t sg_storage_get_content(sg_storage_t storage); XBT_PUBLIC xbt_dict_t sg_host_get_storage_content(sg_host_t host); -#define MSG_file_open(fullpath, data) sg_file_open(fullpath, data) -#define MSG_file_read(fd, size) sg_file_read(fd, size) -#define MSG_file_write(fd, size) sg_file_write(fd, size) +#define MSG_file_open(fullpath, data) sg_file_open((fullpath), (data)) +#define MSG_file_read(fd, size) sg_file_read((fd), (size)) +#define MSG_file_write(fd, size) sg_file_write((fd), (size)) #define MSG_file_close(fd) sg_file_close(fd) #define MSG_file_get_name(fd) sg_file_get_name(fd) #define MSG_file_get_size(fd) sg_file_get_size(fd) #define MSG_file_dump(fd) sg_file_dump(fd) #define MSG_file_get_data(fd) sg_file_get_data(fd) -#define MSG_file_set_data(fd, data) sg_file_set_data(fd, data) -#define MSG_file_seek(fd, offset, origin) sg_file_seek(fd, offset, origin) +#define MSG_file_set_data(fd, data) sg_file_set_data((fd), (data)) +#define MSG_file_seek(fd, offset, origin) sg_file_seek((fd), (offset), (origin)) #define MSG_file_tell(fd) sg_file_tell(fd) -#define MSG_file_move(fd, fullpath) sg_file_get_size(fd, fullpath) +#define MSG_file_move(fd, fullpath) sg_file_get_size((fd), (fullpath)) #define MSG_file_unlink(fd) sg_file_unlink(fd) -#define MSG_file_rcopy(file, host, fullpath) sg_file_rcopy(file, host, fullpath) -#define MSG_file_rmove(file, host, fullpath) sg_file_rmove(file, host, fullpath) +#define MSG_file_rcopy(file, host, fullpath) sg_file_rcopy((file), (host), (fullpath)) +#define MSG_file_rmove(file, host, fullpath) sg_file_rmove((file), (host), (fullpath)) #define MSG_storage_file_system_init() sg_storage_file_system_init() #define MSG_storage_get_free_size(st) sg_storage_get_size_free(st) @@ -153,7 +153,10 @@ public: std::map* get_content() const { return content_.get(); } const char* get_mount_point() { return mount_point_.c_str(); } const char* get_mount_point(s4u::Host* remote_host) { return remote_mount_points_[remote_host].c_str(); } - void add_remote_mount(Host* host, std::string mount_point) { remote_mount_points_.insert({host, mount_point}); } + void add_remote_mount(Host* host, const std::string& mount_point) + { + remote_mount_points_.insert({host, mount_point}); + } sg_size_t get_size() const { return size_; } sg_size_t get_used_size() const { return used_size_; } void decr_used_size(sg_size_t size) { used_size_ -= size; }