1
1
openmpi/ompi/mca/fs/ime/fs_ime_file_delete.c
raafatfeki 7b2d83c898 mca/fs: Remove unused functions and prototypes & reduce recurent code through all components
I removed the implementation and/or prototypes of all unused functions defined for all components.
To reduce recurrent code, I created functions under base for the management of error codes and setting of file permission and amode.
Then, I replaced these recurrent code by those function for all components.

Signed-off-by: raafatfeki <fekiraafat@gmail.com>

add a missing header file

Signed-off-by: Edgar Gabriel <egabriel@central.uh.edu>
2019-11-25 09:01:38 -06:00

41 строка
712 B
C

/*
* Copyright (c) 2018 DataDirect Networks. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ime_native.h"
#include "ompi_config.h"
#include "fs_ime.h"
#include "mpi.h"
#include "ompi/constants.h"
#include "ompi/mca/fs/fs.h"
/*
* file_delete_ime
*
* Function: - deletes a file
* Accepts: - file name & info
* Returns: - Success if file closed
*/
int mca_fs_ime_file_delete (char* file_name,
struct opal_info_t *info)
{
int ret;
/* reset errno */
errno = 0;
ret = ime_native_unlink(file_name);
if (ret != 0) {
return mca_fs_base_get_mpi_err(errno);
}
return OMPI_SUCCESS;
}