From 76aabf2c240c67ede7734f544be94f64da2c55c5 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 6 Dec 2015 08:28:32 -0500 Subject: API redesign 6/10: pe_common_ctx: protect i/o members against direct modification. --- include/perk/perk.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'include/perk/perk.h') diff --git a/include/perk/perk.h b/include/perk/perk.h index 0b84349..459fffb 100644 --- a/include/perk/perk.h +++ b/include/perk/perk.h @@ -100,7 +100,10 @@ struct pe_server_ctx { const char ** attrs; }; -struct pe_common_ctx { +struct pe_io_ctx { + int status; + int prot; + int mode; int fdin; int fdout; int fderr; @@ -108,11 +111,9 @@ struct pe_common_ctx { int fdsrc; int fddst; int fdtmp; - int prot; - int mode; - int status; - ssize_t ioread; - ssize_t iowrite; +}; + +struct pe_common_ctx { uint64_t drvflags; uint64_t actflags; uint64_t fmtflags; @@ -125,6 +126,7 @@ struct pe_common_ctx { const struct pe_output_ctx * outctx; const struct pe_linker_ctx * lnkctx; const struct pe_server_ctx * srvctx; + const struct pe_io_ctx * ioctx; }; struct pe_driver_ctx { -- cgit v1.2.3