Displaying 2 results from an estimated 2 matches for "extents_append".
2020 Apr 15
0
[PATCH nbdkit 3/9] server: Use new vector library when building the list of extents.
...extents =
- realloc (exts->extents, new_allocated * sizeof (struct nbdkit_extent));
- if (new_extents == NULL) {
- nbdkit_error ("nbdkit_add_extent: realloc: %m");
- return -1;
- }
- exts->allocated = new_allocated;
- exts->extents = new_extents;
+ if (extents_append (&exts->extents, *e) == -1) {
+ nbdkit_error ("nbdkit_add_extent: realloc: %m");
+ return -1;
}
- exts->extents[exts->nr_extents] = *e;
- exts->nr_extents++;
return 0;
}
@@ -170,7 +157,7 @@ nbdkit_add_extent (struct nbdkit_extents *exts,
return 0;...
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated!
The basic purpose of the patch series is to set $nbdkit_stdio_safe to
"0" or "1" in sh and eval plugin scripts.
To do that, I ended up adding a nicer way to manipulate environ lists,
and to do that, I ended up adding a whole generic vector
implementation which is applicable in a lot of different places.