Skip to content

Commit dd00925

Browse files
nabijaczlewelibehlendorf
authored andcommitted
zstreamdump: replace with link to zstream
zstreamdump(8) was in quite a bad state, and the wrapper didn't work if invoked without /sbin in $PATH Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12015
1 parent 93ef500 commit dd00925

File tree

8 files changed

+18
-65
lines changed

8 files changed

+18
-65
lines changed

cmd/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SUBDIRS = zfs zpool zdb zhack zinject zstream zstreamdump ztest
1+
SUBDIRS = zfs zpool zdb zhack zinject zstream ztest
22
SUBDIRS += fsck_zfs vdev_id raidz_test zfs_ids_to_path
33
SUBDIRS += zpool_influxdb
44

cmd/zstream/Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ zstream_LDADD = \
1515
$(abs_top_builddir)/lib/libnvpair/libnvpair.la
1616

1717
include $(top_srcdir)/config/CppCheck.am
18+
19+
install-exec-hook:
20+
$(LN_S) zstream $(DESTDIR)$(sbindir)/zstreamdump

cmd/zstream/zstream.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ zstream_usage(void)
4949
int
5050
main(int argc, char *argv[])
5151
{
52+
char *basename = strrchr(argv[0], '/');
53+
basename = basename ? (basename + 1) : argv[0];
54+
if (argc >= 1 && strcmp(basename, "zstreamdump") == 0)
55+
return (zstream_do_dump(argc, argv));
56+
5257
if (argc < 2)
5358
zstream_usage();
5459

cmd/zstreamdump/Makefile.am

Lines changed: 0 additions & 1 deletion
This file was deleted.

cmd/zstreamdump/zstreamdump

Lines changed: 0 additions & 3 deletions
This file was deleted.

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ AC_CONFIG_HEADERS([zfs_config.h], [
4848
LT_INIT
4949
AC_PROG_INSTALL
5050
AC_PROG_CC
51+
AC_PROG_LN_S
5152
PKG_PROG_PKG_CONFIG
5253
AM_PROG_AS
5354
AM_PROG_CC_C_O
@@ -83,7 +84,6 @@ AC_CONFIG_FILES([
8384
cmd/zinject/Makefile
8485
cmd/zpool/Makefile
8586
cmd/zstream/Makefile
86-
cmd/zstreamdump/Makefile
8787
cmd/ztest/Makefile
8888
cmd/zvol_id/Makefile
8989
cmd/zvol_wait/Makefile

man/man8/zstream.8

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
.\"
2121
.\"
2222
.\" Copyright (c) 2020 by Delphix. All rights reserved.
23-
.Dd March 25, 2020
23+
.Dd May 8, 2021
2424
.Dt ZSTREAM 8
2525
.Os
2626
.Sh NAME
@@ -67,6 +67,12 @@ Print metadata for each record.
6767
Dump data contained in each record.
6868
Implies verbose.
6969
.El
70+
.Pp
71+
The
72+
.Nm zstreamdump
73+
alias is provided for compatibility and is equivalent to running
74+
.Nm
75+
.Cm dump .
7076
.It Xo
7177
.Nm
7278
.Cm token

man/man8/zstreamdump.8

Lines changed: 0 additions & 58 deletions
This file was deleted.

man/man8/zstreamdump.8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
zstream.8

0 commit comments

Comments
 (0)