-
Notifications
You must be signed in to change notification settings - Fork 0
/
io_file.h
35 lines (30 loc) · 806 Bytes
/
io_file.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/uio.h>
#include <fcntl.h>
#include <errno.h>
#include <time.h>
#include <sys/stat.h>
#include <string.h>
#ifndef IO_FILE
typedef struct io_file {
int fd;
unsigned long long int current_position;
unsigned long long int writes;
unsigned long long int reads;
int direct;
unsigned long long int * lba_history;
unsigned long long int * bs_history;
unsigned long long int history_size;
off_t size;
} IOFile;
int io_file_reset_pos(IOFile *);
int io_file_get_size(IOFile *);
int delete_io_file(IOFile *);
int io_file_print_stats(IOFile *, long int);
int read_file(IOFile *, off_t, off_t );
int write_file(IOFile *, off_t, off_t );
IOFile * io_file(const char *, int, off_t);
#define IO_FILE
#endif