diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2002-12-06 08:10:40 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2002-12-06 08:10:40 +0000 |
commit | 9227371b71dfdc9ad52cb952cecd04ddbde83981 (patch) | |
tree | dfcd60e0c4dad47e30db9f85d74f51e48d946cab /networking/ifupdown.c | |
parent | 83fdb317a7ceeb4b38099477dc98bd0e7437b1b0 (diff) | |
download | busybox-w32-9227371b71dfdc9ad52cb952cecd04ddbde83981.tar.gz busybox-w32-9227371b71dfdc9ad52cb952cecd04ddbde83981.tar.bz2 busybox-w32-9227371b71dfdc9ad52cb952cecd04ddbde83981.zip |
Fix bug that stoped -a working
Diffstat (limited to 'networking/ifupdown.c')
-rw-r--r-- | networking/ifupdown.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 1387033ba..450a50896 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -1405,12 +1405,14 @@ extern int ifupdown_main(int argc, char **argv) | |||
1405 | } | 1405 | } |
1406 | } | 1406 | } |
1407 | if (state_fp != NULL && !no_act) { | 1407 | if (state_fp != NULL && !no_act) { |
1408 | unsigned short j; | ||
1409 | |||
1408 | if (ftruncate(fileno(state_fp), 0) < 0) { | 1410 | if (ftruncate(fileno(state_fp), 0) < 0) { |
1409 | error_msg_and_die("failed to truncate statefile %s: %s", statefile, strerror(errno)); | 1411 | error_msg_and_die("failed to truncate statefile %s: %s", statefile, strerror(errno)); |
1410 | } | 1412 | } |
1411 | 1413 | ||
1412 | rewind(state_fp); | 1414 | rewind(state_fp); |
1413 | for (i = 0; i < n_state; i++) { | 1415 | for (j = 0; j < n_state; j++) { |
1414 | fputs(state[i], state_fp); | 1416 | fputs(state[i], state_fp); |
1415 | fputc('\n', state_fp); | 1417 | fputc('\n', state_fp); |
1416 | } | 1418 | } |