mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
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 <behlendorf1@llnl.gov> Signed-off-by: Nathaniel Wesley Filardo <nwf@cs.jhu.edu> Closes #7016
This commit is contained in:
parent
9c1a8eaa51
commit
a2ee6568c6
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user