wpa_cli: Use edit API as a wrapper for optional readline

This commit is contained in:
Jouni Malinen 2010-11-14 21:19:35 +02:00
parent 616e0e728e
commit bdc45634f0
3 changed files with 54 additions and 46 deletions

View file

@ -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;
}

View file

@ -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;
}