]> git.proxmox.com Git - mirror_zfs.git/commit
arcstat: Fix integer division with python3
authorValmiky Arquissandas <kayvlim@gmail.com>
Fri, 8 Oct 2021 15:32:27 +0000 (16:32 +0100)
committerGitHub <noreply@github.com>
Fri, 8 Oct 2021 15:32:27 +0000 (09:32 -0600)
commit2d02bba23d83ae8fede8d281edc255f01ccd28e9
tree8960ca52d42aae5f9c0771de3dbbfbbe17d52d85
parent514498fef6977e4d1d6dc676710567384d6f6b39
arcstat: Fix integer division with python3

The arcstat script requests compatibility with python2 and python3, but
PEP 238 modified the / operator and results in erroneous output when
run under python3.

This commit replaces instances of / with //, yielding the expected
result in both versions of Python.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: Valmiky Arquissandas <foss@kayvlim.com>
Closes #12603
cmd/arcstat/arcstat.in