diff options
author | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2015-05-02 17:45:52 +0000 |
---|---|---|
committer | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2015-05-02 17:45:52 +0000 |
commit | bd1da0a002e9a43cfb5220835c7a42804d90dc56 (patch) | |
tree | a69b34916c7078793947216a35639f78cd60366e /sys/sys/nv.h | |
parent | 1025d8e679437d2c79aafbdf418c3126a1c2f29e (diff) | |
download | src-bd1da0a002e9a43cfb5220835c7a42804d90dc56.tar.gz src-bd1da0a002e9a43cfb5220835c7a42804d90dc56.zip |
Approved, oprócz użycie RESTORE_ERRNO() do ustawiania errno.
Change the nvlist_recv() function to take additional argument that
specifies flags expected on the received nvlist. Receiving a nvlist with
different set of flags than the ones we expect might lead to undefined
behaviour, which might be potentially dangerous.
Update consumers of this and related functions and update the tests.
Approved by: pjd (mentor)
Update man page for nvlist_unpack, nvlist_recv, nvlist_xfer, cap_recv_nvlist
and cap_xfer_nvlist.
Reviewed by: AllanJude
Approved by: pjd (mentor)
Notes
Notes:
svn path=/head/; revision=282346
Diffstat (limited to 'sys/sys/nv.h')
-rw-r--r-- | sys/sys/nv.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/nv.h b/sys/sys/nv.h index 5c342dced820..4a339ecbfa49 100644 --- a/sys/sys/nv.h +++ b/sys/sys/nv.h @@ -87,11 +87,11 @@ void nvlist_fdump(const nvlist_t *nvl, FILE *fp); size_t nvlist_size(const nvlist_t *nvl); void *nvlist_pack(const nvlist_t *nvl, size_t *sizep); -nvlist_t *nvlist_unpack(const void *buf, size_t size); +nvlist_t *nvlist_unpack(const void *buf, size_t size, int flags); int nvlist_send(int sock, const nvlist_t *nvl); -nvlist_t *nvlist_recv(int sock); -nvlist_t *nvlist_xfer(int sock, nvlist_t *nvl); +nvlist_t *nvlist_recv(int sock, int flags); +nvlist_t *nvlist_xfer(int sock, nvlist_t *nvl, int flags); const char *nvlist_next(const nvlist_t *nvl, int *typep, void **cookiep); |