From: suter Date: Wed, 10 Jul 2013 12:20:29 +0000 (+0200) Subject: unimplemented MSG_file_dump function X-Git-Tag: v3_9_90~168 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8af8a1a1a07bf54b28a5fc112ac1ee7875b5c250?hp=e9e9edad500ddf3967b577ca018ae9f5567bc1d8 unimplemented MSG_file_dump function --- diff --git a/examples/msg/io/file.c b/examples/msg/io/file.c index 023c1dbdbe..d06dac0017 100644 --- a/examples/msg/io/file.c +++ b/examples/msg/io/file.c @@ -36,8 +36,9 @@ int host(int argc, char *argv[]) char* mount = xbt_strdup("/home"); size_t read,write; - if(!strcmp(MSG_process_get_name(MSG_process_self()),"0")) + if(!strcmp(MSG_process_get_name(MSG_process_self()),"0")){ file = MSG_file_open(mount,FILENAME1); + MSG_file_dump(file);} else if(!strcmp(MSG_process_get_name(MSG_process_self()),"1")) file = MSG_file_open(mount,FILENAME2); else if(!strcmp(MSG_process_get_name(MSG_process_self()),"2")) diff --git a/include/msg/msg.h b/include/msg/msg.h index fb6508de1b..51e31073c2 100644 --- a/include/msg/msg.h +++ b/include/msg/msg.h @@ -83,6 +83,7 @@ XBT_PUBLIC(size_t) MSG_file_write(size_t size, msg_file_t fd); XBT_PUBLIC(msg_file_t) MSG_file_open(const char* mount, const char* path); XBT_PUBLIC(int) MSG_file_close(msg_file_t fd); XBT_PUBLIC(size_t) MSG_file_get_size(msg_file_t fd); +XBT_PUBLIC(void) MSG_file_dump(msg_file_t fd); XBT_PUBLIC(int) MSG_file_unlink(msg_file_t fd); XBT_PUBLIC(xbt_dict_t) MSG_file_ls(const char *mount, const char *path); diff --git a/src/msg/msg_io.c b/src/msg/msg_io.c index 68930837bb..c2da672c75 100644 --- a/src/msg/msg_io.c +++ b/src/msg/msg_io.c @@ -19,6 +19,22 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_io, msg, /********************************* File **************************************/ +/** \ingroup msg_file_management + * \brief Display information related to a file descriptor + * + * \param fd is a the file descriptor + */ + +void MSG_file_dump (msg_file_t fd){ + THROW_UNIMPLEMENTED; + /* Update the cached information first */ +// fd->info = __MSG_file_get_info(fd); +// XBT_INFO("File Descriptor information:\n\t\tFull name: '%s'" +// "\n\t\tSize: %zu\n\t\tMount point: '%s'\n\t\t Storage Id: '%s'" +// "\n\t\t Content Type: '%s'", fd->fullname, fd->info->size, NULL,NULL,NULL); +// fd->info->mount_point, fd->info->storageId, fd->info->content_type); +} + /** \ingroup msg_file_management * \brief Read a file *