]> git.proxmox.com Git - mirror_zfs.git/commit
FreeBSD: Replace legacy make_dev() interface usage
authorRyan Moeller <ryan@iXsystems.com>
Thu, 8 Sep 2022 17:40:18 +0000 (13:40 -0400)
committerGitHub <noreply@github.com>
Thu, 8 Sep 2022 17:40:18 +0000 (10:40 -0700)
commit60d995727a19104a2832d475f5c0861ffbae2c97
treeec76c385fc60cdb7a93d1807a3d846f5c8a25e3d
parente27e692bcc2c3e5b79f60ef16a2183f2231ff012
FreeBSD: Replace legacy make_dev() interface usage

The function make_dev_s() was introduced to replace make_dev() in
FreeBSD 11.0.  It allows further specification of properties and flags
and returns an error code on failure.  Using this we can fail loading
the module more gracefully than a panic in situations such as when a
device named zfs already exists.  We already use it for zvols.

Use make_dev_s() for /dev/zfs.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #13854
module/os/freebsd/zfs/kmod_core.c