Block protocol: add user endpoint to IOCTL request

I/O control requests now come with the endpoint of the user process
that initiated the ioctl(2) call. It is stored in a new BDEV_USER
field, which is an alias for BDEV_FLAGS. The contents of this field
are to be used only in highly specific situations. It should be
preserved (not replaced!) by services that forward IOCTL requests,
and may be set to NONE for service-initiated IOCTL requests.

Change-Id: I68a01b9ce43eca00e61b985a9cf87f55ba683de4
This commit is contained in:
David van Moolenbroek
2013-07-27 00:49:49 +02:00
committed by Lionel Sambuc
parent 113635b019
commit 95624ae072
16 changed files with 43 additions and 32 deletions

View File

@@ -58,7 +58,7 @@ static int m_block_transfer(devminor_t minor, int do_write, u64_t position,
static int m_block_open(devminor_t minor, int access);
static int m_block_close(devminor_t minor);
static int m_block_ioctl(devminor_t minor, unsigned int request, endpoint_t
endpt, cp_grant_id_t grant);
endpt, cp_grant_id_t grant, endpoint_t user_endpt);
/* Entry points to the CHARACTER part of this driver. */
static struct chardriver m_cdtab = {
@@ -512,7 +512,7 @@ static int m_block_close(devminor_t minor)
* m_block_ioctl *
*===========================================================================*/
static int m_block_ioctl(devminor_t minor, unsigned int request,
endpoint_t endpt, cp_grant_id_t grant)
endpoint_t endpt, cp_grant_id_t grant, endpoint_t UNUSED(user_endpt))
{
/* I/O controls for the block devices of the memory driver. Currently there is
* one I/O control specific to the memory driver: