aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zhack
diff options
context:
space:
mode:
authorNathaniel Wesley Filardo <[email protected]>2018-01-09 14:14:45 -0500
committerBrian Behlendorf <[email protected]>2018-01-09 11:14:45 -0800
commit8b20a9f996b90abe439ce14303fc440f26390e38 (patch)
treefc6c45301c835b958b8fae6f687fd8ff9a1d2332 /cmd/zhack
parent0873bb6337452e3e028e40f5dad945b30deab185 (diff)
zhack: fix getopt return type
This fixes zhack's command processing on ARM. On ARM char is unsigned, and so, in promotion to an int, it will never compare equal to -1. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Nathaniel Wesley Filardo <[email protected]> Closes #7016
Diffstat (limited to 'cmd/zhack')
-rw-r--r--cmd/zhack/zhack.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/zhack/zhack.c b/cmd/zhack/zhack.c
index 70f88fc69..e15af8f4e 100644
--- a/cmd/zhack/zhack.c
+++ b/cmd/zhack/zhack.c
@@ -268,7 +268,7 @@ zhack_feature_enable_sync(void *arg, dmu_tx_t *tx)
static void
zhack_do_feature_enable(int argc, char **argv)
{
- char c;
+ int c;
char *desc, *target;
spa_t *spa;
objset_t *mos;
@@ -363,7 +363,7 @@ feature_decr_sync(void *arg, dmu_tx_t *tx)
static void
zhack_do_feature_ref(int argc, char **argv)
{
- char c;
+ int c;
char *target;
boolean_t decr = B_FALSE;
spa_t *spa;
@@ -483,7 +483,7 @@ main(int argc, char **argv)
char *path[MAX_NUM_PATHS];
const char *subcommand;
int rv = 0;
- char c;
+ int c;
g_importargs.path = path;