Bug 29624

Summary: kernel prints "bmaj but is not a boot disk" for isdn4bsd devices
Product: Base System Reporter: nimrodm <nimrodm>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.4-PRERELEASE   
Hardware: Any   
OS: Any   

Description nimrodm 2001-08-11 15:00:01 UTC
  When using isdn4bsd, FreeBSD displays the following message during the boot
  process: "i4bctl": bmaj but is not a disk This message is displayed for each
  isdn4bsd devices selected at kernel compile time (i4b, i4btel, etc.) 
  The reason is that 'struct cdevsw' is declared differently in i4b and
  the FreeBSD kernel.

Fix: 

Haven't tried this myself BUT take a look at:
  /sys/i4b/driver/i4b_ctl.c (lines 107 to 121):
  static struct cdevsw i4bctl_cdevsw = {
    /* open */      i4bctlopen,
    /* close */     i4bctlclose,
    /* read */      noread,
    /* write */     nowrite,
    /* ioctl */     i4bctlioctl,
    /* poll */      POLLFIELD,
    /* mmap */      nommap,
    /* strategy */  nostrategy,
    /* name */      "i4bctl",
    /* maj */       CDEV_MAJOR,
    /* dump */      nodump,
    /* psize */     nopsize,
    /* flags */     0,
  };
  .. and ..
  /sys/sys/conf.h (lines 159 to 176):
  struct cdevsw {
    d_open_t    *d_open;
    d_close_t   *d_close;
    d_read_t    *d_read;
    d_write_t   *d_write;
    d_ioctl_t   *d_ioctl;
    d_poll_t    *d_poll;
    d_mmap_t    *d_mmap;
    d_strategy_t    *d_strategy;
    const char  *d_name;    /* base device name, e.g. 'vn' */
    int     d_maj;
    d_dump_t    *d_dump;
    d_psize_t   *d_psize;
    u_int       d_flags;
    int     d_bmaj;
    /* additions below are not binary compatible with 4.2 and below */
    d_kqfilter_t    *d_kqfilter;
  };
  The two last entries (d_bmaj and d_kqfilter) are missing from the
  initializer of i4b_ctl (and probably other i4b devices). The first
  field is the one responsible for the "not a disk" message (printed
  by /sys/kern/kern_conf.c:110).
How-To-Repeat:   Just configure i4b, compile it with the kernel and reboot...
Comment 1 hm freebsd_committer freebsd_triage 2001-11-19 14:27:08 UTC
State Changed
From-To: open->closed

This has been fixed for 4.4-RELEASE.