mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-24 17:06:25 -05:00
Address some portability issues
This commit is contained in:
parent
d25b55d393
commit
496971e9c9
18 changed files with 248 additions and 247 deletions
11
snapraid.c
11
snapraid.c
|
|
@ -79,8 +79,11 @@ int main(int argc, char* argv[])
|
|||
const char* conf;
|
||||
struct snapraid_state state;
|
||||
int operation;
|
||||
pos_t blockstart;
|
||||
block_off_t blockstart;
|
||||
|
||||
/* intercept Ctrl+C */
|
||||
signal(SIGINT, &signal_handler);
|
||||
|
||||
/* defaults */
|
||||
conf = "/etc/" PACKAGE ".conf";
|
||||
verbose = 0;
|
||||
|
|
@ -139,12 +142,6 @@ int main(int argc, char* argv[])
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
struct sigaction sig;
|
||||
sig.sa_handler = signal_handler;
|
||||
sigemptyset(&sig.sa_mask);
|
||||
sig.sa_flags = 0;
|
||||
sigaction(SIGINT, &sig, 0);
|
||||
|
||||
state_init(&state);
|
||||
|
||||
state_config(&state, conf, verbose, force);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue