[BusyBox-cvs] busybox/networking ifupdown.c,1.14,1.15
Glenn McGrath
bug1 at busybox.net
Sun Dec 8 01:23:42 UTC 2002
- Previous message: [BusyBox-cvs] busybox/archival ar.c,1.42,1.43 cpio.c,1.9,1.10 dpkg.c,1.69,1.70 dpkg_deb.c,1.28,1.29 tar.c,1.167,1.168 unzip.c,1.3,1.4
- Next message: [BusyBox-cvs] busybox/libpwdgrp pwent.c,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/busybox/networking
In directory winder:/tmp/cvs-serv20729/networking
Modified Files:
ifupdown.c
Log Message:
Start to cleanup handling of the state file, save some space and uses linked lists.
Index: ifupdown.c
===================================================================
RCS file: /var/cvs/busybox/networking/ifupdown.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- ifupdown.c 7 Dec 2002 07:45:42 -0000 1.14
+++ ifupdown.c 8 Dec 2002 01:23:39 -0000 1.15
@@ -1,12 +1,14 @@
/*
* ifupdown for busybox
- * Based on ifupdown by Anthony Towns
+ * Copyright (c) 2002 Glenn McGrath <bug1 at optushome.com.au>
+ *
+ * Based on ifupdown v 0.6.4 by Anthony Towns
* Copyright (c) 1999 Anthony Towns <aj at azure.humbug.org.au>
*
* Changes to upstream version
- * Remove checks for kernel version, assume kernel version 2.2.0 or better
+ * Remove checks for kernel version, assume kernel version 2.2.0 or better.
[...339 lines suppressed...]
- rewind(state_fp);
- for (j = 0; j < n_state; j++) {
- fputs(state[i], state_fp);
+ rewind(state_fp);
+
+ while (state_list) {
+ if (state_list->data) {
+ fputs(state_list->data, state_fp);
fputc('\n', state_fp);
}
- fflush(state_fp);
+ state_list = state_list->link;
}
+ fflush(state_fp);
}
+ /* Cleanup */
if (state_fp != NULL) {
fclose(state_fp);
state_fp = NULL;
- Previous message: [BusyBox-cvs] busybox/archival ar.c,1.42,1.43 cpio.c,1.9,1.10 dpkg.c,1.69,1.70 dpkg_deb.c,1.28,1.29 tar.c,1.167,1.168 unzip.c,1.3,1.4
- Next message: [BusyBox-cvs] busybox/libpwdgrp pwent.c,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the busybox-cvs
mailing list