zfsonlinux/zfs-patches/0023-Fix-arcstat.py-handling-of-unsupported-options.patch
Stoiko Ivanov a010b40938 update/rebase to zfs-0.7.10 with patches from ZOL
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-09-13 08:54:51 +02:00

34 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: LOLi <loli10K@users.noreply.github.com>
Date: Sat, 18 Aug 2018 22:10:36 +0200
Subject: [PATCH] Fix arcstat.py handling of unsupported options
This change allows the arcstat.py script to handle unsupported options
gracefully and print both error and usage messages when one such option
is provided.
Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7799
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
cmd/arcstat/arcstat.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/arcstat/arcstat.py b/cmd/arcstat/arcstat.py
index 85c83ccc..b52a8c29 100755
--- a/cmd/arcstat/arcstat.py
+++ b/cmd/arcstat/arcstat.py
@@ -285,7 +285,7 @@ def init():
]
)
except getopt.error as msg:
- sys.stderr.write(msg)
+ sys.stderr.write("Error: %s\n" % str(msg))
usage()
opts = None