diff options
author | loli10K <[email protected]> | 2019-05-28 20:14:58 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-05-28 11:14:58 -0700 |
commit | 0869b74a1edc1e3375b560f788038615f37feac4 (patch) | |
tree | af9285b94298a84b942ef22fe109f795c7adea92 /cmd/zfs | |
parent | 841a7a98fc4623e0bcecfa393e7818ade4198a15 (diff) |
Endless loop in zpool_do_remove() on platforms with unsigned char
On systems where "char" is an unsigned type the value returned by
getopt() will never be negative (-1), leading to an endless loop:
this issue prevents both 'zpool remove' and 'zstreamdump' for
working on some systems.
Reviewed-by: Igor Kozhukhov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Chris Dunlop <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes #8789
Diffstat (limited to 'cmd/zfs')
-rw-r--r-- | cmd/zfs/zfs_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index c85154479..d75f089ac 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -2239,7 +2239,7 @@ zfs_do_upgrade(int argc, char **argv) boolean_t showversions = B_FALSE; int ret = 0; upgrade_cbdata_t cb = { 0 }; - signed char c; + int c; int flags = ZFS_ITER_ARGS_CAN_BE_PATHS; /* check options */ @@ -3933,7 +3933,7 @@ static int zfs_do_snapshot(int argc, char **argv) { int ret = 0; - signed char c; + int c; nvlist_t *props; snap_cbdata_t sd = { 0 }; boolean_t multiple_snaps = B_FALSE; |