X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fio%2Fio.h;h=6553e7ab29b93de5bc1bd5118f63745f81b5279b;hp=8199bda9802050f747440f66ec1da97f987fcb47;hb=7bfb7a1cf4f7c5eaf4081ef7128b7fc7d1cf926e;hpb=306b6b0e89957bc1f2faa0a9b30a8398d1f40dfc diff --git a/ccan/io/io.h b/ccan/io/io.h index 8199bda9..6553e7ab 100644 --- a/ccan/io/io.h +++ b/ccan/io/io.h @@ -38,6 +38,9 @@ struct io_plan { const char *buf; size_t *lenp; } writepart; + struct { + int saved_errno; + } close; struct { void *p; size_t len; @@ -84,7 +87,8 @@ struct io_conn *io_new_conn_(int fd, struct io_plan plan); * @arg: the argument to @finish. * * @finish will be called when an I/O operation fails, or you call - * io_close() on the connection. + * io_close() on the connection. errno will be set to the value + * after the failed I/O, or at the call to io_close(). */ #define io_set_finish(conn, finish, arg) \ io_set_finish_((conn), \