Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
unimplemented MSG_file_dump function
authorsuter <frederic.suter@cc.in2p3.fr>
Wed, 10 Jul 2013 12:20:29 +0000 (14:20 +0200)
committersuter <frederic.suter@cc.in2p3.fr>
Wed, 10 Jul 2013 12:20:44 +0000 (14:20 +0200)
examples/msg/io/file.c
include/msg/msg.h
src/msg/msg_io.c

index 023c1db..d06dac0 100644 (file)
@@ -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"))
index fb6508d..51e3107 100644 (file)
@@ -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);
index 6893083..c2da672 100644 (file)
@@ -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
  *