options.h 841 Bytes
Newer Older
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
36
37
38
39
#ifndef UTIL_H
#define UTIL_H

#include <sys/types.h>

#define kUMASK_OPTIONS_MAX_SZ 10

struct CopymasterOptionsLseek {
    int x;
    off_t pos1;
    off_t pos2;
    size_t num;
};

struct CopymasterOptions {
    const char * infile;
    const char * outfile;
    int fast;
    int slow;
    int create;
    mode_t create_mode;
    int overwrite;
    int append;
    int lseek;
    struct CopymasterOptionsLseek lseek_options;
    int directory;
    int delete_opt;
    int chmod;
    mode_t chmod_mode;
    int inode;
    ino_t inode_number;
    int umask;
    char umask_options[kUMASK_OPTIONS_MAX_SZ][4];
    int link;
    int truncate;
    off_t truncate_size;
    int sparse;
};

40
struct CopymasterOptions ParseCopymasterOptions(int argc, char *argv[]);
41
42
43
44

void FatalError(char c, const char* msg, int exit_status);

#endif /* UTIL_H */