lib: add SAFE_PWRITE() and SAFE_PREAD()

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
2 files changed