Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144502536
D52360.1775062065.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D52360.1775062065.diff
View Options
diff --git a/sys/contrib/libnv/nvlist.c b/sys/contrib/libnv/nvlist.c
--- a/sys/contrib/libnv/nvlist.c
+++ b/sys/contrib/libnv/nvlist.c
@@ -478,7 +478,7 @@
void
nvlist_dump(const nvlist_t *nvl, int fd)
{
- const nvlist_t *tmpnvl;
+ const nvlist_t *tmpnvl, *top;
nvpair_t *nvp, *tmpnvp;
void *cookie;
int level;
@@ -487,6 +487,7 @@
if (nvlist_dump_error_check(nvl, fd, level))
return;
+ top = nvl;
nvp = nvlist_first_nvpair(nvl);
while (nvp != NULL) {
dprintf(fd, "%*s%s (%s):", level * 4, "", nvpair_name(nvp),
@@ -645,6 +646,8 @@
while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) {
do {
+ if (nvl == top)
+ return;
cookie = NULL;
if (nvlist_in_array(nvl))
dprintf(fd, "%*s,\n", level * 4, "");
@@ -847,7 +850,7 @@
{
unsigned char *buf, *ptr;
size_t left, size;
- const nvlist_t *tmpnvl;
+ const nvlist_t *tmpnvl, *top;
nvpair_t *nvp, *tmpnvp;
void *cookie;
@@ -868,6 +871,7 @@
ptr = nvlist_pack_header(nvl, ptr, &left);
+ top = nvl;
nvp = nvlist_first_nvpair(nvl);
while (nvp != NULL) {
NVPAIR_ASSERT(nvp);
@@ -958,6 +962,8 @@
goto fail;
while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) {
do {
+ if (nvl == top)
+ goto out;
cookie = NULL;
if (nvlist_in_array(nvl)) {
ptr = nvpair_pack_nvlist_array_next(ptr,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 1, 4:47 PM (3 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28239241
Default Alt Text
D52360.1775062065.diff (1 KB)
Attached To
Mode
D52360: libnv: Fix handling of nvlist_dump() and nvlist_send() for child nvlists
Attached
Detach File
Event Timeline
Log In to Comment