svn commit: trunk/busybox/networking
landley at busybox.net
landley at busybox.net
Thu May 4 19:52:31 UTC 2006
Author: landley
Date: 2006-05-04 12:52:28 -0700 (Thu, 04 May 2006)
New Revision: 14997
Log:
CONFIG->ENABLE migration.
Modified:
trunk/busybox/networking/ftpgetput.c
trunk/busybox/networking/nameif.c
Changeset:
Modified: trunk/busybox/networking/ftpgetput.c
===================================================================
--- trunk/busybox/networking/ftpgetput.c 2006-05-04 19:51:22 UTC (rev 14996)
+++ trunk/busybox/networking/ftpgetput.c 2006-05-04 19:52:28 UTC (rev 14997)
@@ -122,7 +122,9 @@
return(control_stream);
}
-#ifdef CONFIG_FTPGET
+#if !ENABLE_FTPGET
+#define ftp_receive 0
+#else
static int ftp_recieve(ftp_host_info_t *server, FILE *control_stream,
const char *local_path, char *server_path)
{
@@ -207,7 +209,9 @@
}
#endif
-#ifdef CONFIG_FTPPUT
+#if !ENABLE_FTPPUT
+#define ftp_send 0
+#else
static int ftp_send(ftp_host_info_t *server, FILE *control_stream,
const char *server_path, char *local_path)
{
@@ -299,24 +303,12 @@
int (*ftp_action)(ftp_host_info_t *, FILE *, const char *, char *) = NULL;
/* Check to see if the command is ftpget or ftput */
-#ifdef CONFIG_FTPPUT
-# ifdef CONFIG_FTPGET
- if (bb_applet_name[3] == 'p') {
+ if (ENABLE_FTPPUT && (!ENABLE_FTPGET || bb_applet_name[3] == 'p')) {
ftp_action = ftp_send;
}
-# else
- ftp_action = ftp_send;
-# endif
-#endif
-#ifdef CONFIG_FTPGET
-# ifdef CONFIG_FTPPUT
- if (bb_applet_name[3] == 'g') {
+ if (ENABLE_FTPGET && (!ENABLE_FTPPUT || bb_applet_name[3] == 'g')) {
ftp_action = ftp_recieve;
}
-# else
- ftp_action = ftp_recieve;
-# endif
-#endif
/* Set default values */
server = xmalloc(sizeof(ftp_host_info_t));
Modified: trunk/busybox/networking/nameif.c
===================================================================
--- trunk/busybox/networking/nameif.c 2006-05-04 19:51:22 UTC (rev 14996)
+++ trunk/busybox/networking/nameif.c 2006-05-04 19:52:28 UTC (rev 14997)
@@ -184,11 +184,11 @@
}
if (ch->next != NULL)
(ch->next)->prev = ch->prev;
-#ifdef CONFIG_FEATURE_CLEAN_UP
- free(ch->ifname);
- free(ch->mac);
- free(ch);
-#endif
+ if (ENABLE_FEATURE_CLEAN_UP) {
+ free(ch->ifname);
+ free(ch->mac);
+ free(ch);
+ }
}
return 0;
More information about the busybox-cvs
mailing list