zfs/lib/libzfs
Colm f97142c748
A couple of small style cleanups
In `zpool_load_compat()`:

  * initialize `l_features[]` with a loop rather than a static
    initializer.

  * don't redefine system constants; use private names instead

Rationale here:

When an array is initialized using a static {foo}, only the specified
members are initialized to the provided values, the rest are
initialized to zero. While B_FALSE is of course zero, it feels
unsafe to rely on this being true forever, so I'm inclined to sacrifice
a few microseconds of runtime here and initialize using a loop.

When looking for the correct combination of system constants to use
(in open() and mmap()), I prefer to use private constants rather than
redefining system ones; due to the small chance that the system
ones might be referenced later in the file. So rather than defining
O_PATH and MAP_POPULATE, I use distinct constant names.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Colm Buckley <colm@tuatha.org>
Closes #12156
2021-06-03 09:13:42 -06:00
..
os freebsd/libzfs: import execvPe() from FreeBSD 13 2021-05-26 11:03:47 -06:00
.gitignore Clean up lib dependencies 2020-07-10 14:26:00 -07:00
Makefile.am libzfs: add keylocation=https://, backed by fetch(3) or libcurl 2021-05-12 21:21:35 -07:00
THIRDPARTYLICENSE.openssl Fix typos in lib/ 2019-09-02 17:53:27 -07:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00
libzfs.abi libzfs: add zfs_get_underlying_type. Stop including libzfs_impl.h in cmd 2021-05-29 14:26:38 -07:00
libzfs.pc.in Spruce up pkg-config files for libzfs/libzfs_core 2020-09-04 11:11:18 -07:00
libzfs.suppr Library ABI tracking with abigail 2020-11-17 09:18:52 -08:00
libzfs_changelist.c Add 'zfs rename -u' to rename without remounting 2020-09-01 16:14:16 -07:00
libzfs_config.c Use zfs_ioctl with zfs_cmd_t in libzfs 2019-10-23 17:29:43 -07:00
libzfs_crypto.c libzfs: add keylocation=https://, backed by fetch(3) or libcurl 2021-05-12 21:21:35 -07:00
libzfs_dataset.c libzfs: add zfs_get_underlying_type. Stop including libzfs_impl.h in cmd 2021-05-29 14:26:38 -07:00
libzfs_diff.c libzfs: format safety 2021-05-29 14:26:25 -07:00
libzfs_import.c zpool: speed up importing large pools (#11469) 2021-01-21 12:55:54 -08:00
libzfs_iter.c lib/: set O_CLOEXEC on all fds 2021-04-11 15:45:59 -07:00
libzfs_mount.c libzfs: format safety 2021-05-29 14:26:25 -07:00
libzfs_pool.c A couple of small style cleanups 2021-06-03 09:13:42 -06:00
libzfs_sendrecv.c libzfs: format safety 2021-05-29 14:26:25 -07:00
libzfs_status.c Improvements to the 'compatibility' property 2021-04-12 09:08:56 -07:00
libzfs_util.c libzfs: format safety 2021-05-29 14:26:25 -07:00