diff options
author | Alexander Motin <mav@FreeBSD.org> | 2019-06-03 19:09:39 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2019-06-03 19:09:39 +0000 |
commit | 1425be644a4b132c371589ffb6f83dc10b4ee59e (patch) | |
tree | 948406ef4617250e15b35fa0b082b194c85d3dcf /man | |
parent | 299ed57f93e3bb2d334f247bcfc0cc77a169a65b (diff) | |
download | src-1425be644a4b132c371589ffb6f83dc10b4ee59e.tar.gz src-1425be644a4b132c371589ffb6f83dc10b4ee59e.zip |
9466 add JSON output support to channel programs
illumos/illumos-gate@5267591016146502784860802129b16dab6f135c
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed by: Sara Hartse <sara.hartse@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Alek Pinchuk <apinchuk@datto.com>
Notes
Notes:
svn path=/vendor/illumos/dist/; revision=348568
Diffstat (limited to 'man')
-rw-r--r-- | man/man1m/zfs-program.1m | 8 | ||||
-rw-r--r-- | man/man1m/zfs.1m | 10 |
2 files changed, 15 insertions, 3 deletions
diff --git a/man/man1m/zfs-program.1m b/man/man1m/zfs-program.1m index 5fd4302fb8dc..98d9240ff8ad 100644 --- a/man/man1m/zfs-program.1m +++ b/man/man1m/zfs-program.1m @@ -9,6 +9,7 @@ .\" .\" .\" Copyright (c) 2016, 2017 by Delphix. All rights reserved. +.\" Copyright (c) 2018 Datto Inc. .\" .Dd January 21, 2016 .Dt ZFS-PROGRAM 1M @@ -18,7 +19,7 @@ .Nd executes ZFS channel programs .Sh SYNOPSIS .Cm "zfs program" -.Op Fl n +.Op Fl jn .Op Fl t Ar instruction-limit .Op Fl m Ar memory-limit .Ar pool @@ -46,6 +47,11 @@ will be run on and any attempts to access or modify other pools will cause an error. .Sh OPTIONS .Bl -tag -width "-t" +.It Fl j +Display channel program output in JSON format. +When this flag is specified and standard output is empty - +channel program encountered an error. +The details of such an error will be printed to standard error in plain text. .It Fl n Executes a read-only channel program, which runs faster. The program cannot change on-disk state by calling functions from the diff --git a/man/man1m/zfs.1m b/man/man1m/zfs.1m index 4ce0ddcad7f1..d27a3ee49f49 100644 --- a/man/man1m/zfs.1m +++ b/man/man1m/zfs.1m @@ -28,6 +28,7 @@ .\" Copyright (c) 2014 Integros [integros.com] .\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2018 Joyent, Inc. +.\" Copyright (c) 2018 Datto Inc. .\" .Dd Feb 10, 2018 .Dt ZFS 1M @@ -271,7 +272,7 @@ .Ar snapshot Ar snapshot Ns | Ns Ar filesystem .Nm .Cm program -.Op Fl n +.Op Fl jn .Op Fl t Ar timeout .Op Fl m Ar memory_limit .Ar pool script @@ -3472,7 +3473,7 @@ Display the path's inode change time as the first column of output. .It Xo .Nm .Cm program -.Op Fl n +.Op Fl jn .Op Fl t Ar timeout .Op Fl m Ar memory_limit .Ar pool script @@ -3493,6 +3494,11 @@ Channel programs may only be run with root privileges. For full documentation of the ZFS channel program interface, see the manual page for .Bl -tag -width "" +.It Fl j +Display channel program output in JSON format. +When this flag is specified and standard output is empty - +channel program encountered an error. +The details of such an error will be printed to standard error in plain text. .It Fl n Executes a read-only channel program, which runs faster. The program cannot change on-disk state by calling functions from |