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
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);
StorageActionPtr action = new StorageN11Action(getModel(), 0, getState() != SURF_RESOURCE_ON, this, OPEN);
action->p_file = file;
- free(path);
+
return action;
}
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 *
**********/