wpa_cli: Use edit API as a wrapper for optional readline
This commit is contained in:
parent
616e0e728e
commit
bdc45634f0
3 changed files with 54 additions and 46 deletions
|
@ -509,6 +509,9 @@ int edit_init(void (*cmd_cb)(void *ctx, char *cmd),
|
|||
|
||||
eloop_register_read_sock(STDIN_FILENO, edit_read_char, NULL, NULL);
|
||||
|
||||
printf("> ");
|
||||
fflush(stdout);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -68,6 +68,10 @@ int edit_init(void (*cmd_cb)(void *ctx, char *cmd),
|
|||
edit_cmd_cb = cmd_cb;
|
||||
edit_eof_cb = eof_cb;
|
||||
eloop_register_read_sock(STDIN_FILENO, edit_read_char, NULL, NULL);
|
||||
|
||||
printf("> ");
|
||||
fflush(stdout);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue