/* Field names for block device messages. */
#define CDEV_MINOR m10_i1 /* minor device number */
-#define CDEV_STATUS m10_i2 /* OK, error code, minor device, operations */
#define CDEV_ACCESS m10_i2 /* access bits for open requests */
#define CDEV_GRANT m10_i2 /* grant ID of buffer */
#define CDEV_OPS m10_i2 /* requested select operations */
} mess_lchardriver_vfs_reply;
_ASSERT_MSG_SIZE(mess_lchardriver_vfs_reply);
+typedef struct {
+ int status;
+ int32_t minor;
+
+ uint8_t padding[48];
+} mess_lchardriver_vfs_sel1;
+_ASSERT_MSG_SIZE(mess_lchardriver_vfs_sel1);
+
+typedef struct {
+ int status;
+ int32_t minor;
+
+ uint8_t padding[48];
+} mess_lchardriver_vfs_sel2;
+_ASSERT_MSG_SIZE(mess_lchardriver_vfs_sel2);
+
typedef struct {
time_t atime;
time_t mtime;
mess_lc_vm_rusage m_lc_vm_rusage;
mess_lchardriver_vfs_reply m_lchardriver_vfs_reply;
+ mess_lchardriver_vfs_sel1 m_lchardriver_vfs_sel1;
+ mess_lchardriver_vfs_sel2 m_lchardriver_vfs_sel2;
mess_lexec_pm_exec_new m_lexec_pm_exec_new;
memset(&m_reply, 0, sizeof(m_reply));
m_reply.m_type = CDEV_SEL2_REPLY;
- m_reply.CDEV_MINOR = minor;
- m_reply.CDEV_STATUS = r;
+ m_reply.m_lchardriver_vfs_sel2.minor = minor;
+ m_reply.m_lchardriver_vfs_sel2.status = r;
if ((r = asynsend3(endpt, &m_reply, AMF_NOREPLY)) != OK)
printf("chardriver_reply_select: send to %d failed: %d\n", endpt, r);
case CDEV_SELECT:
reply_mess.m_type = CDEV_SEL1_REPLY;
- reply_mess.CDEV_MINOR = mess->CDEV_MINOR;
- reply_mess.CDEV_STATUS = r;
+ reply_mess.m_lchardriver_vfs_sel1.minor = mess->CDEV_MINOR;
+ reply_mess.m_lchardriver_vfs_sel1.status = r;
break;
default:
cdev_generic_reply(&m_in);
break;
case CDEV_SEL1_REPLY:
- select_reply1(m_in.m_source, m_in.CDEV_MINOR, m_in.CDEV_STATUS);
+ select_reply1(m_in.m_source, m_in.m_lchardriver_vfs_sel1.minor,
+ m_in.m_lchardriver_vfs_sel1.status);
break;
case CDEV_SEL2_REPLY:
- select_reply2(m_in.m_source, m_in.CDEV_MINOR, m_in.CDEV_STATUS);
+ select_reply2(m_in.m_source, m_in.m_lchardriver_vfs_sel2.minor,
+ m_in.m_lchardriver_vfs_sel2.status);
break;
default:
printf("VFS: char driver %u sent unknown reply %x\n", who_e, call_nr);