Displaying 5 results from an estimated 5 matches for "b87efb9".
2018 Aug 01
0
[PATCH v2 nbdkit 4/6] common: Add a directory for common code shared by plugins and filters.
...onst size_t limit = size < 16 ? size : 16;
+
+ for (i = 0; i < limit; ++i)
+ if (buffer[i])
+ return false;
+ if (size != limit)
+ return ! memcmp (buffer, buffer + 16, size - 16);
+
+ return true;
+}
+
+#endif /* NBDKIT_ISZERO_H */
diff --git a/configure.ac b/configure.ac
index b87efb9..774f290 100644
--- a/configure.ac
+++ b/configure.ac
@@ -538,6 +538,7 @@ AC_CONFIG_FILES([podwrapper.pl],
[chmod +x,-w podwrapper.pl])
AC_CONFIG_FILES([Makefile
bash/Makefile
+ common/include/Makefile
docs/Makefile...
2018 Jul 31
0
[PATCH nbdkit 1/4] Add truncate filter for truncating or extending the size of plugins.
....mk
index 01beff5..f600293 100644
--- a/common-rules.mk
+++ b/common-rules.mk
@@ -68,7 +68,8 @@ filters = \
log \
nozero \
offset \
- partition
+ partition \
+ truncate
plugindir = $(libdir)/nbdkit/plugins
filterdir = $(libdir)/nbdkit/filters
diff --git a/configure.ac b/configure.ac
index b87efb9..e8d0a38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -578,6 +578,7 @@ AC_CONFIG_FILES([Makefile
filters/nozero/Makefile
filters/offset/Makefile
filters/partition/Makefile
+ filters/truncate/Makefile
src/Make...
2018 Aug 01
2
Re: [PATCH v2 nbdkit 4/6] common: Add a directory for common code shared by plugins and filters.
...(i = 0; i < limit; ++i)
> + if (buffer[i])
> + return false;
> + if (size != limit)
> + return ! memcmp (buffer, buffer + 16, size - 16);
> +
> + return true;
> +}
> +
> +#endif /* NBDKIT_ISZERO_H */
> diff --git a/configure.ac b/configure.ac
> index b87efb9..774f290 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -538,6 +538,7 @@ AC_CONFIG_FILES([podwrapper.pl],
> [chmod +x,-w podwrapper.pl])
> AC_CONFIG_FILES([Makefile
> bash/Makefile
> + common/include/Makefile
>...
2018 Aug 01
12
[PATCH v2 nbdkit 0/6] Add truncate filter and other fixes.
I have dropped the map filter from this series for now while I try to
get it working.
However I think the truncate filter is in a good shape. This
incorporates all feedback from Eric's review.
Also there are three small fixes to the filter code, all revealed when
I was testing using multiple filters which we'd not done much of
before.
Rich.
2018 Jul 31
7
[PATCH nbdkit 0/4] Add truncate and map filters.
This patch series proposes two new filters.
* truncate: This can truncate, extend, round up or round down the size
of a plugin/device. A typical usage is to fix the qemu problem that
it can only handle devices which are a multiple of 512-bytes:
nbdkit --filter=truncate random size=500 round-up=512
This will serve a virtual device with size 512 bytes. Reading from
the last 12 bytes will