Home | History | Annotate | Download | only in ffsb-6.0-rc2
      1 /*
      2  *   Copyright (c) International Business Machines Corp., 2001-2004
      3  *
      4  *   This program is free software;  you can redistribute it and/or modify
      5  *   it under the terms of the GNU General Public License as published by
      6  *   the Free Software Foundation; either version 2 of the License, or
      7  *   (at your option) any later version.
      8  *
      9  *   This program is distributed in the hope that it will be useful,
     10  *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
     11  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
     12  *   the GNU General Public License for more details.
     13  *
     14  *   You should have received a copy of the GNU General Public License
     15  *   along with this program;  if not, write to the Free Software
     16  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
     17  */
     18 #ifndef _FH_H_
     19 #define _FH_H_
     20 
     21 #include <inttypes.h>
     22 
     23 struct ffsb_thread;
     24 struct ffsb_fs;
     25 
     26 int fhopenread(char *, struct ffsb_thread *, struct ffsb_fs *);
     27 int fhopenwrite(char *, struct ffsb_thread *, struct ffsb_fs *);
     28 int fhopencreate(char *, struct ffsb_thread *, struct ffsb_fs *);
     29 int fhopenappend(char *, struct ffsb_thread *, struct ffsb_fs *);
     30 
     31 void fhread(int, void *, uint64_t, struct ffsb_thread *, struct ffsb_fs *);
     32 
     33 /* can only write up to size_t bytes at a time, so size is a uint32_t */
     34 void fhwrite(int, void *, uint32_t, struct ffsb_thread *, struct ffsb_fs *);
     35 void fhseek(int, uint64_t, int, struct ffsb_thread *, struct ffsb_fs *);
     36 void fhclose(int, struct ffsb_thread *, struct ffsb_fs *);
     37 
     38 int writefile_helper(int, uint64_t, uint32_t, char *, struct ffsb_thread *,
     39 		     struct ffsb_fs *);
     40 
     41 #endif /* _FH_H_ */
     42