]> git.proxmox.com Git - mirror_zfs.git/commitdiff
arcstat: fix -p option
authorr-ricci <ricci@disroot.org>
Fri, 12 Aug 2022 21:21:52 +0000 (22:21 +0100)
committerGitHub <noreply@github.com>
Fri, 12 Aug 2022 21:21:52 +0000 (14:21 -0700)
When the -p option is used, a list of floats is passed to sep.join(),
which expects strings. Fix this by converting each value to a string.

Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Roberto Ricci <ricci@disroot.org>
Closes #12916
Closes #13767

cmd/arcstat.in

index b1b6655f7f26fdca5a2682e7f5a78b91b74ad17e..628a6bcef77296eb5ca5d1a8bd624e931ca354a5 100755 (executable)
@@ -271,7 +271,7 @@ def print_values():
     if pretty_print:
         fmt = lambda col: prettynum(cols[col][0], cols[col][1], v[col])
     else:
-        fmt = lambda col: v[col]
+        fmt = lambda col: str(v[col])
 
     sys.stdout.write(sep.join(fmt(col) for col in hdr))
     sys.stdout.write("\n")