]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-misc-minor.m4
Add quotations for ${ENCRYPTIONROOT}
[mirror_zfs.git] / config / kernel-misc-minor.m4
CommitLineData
a6cc9756
BB
1dnl #
2dnl # Determine an available miscellaneous minor number which can be used
3dnl # for the /dev/zfs device. This is needed because kernel module
4dnl # auto-loading depends on registering a reserved non-conflicting minor
5dnl # number. Start with a large known available unreserved minor and work
6dnl # our way down to lower value if a collision is detected.
7dnl #
8AC_DEFUN([ZFS_AC_KERNEL_MISC_MINOR], [
9 AC_MSG_CHECKING([for available /dev/zfs minor])
10
11 for i in $(seq 249 -1 200); do
12 if ! grep -q "^#define\s\+.*_MINOR\s\+.*$i" \
13 ${LINUX}/include/linux/miscdevice.h; then
14 ZFS_MINOR="$i"
15 AC_MSG_RESULT($ZFS_MINOR)
16 AC_DEFINE_UNQUOTED([ZFS_MINOR], [$ZFS_MINOR],
17 [/dev/zfs minor])
18 break
19 fi
20 done
21
22 AS_IF([ test -z "$ZFS_MINOR"], [
23 AC_MSG_ERROR([
24 *** No available misc minor numbers available for use.])
25 ])
26])