00001
00002
00003
00004
00005
00006
00007
00008 #include "ad_xfs.h"
00009
00010 void ADIOI_XFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code)
00011 {
00012 int err;
00013 static char myname[] = "ADIOI_XFS_RESIZE";
00014
00015 err = ftruncate64(fd->fd_sys, size);
00016 if (err == -1) {
00017 *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
00018 myname, __LINE__, MPI_ERR_IO, "**io",
00019 "**io %s", strerror(errno));
00020 }
00021 else *error_code = MPI_SUCCESS;
00022 }