/* Field names for block device messages. */
#define CDEV_MINOR m10_i1 /* minor device number */
#define CDEV_GRANT m10_i2 /* grant ID of buffer */
-#define CDEV_OPS m10_i2 /* requested select operations */
#define CDEV_COUNT m10_i3 /* number of bytes to transfer */
#define CDEV_USER m10_i3 /* endpoint of user process */
#define CDEV_FLAGS m10_i4 /* transfer flags */
} mess_vfs_lchardriver_openclose;
_ASSERT_MSG_SIZE(mess_vfs_lchardriver_openclose);
+typedef struct {
+ devminor_t minor;
+ int ops;
+
+ uint8_t padding[48];
+} mess_vfs_lchardriver_select;
+_ASSERT_MSG_SIZE(mess_vfs_lchardriver_select);
+
typedef struct {
int status;
uint32_t id; /* should be cdev_id_t */
mess_vfs_lchardriver_cancel m_vfs_lchardriver_cancel;
mess_vfs_lchardriver_openclose m_vfs_lchardriver_openclose;
+ mess_vfs_lchardriver_select m_vfs_lchardriver_select;
mess_vfs_utimens m_vfs_utimens;
mess_vm_vfs_mmap m_vm_vfs_mmap;
case CDEV_SELECT:
reply_mess.m_type = CDEV_SEL1_REPLY;
- reply_mess.m_lchardriver_vfs_sel1.minor = mess->CDEV_MINOR;
reply_mess.m_lchardriver_vfs_sel1.status = r;
+ reply_mess.m_lchardriver_vfs_sel1.minor =
+ mess->m_vfs_lchardriver_select.minor;
break;
default:
return EBADF;
/* Call the select hook. */
- minor = m_ptr->CDEV_MINOR;
- ops = m_ptr->CDEV_OPS;
+ minor = m_ptr->m_vfs_lchardriver_select.minor;
+ ops = m_ptr->m_vfs_lchardriver_select.ops;
endpt = m_ptr->m_source;
return cdp->cdr_select(minor, ops, endpt);
case CDEV_CANCEL:
*minor = m->m_vfs_lchardriver_cancel.minor;
return OK;
+ case CDEV_SELECT:
+ *minor = m->m_vfs_lchardriver_select.minor;
+ return OK;
case CDEV_READ:
case CDEV_WRITE:
case CDEV_IOCTL:
- case CDEV_SELECT:
*minor = m->CDEV_MINOR;
return OK;
default:
memset(&dev_mess, 0, sizeof(dev_mess));
dev_mess.m_type = CDEV_SELECT;
- dev_mess.CDEV_MINOR = minor_dev;
- dev_mess.CDEV_OPS = ops;
+ dev_mess.m_vfs_lchardriver_select.minor = minor_dev;
+ dev_mess.m_vfs_lchardriver_select.ops = ops;
/* Send the request to the driver. */
if ((r = asynsend3(dp->dmap_driver, &dev_mess, AMF_NOREPLY)) != OK)