mirror of
https://github.com/sheumann/hush.git
synced 2024-12-27 16:31:24 +00:00
Fix bug that stoped -a working
This commit is contained in:
parent
83fdb317a7
commit
9227371b71
@ -1405,12 +1405,14 @@ extern int ifupdown_main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
if (state_fp != NULL && !no_act) {
|
||||
unsigned short j;
|
||||
|
||||
if (ftruncate(fileno(state_fp), 0) < 0) {
|
||||
error_msg_and_die("failed to truncate statefile %s: %s", statefile, strerror(errno));
|
||||
}
|
||||
|
||||
rewind(state_fp);
|
||||
for (i = 0; i < n_state; i++) {
|
||||
for (j = 0; j < n_state; j++) {
|
||||
fputs(state[i], state_fp);
|
||||
fputc('\n', state_fp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user