CONFIG->ENABLE migration.
This commit is contained in:
parent
0c43046fde
commit
b1c3fbc677
@ -122,7 +122,9 @@ static FILE *ftp_login(ftp_host_info_t *server)
|
|||||||
return(control_stream);
|
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,
|
static int ftp_recieve(ftp_host_info_t *server, FILE *control_stream,
|
||||||
const char *local_path, char *server_path)
|
const char *local_path, char *server_path)
|
||||||
{
|
{
|
||||||
@ -207,7 +209,9 @@ static int ftp_recieve(ftp_host_info_t *server, FILE *control_stream,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_FTPPUT
|
#if !ENABLE_FTPPUT
|
||||||
|
#define ftp_send 0
|
||||||
|
#else
|
||||||
static int ftp_send(ftp_host_info_t *server, FILE *control_stream,
|
static int ftp_send(ftp_host_info_t *server, FILE *control_stream,
|
||||||
const char *server_path, char *local_path)
|
const char *server_path, char *local_path)
|
||||||
{
|
{
|
||||||
@ -299,24 +303,12 @@ int ftpgetput_main(int argc, char **argv)
|
|||||||
int (*ftp_action)(ftp_host_info_t *, FILE *, const char *, char *) = NULL;
|
int (*ftp_action)(ftp_host_info_t *, FILE *, const char *, char *) = NULL;
|
||||||
|
|
||||||
/* Check to see if the command is ftpget or ftput */
|
/* Check to see if the command is ftpget or ftput */
|
||||||
#ifdef CONFIG_FTPPUT
|
if (ENABLE_FTPPUT && (!ENABLE_FTPGET || bb_applet_name[3] == 'p')) {
|
||||||
# ifdef CONFIG_FTPGET
|
|
||||||
if (bb_applet_name[3] == 'p') {
|
|
||||||
ftp_action = ftp_send;
|
ftp_action = ftp_send;
|
||||||
}
|
}
|
||||||
# else
|
if (ENABLE_FTPGET && (!ENABLE_FTPPUT || bb_applet_name[3] == 'g')) {
|
||||||
ftp_action = ftp_send;
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_FTPGET
|
|
||||||
# ifdef CONFIG_FTPPUT
|
|
||||||
if (bb_applet_name[3] == 'g') {
|
|
||||||
ftp_action = ftp_recieve;
|
ftp_action = ftp_recieve;
|
||||||
}
|
}
|
||||||
# else
|
|
||||||
ftp_action = ftp_recieve;
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Set default values */
|
/* Set default values */
|
||||||
server = xmalloc(sizeof(ftp_host_info_t));
|
server = xmalloc(sizeof(ftp_host_info_t));
|
||||||
|
@ -184,11 +184,11 @@ int nameif_main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
if (ch->next != NULL)
|
if (ch->next != NULL)
|
||||||
(ch->next)->prev = ch->prev;
|
(ch->next)->prev = ch->prev;
|
||||||
#ifdef CONFIG_FEATURE_CLEAN_UP
|
if (ENABLE_FEATURE_CLEAN_UP) {
|
||||||
free(ch->ifname);
|
free(ch->ifname);
|
||||||
free(ch->mac);
|
free(ch->mac);
|
||||||
free(ch);
|
free(ch);
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user