zstream: consolidate shared code

zstream currently contains three identical copies of dump_record(),
which appear to all be drawn from libzfs_sendrecv.c. The original
is marked internal.

This PR adds zstream_util.[hc] and puts the shared code there along with
a couple of other items in common.

No functional changes.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Garth Snyder <garth@garthsnyder.com>
Closes #18284
This commit is contained in:
Garth Snyder
2026-03-05 15:33:03 -08:00
committed by GitHub
parent 5dad9459d5
commit d979457760
8 changed files with 173 additions and 119 deletions
+3 -1
View File
@@ -11,7 +11,9 @@ zstream_SOURCES = \
%D%/zstream_dump.c \
%D%/zstream_recompress.c \
%D%/zstream_redup.c \
%D%/zstream_token.c
%D%/zstream_token.c \
%D%/zstream_util.c \
%D%/zstream_util.h
zstream_LDADD = \
libzfs.la \