Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Put forward declaration of static function in c file, not in header.
[simgrid.git] / src / surf / workstation.c
index 62797b0..30d3365 100644 (file)
@@ -343,6 +343,22 @@ static surf_action_t ws_action_stat(void *workstation, surf_file_t stream)
   return model->extension.storage.stat(st,  stream);
 }
 
+static surf_action_t ws_action_unlink(void *workstation, surf_file_t stream)
+{
+  storage_t st = find_storage_on_mount_list(workstation, stream->storage);
+  XBT_DEBUG("UNLINK on disk '%s'",st->generic_resource.name);
+  surf_model_t model = st->generic_resource.model;
+  return model->extension.storage.unlink(st,  stream);
+}
+
+static surf_action_t ws_action_ls(void *workstation, const char* mount, const char *path)
+{
+  XBT_DEBUG("LS on mount '%s' and file '%s'",mount, path);
+  storage_t st = find_storage_on_mount_list(workstation, mount);
+  surf_model_t model = st->generic_resource.model;
+  return model->extension.storage.ls(st, path);
+}
+
 static void surf_workstation_model_init_internal(void)
 {
   surf_workstation_model = surf_model_init();
@@ -400,6 +416,8 @@ static void surf_workstation_model_init_internal(void)
   surf_workstation_model->extension.workstation.read = ws_action_read;
   surf_workstation_model->extension.workstation.write = ws_action_write;
   surf_workstation_model->extension.workstation.stat = ws_action_stat;
+  surf_workstation_model->extension.workstation.unlink = ws_action_unlink;
+  surf_workstation_model->extension.workstation.ls = ws_action_ls;
 }
 
 void surf_workstation_model_init_current_default(void)