Skip to content

Commit

Permalink
zstreamdump: replace with link to zstream
Browse files Browse the repository at this point in the history
zstreamdump(8) was in quite a bad state,
and the wrapper didn't work if invoked without /sbin in $PATH

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#12015
  • Loading branch information
nabijaczleweli authored and behlendorf committed May 21, 2021
1 parent 93ef500 commit dd00925
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 65 deletions.
2 changes: 1 addition & 1 deletion cmd/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SUBDIRS = zfs zpool zdb zhack zinject zstream zstreamdump ztest
SUBDIRS = zfs zpool zdb zhack zinject zstream ztest
SUBDIRS += fsck_zfs vdev_id raidz_test zfs_ids_to_path
SUBDIRS += zpool_influxdb

Expand Down
3 changes: 3 additions & 0 deletions cmd/zstream/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ zstream_LDADD = \
$(abs_top_builddir)/lib/libnvpair/libnvpair.la

include $(top_srcdir)/config/CppCheck.am

install-exec-hook:
$(LN_S) zstream $(DESTDIR)$(sbindir)/zstreamdump
5 changes: 5 additions & 0 deletions cmd/zstream/zstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ zstream_usage(void)
int
main(int argc, char *argv[])
{
char *basename = strrchr(argv[0], '/');
basename = basename ? (basename + 1) : argv[0];
if (argc >= 1 && strcmp(basename, "zstreamdump") == 0)
return (zstream_do_dump(argc, argv));

if (argc < 2)
zstream_usage();

Expand Down
1 change: 0 additions & 1 deletion cmd/zstreamdump/Makefile.am

This file was deleted.

3 changes: 0 additions & 3 deletions cmd/zstreamdump/zstreamdump

This file was deleted.

2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ AC_CONFIG_HEADERS([zfs_config.h], [
LT_INIT
AC_PROG_INSTALL
AC_PROG_CC
AC_PROG_LN_S
PKG_PROG_PKG_CONFIG
AM_PROG_AS
AM_PROG_CC_C_O
Expand Down Expand Up @@ -83,7 +84,6 @@ AC_CONFIG_FILES([
cmd/zinject/Makefile
cmd/zpool/Makefile
cmd/zstream/Makefile
cmd/zstreamdump/Makefile
cmd/ztest/Makefile
cmd/zvol_id/Makefile
cmd/zvol_wait/Makefile
Expand Down
8 changes: 7 additions & 1 deletion man/man8/zstream.8
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
.\"
.\"
.\" Copyright (c) 2020 by Delphix. All rights reserved.
.Dd March 25, 2020
.Dd May 8, 2021
.Dt ZSTREAM 8
.Os
.Sh NAME
Expand Down Expand Up @@ -67,6 +67,12 @@ Print metadata for each record.
Dump data contained in each record.
Implies verbose.
.El
.Pp
The
.Nm zstreamdump
alias is provided for compatibility and is equivalent to running
.Nm
.Cm dump .
.It Xo
.Nm
.Cm token
Expand Down
58 changes: 0 additions & 58 deletions man/man8/zstreamdump.8

This file was deleted.

1 change: 1 addition & 0 deletions man/man8/zstreamdump.8

0 comments on commit dd00925

Please sign in to comment.