Skip to content

Commit 74441b9

Browse files
committed
update the error codes reported by file_delete
1 parent a659cb2 commit 74441b9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ompi/mca/io/ompio/io_ompio_file_open.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,14 @@ int mca_io_ompio_file_delete (const char *filename,
113113
*/
114114
ret = unlink(filename);
115115

116-
if (0 > ret && ENOENT != errno ) {
117-
opal_output (1, "errno = %d %s\n", errno, strerror(errno));
118-
return MPI_ERR_ACCESS;
116+
if (0 > ret ) {
117+
if ( ENOENT == errno ) {
118+
// opal_output (1, "errno = %d %s\n", errno, strerror(errno));
119+
return MPI_ERR_NO_SUCH_FILE;
120+
} else {
121+
opal_output (1, "errno = %d %s\n", errno, strerror(errno));
122+
return MPI_ERR_ACCESS;
123+
}
119124
}
120125

121126
return OMPI_SUCCESS;

0 commit comments

Comments
 (0)