eventscript: replace other -1 returns with -errno
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 7 Dec 2009 12:45:56 +0000 (23:15 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 7 Dec 2009 12:45:56 +0000 (23:15 +1030)
commit1269458547795c90d544371332ba1de68df29548
tree58d788ad6bf2916f67e38ea230be54bafda1e315
parentec36ced9446da7e3bf866466d265ee8e18f606c1
eventscript: replace other -1 returns with -errno

This completes our "problem with script" reporting; we never set cb_status
to -1 on error.  Real errnos are used where the failure is a system call
(eg. read, setpgid), otherwise -EIO is used if we couldn't communicate with
the parent.

The latter case is a bit useless, since the parent probably won't see
the error anyway, but it's neater.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
server/eventscript.c