| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Approved by: pjd (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
| |
multiple values using the same key in a nvlist.
Approved by: pjd (mentor)
Obtained from: WHEEL Systems (http://www.wheelsystems.com)
Update man page.
Reviewed by: AllanJude
Approved by: pjd (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
Approved by: pjd (mentor)
|
|
|
|
| |
Approved by: pjd (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Those functions are problematic, because there is no way to report
memory allocation problems without complicating the API, so we can
either abort or potentially return invalid results. None of which is
acceptable.
In most cases the caller knows the size of the name, so he can allocate
buffer on the stack and use snprintf(3) to prepare the name.
After some discussion the conclusion is to removed those functions,
which also simplifies the API.
Discussed with: pjd, rstone
Approved by: pjd (mentor)
|
|
|
|
| |
Approved by: pjd (mentor)
|
|
|
|
|
|
|
| |
casts for NULL to invocations of the ATF_REQUIER_EQ() macro.
Reviewed by: rstone, jmmv
Differential Revision: https://reviews.freebsd.org/D2027
|
|
|
|
|
|
|
|
|
| |
nv_tests.cc managed to get two copies of several functions due to me
applying a patch in an unclean working tree. My kingdom for an
"svn clean" command.
MFC after: 1 month
X-MFC-With: r279424
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D1883
Reviewed by: jfv
MFC after: 1 month
Sponsored by: Sandvine Inc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make it possible to compile libnv in the kernel. Mostly this
involves wrapping functions that have a different signature in
the kernel and in userland (e.g. malloc()) in a macro that will
conditionally expand to the right API depending on whether the
code is being compiled for the kernel or not.
I have also #ifdef'ed out all of file descriptor-handling code,
as well as the unsafe varargs functions.
Differential Revision: https://reviews.freebsd.org/D1882
Reviewed by: jfv
MFC after: 1 month
Sponsored by: Sandvine Inc
|
|
|
|
|
|
|
|
|
|
|
| |
If an nvlist is set as a child of another nvlist with
nvlist_move_nvlist then fail the operation and set the parent
nvlist to the error state.
Differential Revision: https://reviews.freebsd.org/D1880
Reviewers: jfv
MFC after: 1 month
Sponsored by: Sandvine Inc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Almost every operation performed on an nvlist was allocating a
new string to hold the key name. The nvlist_exists* family of
functions would always return false if they failed to allocate
the string. The rest of the functions would outright abort().
Fix the non-varargs variants of the functions to perform the
requested operations directly and the varargs versions to
allocate the string and call into the non-varargs versions.
The varargs versions are still broken and really can't be fixed,
so we might consider axing them entirely. However, now the non-
varargs functions are always safe to call.
Differential Revision: https://reviews.freebsd.org/D1879
Reviewed by: pjd, jfv
MFC after: 1 month
Sponsored by: Sandvine Inc.
|
|
|
|
|
|
|
|
|
|
|
| |
Add an nvlist_set_error() function that can be used to force an
nvlist into the error state. This is useful both for writing
tests and for writing APIs that use nvlists internally.
Differential Revision: https://reviews.freebsd.org/D1878
Reviewed by: pjd, jfv
MFC After: 1 month
Sponsored by: Sandvine Inc.
|
|
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D1888
MFC After: 1 month
Sponsored by: Sandvine Inc.
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D1876
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D1875
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D1874
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D1873
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D1872
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D1871
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D1870
Reviewed by: pjd, jfv
MFC after: 1 month
Sponsored by: Sandvine Inc
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D1869
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
|
|
|
|
|
|
| |
new files properly.
Pointy hat to: rstone
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D1869
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D1868
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
|
|
|
|
| |
Reported by: bz
|
|
|
|
| |
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
|
|
|
|
| |
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
|
|
|
|
|
|
|
| |
This allow for non-recursive iteration over nested nvlists, as in documented
example.
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
|
|
|
|
|
|
|
|
| |
descriptor or free the memory before returning.
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
While here, protect errno, so it won't be overwritted by close(2) or free(3).
|
|
|
|
| |
While here reduce a bit overlinking
|
| |
|
|
|
|
|
|
|
| |
returning from handling a nested nvlist we were resetting big-endian flag.
Reported by: Kuleshov Aleksey @ yandex.ru
Tested by: Kuleshov Aleksey @ yandex.ru
|
|
|
|
| |
Submitted by: Mariusz Zaborski
|
|
|
|
|
| |
Reported by: Coverity
CID: 1238922
|
|
|
|
|
|
| |
the limit on number of nested nvlists.
Submitted by: Mariusz Zaborski
|
|
|
|
| |
Submitted by: Mariusz Zaborski
|
|
|
|
|
|
|
|
|
|
| |
/lib , not /usr/lib
MFC after: 3 days
Approved by: rpaulo (mentor)
Submitted by: antoine
Pointyhat to: me
Phabric: D739
|
| |
|
|
|
|
| |
Reported by: sbruno
|
|
|
|
| |
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
PR: 191174
Submitted by: Franco Fichtner <franco at lastsummer.de>
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
|
|
|
|
| |
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
|
|
|
|
|
|
|
| |
Fix resource leaks on nvlist_destroy().
Reported by: Mariusz Zaborski <oshogbo@FreeBSD.org>
MFC after: 3 days
|