-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathoptions.h
175 lines (167 loc) · 3.85 KB
/
options.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
/*
* %ISC_START_LICENSE%
* ---------------------------------------------------------------------
* Copyright 2014-2016, Google, LLC
* Copyright 2014-2015, Pittsburgh Supercomputing Center
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
* --------------------------------------------------------------------
* %END_LICENSE%
*/
#ifndef _OPTIONS_H_
#define _OPTIONS_H_
enum {
OPT_ADDRESS = 'z' + 1,
OPT_BWLIMIT,
OPT_CHMOD,
OPT_COMPARE_DEST,
OPT_COMPRESS_LEVEL,
OPT_COPY_DEST,
OPT_EXCLUDE,
OPT_EXCLUDE_FROM,
OPT_FILES_FROM,
OPT_INCLUDE,
OPT_INCLUDE_FROM,
OPT_LINK_DEST,
OPT_LOG_FILE,
OPT_LOG_FILE_FORMAT,
OPT_MAX_DELETE,
OPT_MAX_SIZE,
OPT_MIN_SIZE,
OPT_MODIFY_WINDOW,
OPT_ONLY_WRITE_BATCH,
OPT_OUT_FORMAT,
OPT_PARTIAL_DIR,
OPT_PASSWORD_FILE,
OPT_PORT,
OPT_PSYNC_PATH,
OPT_READ_BATCH,
OPT_SOCKOPTS,
OPT_SUFFIX,
OPT_TIMEOUT,
OPT_WRITE_BATCH,
/* psync specific options */
OPT_DSTDIR,
OPT_HEAD,
OPT_OFFSET_LOG_FILE,
OPT_PUPPET
};
struct options {
const char *address;
uint64_t block_size;
const char *chmod;
const char *compare_dest;
const char *copy_dest;
const char *link_dest;
const char *log_file;
const char *log_file_format;
int max_delete;
uint64_t max_size;
uint64_t min_size;
int modify_window;
const char *offset_log_file;
FILE *offset_log_fp;
const char *out_format;
const char *partial_dir;
const char *password_file;
const char *psync_path;
const char *read_batch;
const char *rsh;
const char *sockopts;
const char *suffix;
const char *temp_dir;
const char *write_batch;
int _8_bit_output;
int append;
int backup;
int blocking_io;
uint64_t bwlimit;
int cache;
int checksum;
int compress;
int compress_level;
int copy_dirlinks;
int copy_links;
int copy_unsafe_links;
int cvs_exclude;
int del;
int delay_updates;
int delete_;
int delete_after;
int delete_before;
int delete_during;
int delete_excluded;
int devices;
int dirs;
int dry_run;
struct psc_dynarray exclude;
struct psc_dynarray files;
struct psc_dynarray filter;
struct psc_dynarray include;
int executability;
int existing;
int extended_attributes;
int force;
int from0;
int fuzzy;
int group;
int hard_links;
int human_readable;
int ignore_errors;
int ignore_existing;
int ignore_times;
int inplace;
int ipv4;
int ipv6;
int itemize_changes;
int keep_dirlinks;
int links;
int list_only;
int no_implied_dirs;
int numeric_ids;
int omit_dir_times;
int one_file_system;
int owner;
int partial;
int perms;
int port;
int progress;
int prune_empty_dirs;
int quiet;
int recursive;
int relative;
int remove_source_file;
int remove_source_files;
int safe_links;
int size_only;
int sparse;
int specials;
int stats;
int super;
int timeout; /* in seconds */
int times;
int update;
int verbose;
int whole_file;
/* psync specific options */
int puppet;
int streams;
int head;
const char *dstdir;
};
void parseopts(int, char **);
extern struct options opts;
#endif /* _OPTIONS_H_ */