If we have 1 major then the highest permitted device is 0,255 not 1, 255.
This only ever showed up if you either mknod a device once bigger than that
supported or attempt to boot a device one higher than the limit.
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;
{
/* This is a bit uglier than needed but the right hand side is
a constant this way */
- if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) + 255)
+ if(dev > ((sizeof(dev_tab)/sizeof(struct devsw)) << 8) - 1)
return false;
else
return true;