1 /* -*- Mode: C; c-basic-offset:4 ; -*- */
5 * Copyright (C) 1997 University of Chicago.
6 * See COPYRIGHT notice in top-level directory.
14 void ADIOI_PFS_Close(ADIO_File fd
, int *error_code
)
18 static char myname
[] = "ADIOI_PFS_CLOSE";
22 MPE_Log_event(9, 0, "start close");
24 err
= close(fd
->fd_sys
);
26 MPE_Log_event(10, 0, "end close");
29 *error_code
= (err
== 0) ? MPI_SUCCESS
: MPI_ERR_UNKNOWN
;
32 *error_code
= MPIR_Err_setmsg(MPI_ERR_IO
, MPIR_ADIO_ERROR
,
33 myname
, "I/O Error", "%s", strerror(errno
));
34 ADIOI_Error(fd
, *error_code
, myname
);
36 else *error_code
= MPI_SUCCESS
;