Rewrite character driver protocol

As a side effect, remove the clone style, as the normal device style
supports device cloning now.

Change-Id: Ie82d1ef0385514a04a8faa139129a617895780b5
This commit is contained in:
David van Moolenbroek
2014-03-01 09:04:52 +01:00
committed by sambuc
parent 87337273e4
commit 665198b4c2
38 changed files with 515 additions and 661 deletions
+4 -4
View File
@@ -369,9 +369,9 @@ static void do_char_open(message *m_ptr, int ipc_status)
memset(&m_reply, 0, sizeof(m_reply));
m_reply.m_type = DEV_OPEN_REPL;
m_reply.REP_ENDPT = m_ptr->USER_ENDPT;
m_reply.REP_STATUS = ENXIO;
m_reply.m_type = CDEV_REPLY;
m_reply.CDEV_STATUS = ENXIO;
m_reply.CDEV_ID = m_ptr->CDEV_ID;
send_reply(m_ptr->m_source, &m_reply, ipc_status);
}
@@ -413,7 +413,7 @@ void blockdriver_process_on_thread(struct blockdriver *bdp, message *m_ptr,
* someone creates a character device node for a block driver, opening that
* device node will cause the corresponding VFS thread to block forever.
*/
if (m_ptr->m_type == DEV_OPEN) {
if (m_ptr->m_type == CDEV_OPEN) {
do_char_open(m_ptr, ipc_status);
return;