Lines Matching refs:cmdline
20 static void exec_command(char cmdline[], char recv_buff[], int len) in exec_command() argument
22 printf("[BT_DEBUG] execute: %s\n", cmdline); in exec_command()
29 if ((stream = popen(cmdline, "r")) != NULL) { in exec_command()
41 printf("[popen] error: %s\n", cmdline); in exec_command()
44 static const int console_run(const char *cmdline) in console_run() argument
48 DEBUG_INFO("cmdline = %s\n", cmdline); in console_run()
50 ret = system(cmdline); in console_run()
52 DEBUG_ERR("Running cmdline failed: %s\n", cmdline); in console_run()
62 char cmdline[256] = {0}; in create_hostapd_file() local
69 sprintf(cmdline, "interface=%s\n", ap); in create_hostapd_file()
70 fputs(cmdline, fp); in create_hostapd_file()
120 char cmdline[256] = {0}; in start_hostapd() local
125 sprintf(cmdline, "ifconfig %s up", ap); in start_hostapd()
126 console_run(cmdline); in start_hostapd()
128 sprintf(cmdline, "ifconfig %s 10.201.126.1 netmask 255.255.255.0", ap); in start_hostapd()
129 console_run(cmdline); in start_hostapd()
134 memset(cmdline, 0, sizeof(cmdline)); in start_hostapd()
135 sprintf(cmdline, "dnsmasq -C %s --interface=%s", DNSMASQ_CONF_DIR, ap); in start_hostapd()
136 console_run(cmdline); in start_hostapd()
138 memset(cmdline, 0, sizeof(cmdline)); in start_hostapd()
139 sprintf(cmdline, "hostapd %s &", HOSTAPD_CONF_DIR); in start_hostapd()
140 console_run(cmdline); in start_hostapd()