mirror of
https://github.com/lakinduakash/linux-wifi-hotspot.git
synced 2024-11-21 19:40:11 +00:00
build kill command by pid
This commit is contained in:
parent
9923bcf7bf
commit
34f5ad9234
@ -18,11 +18,13 @@
|
||||
|
||||
#define MKCONFIG "--mkconfig"
|
||||
#define LOAD_CONFIG "--config"
|
||||
#define STOP "--stop"
|
||||
|
||||
|
||||
char cmd_start[BUFSIZE];
|
||||
char cmd_mkconfig[BUFSIZE];
|
||||
char cmd_config[BUFSIZE];
|
||||
char cmd_kill[BUFSIZE];
|
||||
|
||||
char running_info[BUFSIZE];
|
||||
char interface_list[BUFSIZE];
|
||||
@ -86,6 +88,11 @@ int startShell(const char *cmd) {
|
||||
}
|
||||
|
||||
|
||||
const char* build_kill_create_ap_command(char* pid){
|
||||
snprintf(cmd_kill, BUFSIZE, "%s %s %s %s", SUDO, CREATE_AP,STOP,pid);
|
||||
return cmd_kill;
|
||||
}
|
||||
|
||||
int write_config(char* file){
|
||||
|
||||
config_t cfg;
|
||||
|
@ -21,5 +21,6 @@ static int init_get_running();
|
||||
|
||||
static int init_get_interface_list();
|
||||
char** get_interface_list(int*);
|
||||
const char* build_kill_create_ap_command(char* pid);
|
||||
|
||||
#endif //WIHOTSPOT_H_PROP_H
|
||||
|
Loading…
Reference in New Issue
Block a user