~ubuntu-branches/ubuntu/hardy/openmpi/hardy-updates

« back to all changes in this revision

Viewing changes to ompi/mca/io/romio/romio/adio/ad_xfs/io_romio_ad_xfs_resize.c

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2006-10-15 00:46:11 UTC
  • Revision ID: james.westby@ubuntu.com-20061015004611-uuhxnaxyjmuxfd5h
Tags: upstream-1.1
ImportĀ upstreamĀ versionĀ 1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; c-basic-offset:4 ; -*- */
 
2
/* 
 
3
 *
 
4
 *   Copyright (C) 1997 University of Chicago. 
 
5
 *   See COPYRIGHT notice in top-level directory.
 
6
 */
 
7
 
 
8
#include "ad_xfs.h"
 
9
 
 
10
void ADIOI_XFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code)
 
11
{
 
12
    int err;
 
13
    static char myname[] = "ADIOI_XFS_RESIZE";
 
14
    
 
15
    err = ftruncate64(fd->fd_sys, size);
 
16
    if (err == -1) {
 
17
        *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
 
18
                                           myname, __LINE__, MPI_ERR_IO, "**io",
 
19
                                           "**io %s", strerror(errno));
 
20
    }
 
21
    else *error_code = MPI_SUCCESS;
 
22
}