Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : privatization_regions in snapshot may be NULL
[simgrid.git] / src / surf / storage_n11.cpp
index e384fb8..d27457b 100644 (file)
@@ -313,7 +313,7 @@ void StorageN11Model::updateActionsState(double /*now*/, double delta)
       double rate = lmm_variable_getvalue(action->getVariable());
       /* Hack to avoid rounding differences between x86 and x86_64
        * (note that the next sizes are of type sg_size_t). */
-      long incr = delta * rate + MAXMIN_PRECISION;
+      long incr = delta * rate + 0.00001; // Use legacy value. I don't know what this hack can be... FIXME: Pierre, please check.
       action->p_storage->m_usedSize += incr; // disk usage
       action->p_file->size += incr; // file size
 
@@ -406,7 +406,7 @@ StorageActionPtr StorageN11::ls(const char* path)
   return action;
 }
 
-StorageActionPtr StorageN11::open(const char* mount, char* path)
+StorageActionPtr StorageN11::open(const char* mount, const char* path)
 {
   XBT_DEBUG("\tOpen file '%s'",path);
 
@@ -484,21 +484,6 @@ StorageActionPtr StorageN11::write(surf_file_t fd, sg_size_t size)
   return action;
 }
 
-void StorageN11::rename(const char *src, const char *dest)
-{
-  sg_size_t *psize, *new_psize;
-  psize = (sg_size_t*) xbt_dict_get_or_null(p_content,src);
-  new_psize = xbt_new(sg_size_t, 1);
-  *new_psize = *psize;
-  if (psize){// src file exists
-    xbt_dict_remove(p_content, src);
-    xbt_dict_set(p_content, dest, new_psize,NULL);
-    XBT_DEBUG("Change file name from %s to %s, size '%llu'",src, dest, *psize);
-  }
-  else
-    XBT_DEBUG("File %s doesn't exist",src);
-}
-
 /**********
  * Action *
  **********/