The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/config/kernel-misc-minor.m4

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 dnl #
    2 dnl # Determine an available miscellaneous minor number which can be used
    3 dnl # for the /dev/zfs device.  This is needed because kernel module
    4 dnl # auto-loading depends on registering a reserved non-conflicting minor
    5 dnl # number.  Start with a large known available unreserved minor and work
    6 dnl # our way down to lower value if a collision is detected.
    7 dnl #
    8 AC_DEFUN([ZFS_AC_KERNEL_MISC_MINOR], [
    9         AC_MSG_CHECKING([whether /dev/zfs minor is available])
   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_DEVICE_MINOR="$i"
   15                         AC_MSG_RESULT($ZFS_DEVICE_MINOR)
   16                         AC_DEFINE_UNQUOTED([ZFS_DEVICE_MINOR],
   17                             [$ZFS_DEVICE_MINOR], [/dev/zfs minor])
   18                         break
   19                 fi
   20         done
   21 
   22         AS_IF([ test -z "$ZFS_DEVICE_MINOR"], [
   23                 AC_MSG_ERROR([
   24         *** No available misc minor numbers available for use.])
   25         ])
   26 ])

Cache object: c8b3b39e7227bd4abdc7e2a2a6dfdfed


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.