zfs/lib/libzfs
Brian Behlendorf 31864e3d8c
OpenZFS 8652 - Tautological comparisons with ZPROP_INVAL
usr/src/uts/common/sys/fs/zfs.h
	Change ZPROP_INVAL and ZPROP_CONT from macros to enum values.  Clang
	and GCC both prefer to use unsigned ints to store enums.  That was
	causing tautological comparison warnings (and likely eliminating
	error handling code at compile time) whenever a zfs_prop_t or
	zpool_prop_t was compared to ZPROP_INVAL or ZPROP_CONT.  Making the
	error flags be explicity enum values forces the enum types to be
	signed.

	ZPROP_INVAL was also compared against two different enum types.  I
	had to change its name to ZPOOL_PROP_INVAL whenever its compared to
	a zpool_prop_t.  There are still some places where ZPROP_INVAL or
	ZPROP_CONT is compared to a plain int, in code that doesn't know
	whether the int is storing a zfs_prop_t or a zpool_prop_t.

usr/src/uts/common/fs/zfs/spa.c
	s/ZPROP_INVAL/ZPOOL_PROP_INVAL/

Authored by: Alan Somers <asomers@gmail.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: George Melikov <mail@gmelikov.ru>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/8652
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/c2de80dc74
Closes #7061
2018-01-19 09:22:37 -08:00
..
.gitignore Add a pkgconfig file 2014-08-28 07:59:43 -07:00
Makefile.am Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
THIRDPARTYLICENSE.openssl Encryption patch follow-up 2017-10-11 16:54:48 -04:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00
libzfs.pc.in Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_changelist.c Native Encryption for ZFS on Linux 2017-08-14 10:36:48 -07:00
libzfs_config.c OpenZFS 4521 - zfstest is trying to execute evil "zfs unmount -a" 2017-02-03 13:24:44 -08:00
libzfs_core.pc.in Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_crypto.c Encryption patch follow-up 2017-10-11 16:54:48 -04:00
libzfs_dataset.c OpenZFS 8898 - creating fs with checksum=skein on the boot pools fails ungracefully 2018-01-11 13:53:04 -08:00
libzfs_diff.c Native Encryption for ZFS on Linux 2017-08-14 10:36:48 -07:00
libzfs_import.c Update for cppcheck v1.80 2017-11-18 14:08:00 -08:00
libzfs_iter.c Fix intra-pool resumable 'zfs send -t <token>' 2017-10-10 15:22:05 -07:00
libzfs_mount.c Fix some ZFS Test Suite issues 2017-09-25 10:32:34 -07:00
libzfs_pool.c OpenZFS 8652 - Tautological comparisons with ZPROP_INVAL 2018-01-19 09:22:37 -08:00
libzfs_sendrecv.c Encryption patch follow-up 2017-10-11 16:54:48 -04:00
libzfs_status.c Sequential scrub and resilvers 2017-11-15 17:27:01 -08:00
libzfs_util.c Remove FRU and LIBTOPO Support 2017-09-18 17:06:40 -07:00