Commit graph

123 commits

Author SHA1 Message Date
Pawel Jakub Dawidek 19a5e7fede Document the new nvlist_get_parent() function.
Submitted by:	Mariusz Zaborski
2014-09-25 10:59:01 +00:00
Pawel Jakub Dawidek d3c24fcffe Don't use nvl in case of a failure.
Reported by:	Coverity
CID:		1238922
2014-09-18 22:34:52 +00:00
Pawel Jakub Dawidek 4c2f60df45 Use non-recursive algorithm for traversing nvlists. This also removes
the limit on number of nested nvlists.

Submitted by:	Mariusz Zaborski
2014-09-14 09:30:09 +00:00
Pawel Jakub Dawidek 586c5854a5 Remove the limit on descriptors that can be send in one nvlist.
Submitted by:	Mariusz Zaborski
2014-09-14 09:27:12 +00:00
Enji Cooper 1f771f4603 Include src.opts.mk after SHLIBDIR has been defined so libnv is installed to
/lib , not /usr/lib

MFC after: 3 days
Approved by: rpaulo (mentor)
Submitted by: antoine
Pointyhat to: me
Phabric: D739
2014-09-07 22:56:57 +00:00
Pawel Jakub Dawidek 51d915e0d1 Use better type for i. 2014-09-03 15:08:33 +00:00
Pawel Jakub Dawidek 04cbbf596c Declare i.
Reported by:	sbruno
2014-09-03 15:06:47 +00:00
Pawel Jakub Dawidek c7bf0f5006 Fix descriptors leak in case of nvlist_xunpack() failure.
Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
2014-09-03 14:44:23 +00:00
Simon J. Gerraty ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Enji Cooper b236bcf168 Integrate lib/libnv into the build/kyua
Rename all of the TAP test applications from <test> to <test>_test
to match the convention described in the TestSuite wiki page

Phabric: D538
Approved by: jmmv (mentor)
Sponsored by: EMC / Isilon Storage Division
2014-08-05 18:41:27 +00:00
Baptiste Daroussin 2b7af31cf5 use .Mt to mark up email addresses consistently (part3)
PR:		191174
Submitted by:	Franco Fichtner  <franco at lastsummer.de>
2014-06-23 08:23:05 +00:00
Ryan Stone 888fc9f245 Correct a typo.
MFC after:	1 week
2014-05-17 20:39:39 +00:00
Simon J. Gerraty fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty 76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty b736a4db5b New/updated dependencies 2014-05-05 18:31:00 +00:00
Jilles Tjoelker 1c6e90b0f8 libnv: Don't lose big-endian flag when receiving a message.
A bug caused the "big endian" flag to be lost when receiving a message. As a
result, the bits are interpreted as little endian and an extremely large
allocation is attempted.

This change fixes ping(8)'s communication to casperd(8) on big-endian
architectures.

Reported by:	Anton Shterenlikht
Tested by:	danfe
2014-04-01 21:30:54 +00:00
Bryan Drewery 97d1a20dfb nv(3) was not in 10.0.
It might be MFC'd to stable/10 for 10.1, but for now update the manual to
avoid confusion on its availability.

Discussed with:	pjd
2014-03-21 15:30:31 +00:00
Pawel Jakub Dawidek 3d34ecea9a Assert input arguments to buf_send() and buf_recv().
Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
2014-02-02 19:06:00 +00:00
Pawel Jakub Dawidek 7f7fe890a5 Fix sending empty nvlist.
Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
2014-02-02 19:03:52 +00:00
Pawel Jakub Dawidek 3ae9762b9a MFp4 @1189711:
Fix resource leaks on nvlist_destroy().

Reported by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
MFC after:	3 days
2014-01-03 09:07:03 +00:00
Pawel Jakub Dawidek 518eeaeeca MFp4 @1189139:
Get rid of the msg_peek() function, which has a problem.  If there was less
data in the socket buffer than requested by the caller, the function would busy
loop, as select(2) will always return immediately.

We can just receive nvlhdr now, because some time ago we splitted receive of
data from the receive of descriptors.

MFC after:	1 week
2013-12-15 22:58:09 +00:00
Pawel Jakub Dawidek a9554102f9 Fix double free().
Reported by:	Coverity
Coverity CID:	1130048
2013-11-25 20:45:30 +00:00
Pawel Jakub Dawidek 36da5199bb Bring in libnv library for managing name/value pairs. The following types
are currently supported:

- NV_TYPE_NULL - only name, no data;
- NV_TYPE_BOOL - boolean (true or false);
- NV_TYPE_NUMBER - 64bit unsigned integer;
- NV_TYPE_STRING - C string;
- NV_TYPE_NVLIST - nested nvlist;
- NV_TYPE_DESCRIPTOR - file descriptor;
- NV_TYPE_BINARY - binary data.

For detailed documentation and examples see nv(3) manual page.

Sponsored by:	The FreeBSD Foundation
2013-11-12 19:39:14 +00:00