#
336346 |
|
16-Jul-2018 |
kevans |
MFC r304910, r304912, r304915, r304952, r325019, r328164, r331094, r332664, r335341-r335345, r335347, r335379-r335380, r335382
r304910: Introduce cnv man page.
r304912: Add missed header file for cnv.h .
r304915: Bump date in the man page.
r304952: Remove duplicated declaration.
r325019: Introduce cnvlist_name() and cnvlist_type() functions.
Those function can be used when we are iterating over nvlist to reduce amount of extra variables we need to declare.
r328164: libnv: Use mallocarray(9) for the nv_calloc.
r331094: Fix formatting errors that resulted in apropos(1) output looking weird.
r332664: Add missing argument in the cnv man page.
r335341: libnv: change name of cookie from cookiep to cookie.
The name was inconsistent with rest of the library. No functional change intended.
r335342: libnv: add const to cookies arguments
r335343: libnv: Remove nvlist argument from cnvlist_{take,free}_* functions.
All information which are need for those operations is already stored in the cookie.
We decided not to bump libnv version because this API is not used yet in the base system.
r335344: libnv: clean parent in nvlist_array when removing it.
When we are removing element form the nvlist we should also clean parent, because the array is not a part of the nvlist anymore.
r335345: libnv: add regression test for r335344.
r335347: libnv: Add nvlist_append_*_array() family of functions.
The nvlist_append_{bool,number,string,nvlist,descriptor}_array() functions allows to dynamically extend array stored in the nvlist.
r335379: Set prev to NULL so its garaunteed to have a value of some kind and gcc doesn't explode. Feel free to fix this correctly or whatever for gcc builds.
This *should* quiesce tinderbox after r335347 for the gcc builds.
r335380: style(9) fix, I was also going to silence gcc.
r335382: Really fix the style.
|
#
293130 |
|
04-Jan-2016 |
ngie |
Rename nitems and string variables to avoid collisions
Rename the `nitems` variable to `num_items` to avoid collisions with the macro in sys/param.h for counting elements in an array
Similarly, rename `string` to `string_arr` to avoid future collisions with potential keywords, as well as make it clear that `string_arr` isn't a char* value, but instead a char** value.
Differential Revision: https://reviews.freebsd.org/D4769 (part of larger diff) MFC after: 5 days Reviewed by: oshogbo Sponsored by: EMC / Isilon Storage Division
|
#
286796 |
|
15-Aug-2015 |
oshogbo |
Add support for the arrays in nvlist library.
- Add nvlist_{add,get,take,move,exists,free}_{number,bool,string,nvlist, descriptor} functions. - Add support for (un)packing arrays. - Add the nvl_array_next field to the nvlist structure. If an array is added by the nvlist_{move,add}_nvlist_array function this field will contains next element in the array. - Add the nitems field to the nvpair and nvpair_header structure. This field contains number of elements in the array. - Add special flag (NV_FLAG_IN_ARRAY) which is set if nvlist is a part of an array. - Add special type (NV_TYPE_NVLIST_ARRAY_NEXT).This type is used only on packing/unpacking. - Add new API for traversing arrays (nvlist_get_array_next). - Add the nvlist_get_pararr function which combines the nvlist_get_array_next and nvlist_get_parent functions. If nvlist is in the array it will return next element from array. If nvlist is last element in array or it isn't in array it will return his container (parent). This function should simplify traveling over nvlist. - Add tests for new features. - Add documentation for new functions. - Add my copyright. - Regenerate the sys/cddl/compat/opensolaris/sys/nvpair.h file.
PR: 191083 Reviewed by: allanjude (doc) Approved by: pjd (mentor)
|