With kernel build, entry point to all tasks is main, not some xyz_main

This commit is contained in:
Gregory Nutt 2014-09-06 09:19:15 -06:00
parent 38ecd36a61
commit 9f7c9b273f
94 changed files with 392 additions and 0 deletions

View File

@ -227,7 +227,11 @@ static void parse_args(FAR struct adc_state_s *adc, int argc, FAR char **argv)
* Name: adc_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int adc_main(int argc, char *argv[])
#endif
{
struct adc_msg_s sample[CONFIG_EXAMPLES_ADC_GROUPSIZE];
size_t readsize;

View File

@ -394,7 +394,11 @@ static int button7_handler(int irq, FAR void *context)
* buttons_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int buttons_main(int argc, char *argv[])
#endif
{
uint8_t newset;
irqstate_t flags;

View File

@ -104,7 +104,11 @@
* Name: can_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int can_main(int argc, char *argv[])
#endif
{
#ifndef CONFIG_EXAMPLES_CAN_READONLY
struct can_msg_s txmsg;

View File

@ -957,7 +957,11 @@ void ShowInformation(void)
printf(" Connected to SSID: %s\n", localB);
}
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int c3b_main(int argc, char *argv[])
#endif
{
char ch='0';

View File

@ -200,7 +200,11 @@ static void shell_netinit(void)
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int shell_main(int argc, char *argv[])
#endif
{
struct telnetd_config_s config;
int ret;

View File

@ -624,7 +624,11 @@ static int configdata_cleardeleted(void)
* Name: configdata_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int configdata_main(int argc, char *argv[])
#endif
{
unsigned int i;
int ret;

View File

@ -96,7 +96,11 @@ static struct state_s
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int cpuhog_main(int argc, char *argv[])
#endif
{
int id = -1;
char buf[256];

View File

@ -89,7 +89,11 @@
* Name: dhcpd_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int dhcpd_main(int argc, char *argv[])
#endif
{
struct in_addr addr;
#if defined(CONFIG_EXAMPLES_DHCPD_NOMAC)

View File

@ -85,7 +85,11 @@
* discover_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int discover_main(int argc, char *argv[])
#endif
{
/* If this task is excecutated as an NSH built-in function, then the
* network has already been configured by NSH's start-up logic.

View File

@ -215,7 +215,11 @@ static inline void testheader(FAR const char *progname)
* Name: elf_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int elf_main(int argc, char *argv[])
#endif
{
struct binary_s bin;
int ret;

View File

@ -61,7 +61,11 @@
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int flash_test_main(int argc, char *argv[])
#endif
{
struct inode* inode;
int ret;

View File

@ -355,7 +355,11 @@ int ftpc_parse(SESSION handle, char *cmdline)
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int ftpc_main(int argc, char **argv, char **envp)
#endif
{
struct ftpc_connect_s connect = {{0}, 0};
SESSION handle;

View File

@ -221,7 +221,11 @@ int ftpd_daemon(int s_argc, char **s_argv)
* Name: ftpd_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int ftpd_main(int s_argc, char **s_argv)
#endif
{
/* Check if we have already initialized the network */

View File

@ -56,7 +56,11 @@
* hello_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int hello_main(int argc, char *argv[])
#endif
{
printf("Hello, World!!\n");
return 0;

View File

@ -276,7 +276,11 @@ static int hidkbd_waiter(int argc, char *argv[])
* Name: hidkbd_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int hidkbd_main(int argc, char *argv[])
#endif
{
char buffer[256];
pid_t pid;

View File

@ -236,7 +236,11 @@ static void parse_args(FAR struct i2schar_state_s *i2schar, int argc, FAR char *
* Name: i2schar_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int i2schar_main(int argc, char *argv[])
#endif
{
pthread_attr_t attr;
pthread_addr_t result;

View File

@ -83,7 +83,11 @@
* igmp_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int igmp_main(int argc, char *argv[])
#endif
{
struct in_addr addr;
#if defined(CONFIG_EXAMPLES_IGMP_NOMAC)

View File

@ -236,7 +236,11 @@ static void create_objects(void)
*
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int json_main(int argc, const char *argv[])
#endif
{
/* a bunch of json: */

View File

@ -193,7 +193,11 @@ static void keypad_decode(FAR char *buffer, ssize_t nbytes)
* Name: keypadtest_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int keypadtest_main(int argc, char *argv[])
#endif
{
char buffer[256];
ssize_t nbytes;

View File

@ -155,7 +155,11 @@ static inline int lcdrw_initialize(FAR struct lcdrw_instance_s *inst)
* Name: lcdrw_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int lcdrw_main(int argc, char *argv[])
#endif
{
struct lcdrw_instance_s inst;
nxgl_coord_t row;

View File

@ -281,7 +281,11 @@ static void do_frees(void **mem, const int *size, const int *seq, int n)
* Name: mm_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int mm_main(int argc, char *argv[])
#endif
{
mm_showmallinfo();

View File

@ -359,7 +359,11 @@ static void modbus_showusage(FAR const char *progname, int exitcode)
*
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int modbus_main(int argc, char *argv[])
#endif
{
int option;
int ret;

View File

@ -571,7 +571,11 @@ static void succeed_stat(const char *path)
* Name: mount_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int mount_main(int argc, char *argv[])
#endif
{
int ret;

View File

@ -148,7 +148,11 @@ extern FAR struct mtd_dev_s *mtdpart_archinitialize(void);
* Name: mtdpart_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int mtdpart_main(int argc, char *argv[])
#endif
{
FAR struct mtd_dev_s *master;
FAR struct mtd_dev_s *part[CONFIG_EXAMPLES_MTDPART_NPARTITIONS];

View File

@ -129,7 +129,11 @@ static void netpkt_usage(void)
* Name: netpkt_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int netpkt_main(int argc, char **argv)
#endif
{
int sd;
int i;

View File

@ -67,7 +67,11 @@
* nettest_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int nettest_main(int argc, char *argv[])
#endif
{
struct in_addr addr;
#ifdef CONFIG_EXAMPLES_NETTEST_NOMAC

View File

@ -260,7 +260,11 @@ void usage(void)
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int nrf24l01_term_main(int argc, char *argv[])
#endif
{
int ret;
bool quit = false;

View File

@ -116,7 +116,11 @@ const struct symtab_s CONFIG_EXECFUNCS_SYMTAB[1];
* Name: nsh_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int nsh_main(int argc, char *argv[])
#endif
{
int exitval = 0;
int ret;

View File

@ -61,7 +61,11 @@
* Name: null_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int null_main(int argc, char *argv[])
#endif
{
return 0;
}

View File

@ -617,7 +617,11 @@ static int nxeg_initialize(void)
* Name: nx_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int nx_main(int argc, char *argv[])
#endif
{
NXEGWINDOW hwnd1;
NXEGWINDOW hwnd2;

View File

@ -210,7 +210,11 @@ static int nxcon_task(int argc, char **argv)
* Name: nxcon_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int nxcon_main(int argc, char **argv)
#endif
{
nxgl_mxpixel_t color;
int fd;

View File

@ -789,7 +789,11 @@ static int nxffs_directory(void)
* Name: nxffs_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int nxffs_main(int argc, char *argv[])
#endif
{
FAR struct mtd_dev_s *mtd;
unsigned int i;

View File

@ -154,7 +154,11 @@ static inline void testheader(FAR const char *progname)
* Name: nxflat_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int nxflat_main(int argc, char *argv[])
#endif
{
struct binary_s bin;
int ret;

View File

@ -206,7 +206,11 @@ static inline int nxhello_initialize(void)
* Name: nxhello_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int nxhello_main(int argc, char *argv[])
#endif
{
nxgl_mxpixel_t color;
int ret;

View File

@ -214,7 +214,11 @@ static inline int nximage_initialize(void)
*
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int nximage_main(int argc, char *argv[])
#endif
{
nxgl_mxpixel_t color;
int ret;

View File

@ -203,7 +203,11 @@ static inline int nxlines_initialize(void)
* Name: nxlines_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int nxlines_main(int argc, char *argv[])
#endif
{
nxgl_mxpixel_t color;
int ret;

View File

@ -346,7 +346,11 @@ static int nxtext_initialize(void)
* Name: nxtext_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int nxtext_main(int argc, char **argv)
#endif
{
FAR struct nxtext_state_s *bgstate;
NXWINDOW hwnd = NULL;

View File

@ -223,7 +223,11 @@ static void show_environment(bool var1_valid, bool var2_valid, bool var3_valid)
* Name: user_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
static int user_main(int argc, char *argv[])
#endif
{
int i;
@ -506,10 +510,14 @@ static void stdio_test(void)
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
/****************************************************************************
int main(int argc, FAR char **argv)
* ostest_main
#else
****************************************************************************/
#endif
int ostest_main(int argc, FAR char *argv[])
{
int result;

View File

@ -76,7 +76,11 @@ static bool g_restarted;
* Private Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
static int restart_main(int argc, char *argv[])
#endif
{
#ifndef CONFIG_DISABLE_ENVIRON
char *actual;

View File

@ -137,7 +137,11 @@ static void wakeup_action(int signo, siginfo_t *info, void *ucontext)
}
}
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
static int waiter_main(int argc, char *argv[])
#endif
{
sigset_t sigset;
struct sigaction act;

View File

@ -67,7 +67,11 @@ static int g_waitpids[NCHILDREN];
* Priviate Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
static int waitpid_main(int argc, char *argv[])
#endif
{
pid_t me = getpid();

View File

@ -75,7 +75,11 @@
* pashello_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int pashello_main(int argc, FAR char *argv[])
#endif
{
FAR struct pexec_s *st;
int exitcode = EXIT_SUCCESS;

View File

@ -72,7 +72,11 @@
* Name: pipe_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int pipe_main(int argc, char *argv[])
#endif
{
int fd[2];
int ret;

View File

@ -77,7 +77,11 @@
* Name: poll_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int poll_main(int argc, char *argv[])
#endif
{
char buffer[64];
ssize_t nbytes;

View File

@ -222,7 +222,11 @@ static inline void testheader(FAR const char *progname)
* Name: spawn_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int spawn_main(int argc, char *argv[])
#endif
{
posix_spawn_file_actions_t file_actions;
posix_spawnattr_t attr;

View File

@ -273,7 +273,11 @@ static void parse_args(FAR struct pwm_state_s *pwm, int argc, FAR char **argv)
* Name: pwm_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int pwm_main(int argc, char *argv[])
#endif
{
struct pwm_info_s info;
int fd;

View File

@ -240,7 +240,11 @@ static void parse_args(int argc, FAR char **argv)
* Name: qe_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int qe_main(int argc, char *argv[])
#endif
{
int32_t position;
int fd;

View File

@ -76,7 +76,11 @@
* rand_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int rand_main(int argc, char *argv[])
#endif
{
uint32_t buffer[CONFIG_EXAMPLES_MAXSAMPLES];
int nsamples = CONFIG_EXAMPLES_NSAMPLES;

View File

@ -85,7 +85,11 @@
* Name: relays_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int relays_main(int argc, char *argv[])
#endif
{
char *stat = NULL;
char *no = NULL;

View File

@ -57,7 +57,11 @@
* rgmp_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int rgmp_main(int argc, char *argv[])
#endif
{
// TODO: add your code here

View File

@ -455,7 +455,11 @@ static void checkdirectories(struct node_s *entry)
* Name: romfs_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int romfs_main(int argc, char *argv[])
#endif
{
int ret;

View File

@ -106,7 +106,11 @@ static const char g_msg_body[] = CONFIG_EXAMPLES_SENDMAIL_BODY "\r\n";
* sendmail_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int sendmail_main(int argc, char *argv[])
#endif
{
struct in_addr addr;
#if defined(CONFIG_EXAMPLES_SENDMAIL_NOMAC)

View File

@ -67,7 +67,11 @@ static const char s[] = "abcdefghijklmnopqrstuvwxyz";
* serloop_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int serialblaster_main(int argc, char *argv[])
#endif
{
int ret;

View File

@ -69,7 +69,11 @@ static int count = 0;
* serloop_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int serialrx_main(int argc, char *argv[])
#endif
{
FAR char *buf = (FAR char *)malloc(CHUNK);
FAR FILE *f;

View File

@ -59,7 +59,11 @@
* serloop_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int serloop_main(int argc, char *argv[])
#endif
{
#ifdef CONFIG_EXAMPLES_SERLOOP_BUFIO
int ch;

View File

@ -246,7 +246,11 @@ static void slcd_puts(FAR struct lib_outstream_s *outstream,
* slcd_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int slcd_main(int argc, char *argv[])
#endif
{
FAR struct slcd_test_s *priv = &g_slcdtest;
FAR const char *str = g_slcdhello;

View File

@ -796,7 +796,11 @@ static int smart_directory(void)
* Name: smart_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int smart_main(int argc, char *argv[])
#endif
{
FAR struct mtd_dev_s *mtd;
unsigned int i;

View File

@ -327,7 +327,11 @@ static int smart_seek_with_write_test(char *filename)
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int smart_test_main(int argc, char *argv[])
#endif
{
int ret;

View File

@ -367,7 +367,11 @@ static int tcpecho_server(void)
* discover_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int tcpecho_main(int argc, char *argv[])
#endif
{
int ret;

View File

@ -224,7 +224,11 @@ static void telnetd_netinit(void)
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int telnetd_main(int argc, char *argv[])
#endif
{
struct telnetd_config_s config;
int ret;

View File

@ -171,7 +171,11 @@ int g_thttpdnsymbols;
* thttp_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int thttp_main(int argc, char *argv[])
#endif
{
struct in_addr addr;
#ifdef CONFIG_EXAMPLES_THTTPD_NOMAC

View File

@ -104,7 +104,11 @@
*
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int tiff_main(int argc, char *argv[])
#endif
{
struct tiff_info_s info;
uint8_t strip[3*256];

View File

@ -88,7 +88,11 @@
* Name: tc_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int tc_main(int argc, char *argv[])
#endif
{
#ifdef CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE
struct mouse_report_s sample;

View File

@ -64,7 +64,11 @@
* udp_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int udp_main(int argc, char *argv[])
#endif
{
struct in_addr addr;

View File

@ -201,7 +201,11 @@ static void dumptrace(void)
* usbserial_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int usbserial_main(int argc, char *argv[])
#endif
{
#ifndef CONFIG_EXAMPLES_USBSERIAL_INONLY
int infd;

View File

@ -184,7 +184,11 @@ static FAR void *usbterm_listener(FAR void *parameter)
*
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int usbterm_main(int argc, char *argv[])
#endif
{
pthread_attr_t attr;
int ret;

View File

@ -220,7 +220,11 @@ static void parse_args(FAR struct wdog_example_s *wdog, int argc, FAR char **arg
* Name: wdog_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int wdog_main(int argc, char *argv[])
#endif
{
struct wdog_example_s wdog;
#ifdef CONFIG_DEBUG_WATCHDOG

View File

@ -110,7 +110,11 @@
* webserver_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int webserver_main(int argc, char *argv[])
#endif
{
struct in_addr addr;
#if defined(CONFIG_EXAMPLES_WEBSERVER_DHCPC) || defined(CONFIG_EXAMPLES_WEBSERVER_NOMAC)

View File

@ -107,7 +107,11 @@ static void callback(FAR char **buffer, int offset, int datend,
* wget_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int wget_main(int argc, char *argv[])
#endif
{
struct in_addr addr;
#if defined(CONFIG_EXAMPLES_WGET_NOMAC)

View File

@ -289,7 +289,11 @@ static int wgetjson_json_parse(char *text)
* Name: wgetjson_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int wgetjson_main(int argc, char *argv[])
#endif
{
char *buffer = NULL;
int buffer_len = 512;

View File

@ -370,7 +370,11 @@ static int xmlrpc_netinit(void)
*
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int xmlrpc_main(int argc, char *argv[])
#endif
{
int listenfd, connfd, on = 1;
socklen_t clilen;

View File

@ -226,7 +226,11 @@ int save_screenshot(FAR const char *filename)
*
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int screenshot_main(int argc, char *argv[])
#endif
{
if (argc != 2)
{

View File

@ -651,7 +651,11 @@ static void occasional(ClientData client_data, struct timeval *nowP)
*
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int thttpd_main(int argc, char **argv)
#endif
{
int num_ready;
int cnum;

View File

@ -79,7 +79,11 @@ struct cdcacm_state_s g_cdcacm;
*
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int sercon_main(int argc, char *argv[])
#endif
{
int ret;
@ -118,10 +122,14 @@ int sercon_main(int argc, char *argv[])
*
* Description:
* This is a program entry point that will disconnect the CDC/ACM serial
#ifdef CONFIG_BUILD_KERNEL
* device.
int main(int argc, FAR char **argv)
*
#else
****************************************************************************/
#endif
int serdis_main(int argc, char *argv[])
{
/* First check if the USB mass storage device is already connected */

View File

@ -673,7 +673,11 @@ void board_cdcuninitialize(FAR struct usbdevclass_driver_s *classdev)
*
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int conn_main(int argc, char *argv[])
#endif
{
int ret;
@ -822,10 +826,14 @@ errout:
* device. This program is only available if CONFIG_NSH_BUILTIN_APPS
* is defined in the NuttX configuration. In that case, this program can
* be executed by entering the "msdis" command at the NSH console.
#ifdef CONFIG_BUILD_KERNEL
*
int main(int argc, FAR char **argv)
****************************************************************************/
#else
#ifdef CONFIG_NSH_BUILTIN_APPS
#endif
int disconn_main(int argc, char *argv[])
{
/* First check if the USB mass storage device is already connected */

View File

@ -58,7 +58,11 @@
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int flash_eraseall_main(int argc, char *argv[])
#endif
{
/* Argument given? */

View File

@ -97,7 +97,11 @@ static void free_getprogmeminfo(struct mallinfo * mem)
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int free_main(int argc, char **argv)
#endif
{
struct mallinfo data;
struct mallinfo prog;

View File

@ -117,7 +117,11 @@ static void show_usage(FAR const char *progname, int exitcode)
*
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int hex2bin_main(int argc, char **argv)
#endif
{
struct lib_stdinstream_s stdinstream;
struct lib_stdsostream_s stdoutstream;

View File

@ -112,7 +112,11 @@ static void show_usage(FAR const char *progname, int exitcode)
*
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int hex2mem_main(int argc, char **argv)
#endif
{
struct lib_stdinstream_s stdinstream;
struct lib_memsostream_s memoutstream;

View File

@ -351,7 +351,11 @@ static void i2c_teardown(FAR struct i2ctool_s *i2ctool)
* Name: i2c_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int i2c_main(int argc, char *argv[])
#endif
{
/* Verify settings */

View File

@ -330,7 +330,11 @@ static int install_remove(const char *scriptname)
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int install_main(int argc, char *argv[])
#endif
{
int i;
int progsize;

View File

@ -159,7 +159,11 @@ int set_phy_reg(uint16_t phy_id, uint16_t reg_num, uint16_t val)
* mdio_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int mdio_main(int argc, char *argv[])
#endif
{
int ret;
int i;

View File

@ -591,7 +591,11 @@ static int nxplayer_cmd_help(FAR struct nxplayer_s *pPlayer, char* parg)
*
**************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int nxplayer_main(int argc, char *argv[])
#endif
{
char buffer[64];
int len, x, running;

View File

@ -43,7 +43,11 @@
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int poweroff_main(int argc, char *argv[])
#endif
{
/* TODO:
* - replace this by sending general system signal to shutdown, where i.e. nsh

View File

@ -81,7 +81,11 @@ static void show_usage(FAR const char *progname, int errcode)
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int pexec_main(int argc, FAR char **argv)
#endif
{
FAR char *filename = NULL;
FAR char *endptr;

View File

@ -556,7 +556,11 @@ static void addr_in_addr(FAR struct ramtest_s *info)
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int ramtest_main(int argc, char **argv)
#endif
{
struct ramtest_s info;

View File

@ -83,7 +83,11 @@ int ramtron_start(int spino)
}
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int ramtron_main(int argc, char *argv[])
#endif
{
int spino;

View File

@ -104,7 +104,11 @@ static int sdcard_start(int slotno)
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int sdcard_main(int argc, char *argv[])
#endif
{
int slotno = 0;

View File

@ -500,7 +500,11 @@ static inline void count_cells(void)
* Private Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int sudoku_main(int argc, char **argv, char **envp)
#endif
{
int cmd;
int nchanged;

View File

@ -55,7 +55,11 @@
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int sysinfo_main(int argc, char *argv[])
#endif
{
printf("System Information:\n");
printf("\tNuttX Version:\t" CONFIG_VERSION_STRING

View File

@ -389,7 +389,11 @@ static int usbmsc_enumerate(struct usbtrace_s *trace, void *arg)
*
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int msconn_main(int argc, char *argv[])
#endif
{
FAR void *handle;
int ret;
@ -568,10 +572,14 @@ int msconn_main(int argc, char *argv[])
* device. This program is only available if CONFIG_NSH_BUILTIN_APPS
* is defined in the NuttX configuration. In that case, this program can
* be executed by entering the "msdis" command at the NSH console.
#ifdef CONFIG_BUILD_KERNEL
*
int main(int argc, FAR char **argv)
****************************************************************************/
#else
#ifdef CONFIG_NSH_BUILTIN_APPS
#endif
int msdis_main(int argc, char *argv[])
{
/* First check if the USB mass storage device is already connected */

View File

@ -3569,7 +3569,11 @@ static void vi_showusage(FAR struct vi_s *vi, FAR const char *progname,
*
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int vi_main(int argc, char **argv)
#endif
{
FAR struct vi_s *vi;
int option;

View File

@ -70,7 +70,11 @@ static void show_usage(FAR const char *progname, int errcode)
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int rz_main(int argc, FAR char **argv)
#endif
{
ZMRHANDLE handle;
FAR const char *devname = CONFIG_SYSTEM_ZMODEM_DEVNAME;

View File

@ -89,7 +89,11 @@ static void show_usage(FAR const char *progname, int errcode)
* Public Functions
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char **argv)
#else
int sz_main(int argc, FAR char **argv)
#endif
{
enum zm_xfertype_e xfrtype = XM_XFERTYPE_NORMAL;
enum zm_option_e xfroption = XM_OPTION_REPLACE;