Block drivers: reply ENOTTY to unknown IOCTLs

Change-Id: Ie2e82d2491d546f4dd73b009100646e249a147b5
This commit is contained in:
David van Moolenbroek 2013-09-01 14:34:17 +02:00 committed by Lionel Sambuc
parent a1f00d5527
commit 26cb85535e
8 changed files with 9 additions and 9 deletions

View File

@ -2685,7 +2685,7 @@ static int ahci_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
sizeof(val));
}
return EINVAL;
return ENOTTY;
}
/*===========================================================================*

View File

@ -2290,7 +2290,7 @@ static int w_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
return (w_wn->w_status & (STATUS_ERR|STATUS_WF)) ? EIO : OK;
}
return EINVAL;
return ENOTTY;
}
/*===========================================================================*

View File

@ -219,7 +219,7 @@ cat24c256_blk_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
{
log_trace(&log, "cat24c256_blk_ioctl(%d)\n", minor);
/* no supported ioctls for this device */
return EINVAL;
return ENOTTY;
}
static struct device *

View File

@ -269,7 +269,7 @@ static int do_ioctl(message *m)
default:
printf("Filter: unknown ioctl request: %d!\n",
m->BDEV_REQUEST);
return EINVAL;
return ENOTTY;
}
return OK;

View File

@ -469,7 +469,7 @@ block_ioctl(dev_t minor,
return OK;
}
return EINVAL;
return ENOTTY;
}
/*===========================================================================*

View File

@ -178,7 +178,7 @@ struct blockdriver tda19988_tab = {
.bdr_open = tda19988_blk_open,
.bdr_close = tda19988_blk_close,
.bdr_transfer = tda19988_blk_transfer,
.bdr_ioctl = tda19988_blk_ioctl, /* nop -- always returns EINVAL */
.bdr_ioctl = tda19988_blk_ioctl, /* nop -- always returns ENOTTY */
.bdr_cleanup = NULL, /* nothing allocated -- nothing to clean up */
.bdr_part = tda19988_blk_part,
.bdr_geometry = NULL, /* no geometry (cylinders, heads, sectors, etc) */
@ -324,7 +324,7 @@ tda19988_blk_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
{
log_trace(&log, "tda19988_blk_ioctl(%d)\n", minor);
/* no supported ioctls for this device */
return EINVAL;
return ENOTTY;
}
static struct device *

View File

@ -390,7 +390,7 @@ virtio_blk_ioctl(dev_t minor, unsigned int req, endpoint_t endpt,
}
return EINVAL;
return ENOTTY;
}
static struct device *

View File

@ -345,7 +345,7 @@ static int do_ioctl(struct blockdriver *bdp, message *mp)
if (bdp->bdr_ioctl)
r = (*bdp->bdr_ioctl)(minor, request, mp->m_source, grant);
else
r = EINVAL;
r = ENOTTY;
}
return r;