diff options
author | Martin Willi <martin@strongswan.org> | 2008-07-08 14:58:20 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2008-07-08 14:58:20 +0000 |
commit | bf44108019e4a9c04057871184db5eb54af352a9 (patch) | |
tree | c6fab24e56bb9a04351e63948e660a94cf81de6c /src/dumm/guest.h | |
parent | 02a608363393df08a3153ac779e08ab903ce27c4 (diff) | |
download | strongswan-bf44108019e4a9c04057871184db5eb54af352a9.tar.bz2 strongswan-bf44108019e4a9c04057871184db5eb54af352a9.tar.xz |
uml "exec" writes stdout/stderr back to mconsole
guest->exec() accepts a callback for output
sligtly refactored mconsole.c
Diffstat (limited to 'src/dumm/guest.h')
-rw-r--r-- | src/dumm/guest.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dumm/guest.h b/src/dumm/guest.h index c9406e11d..1109622f9 100644 --- a/src/dumm/guest.h +++ b/src/dumm/guest.h @@ -144,11 +144,14 @@ struct guest_t { /** * Execute a command in the guest. * + * @param cb callback to call for each read block + * @param data data to pass to callback * @param cmd command to execute * @param ... printf style argument list for cmd - * @return TRUE if command executed + * @return return value */ - bool (*exec)(guest_t *this, char *cmd, ...); + int (*exec)(guest_t *this, void(*cb)(void*,char*,size_t), void *data, + char *cmd, ...); /** * @brief Called whenever a SIGCHILD for the guests PID is received. |