Changeset b61d47d in mainline for uspace/srv/devmap/devmap.c


Ignore:
Timestamp:
2007-12-02T20:00:14Z (17 years ago)
Author:
Josef Cejka <malyzelenyhnus@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
90c35436
Parents:
8df2eab
Message:

Function ipc_connect_me_to sends 3 user defined arguments now.
One argument added also to ipc_forward_fast.
Fixed devmap and improved its test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devmap/devmap.c

    r8df2eab rb61d47d  
    449449 * Find device driver owning requested device and forward
    450450 * the message to it.
    451  *
    452  *
    453451 */
    454452static void devmap_forward(ipc_callid_t callid, ipc_call_t *call)
     
    460458         * Get handle from request
    461459         */
    462         handle = IPC_GET_ARG1(*call);
     460        handle = IPC_GET_ARG2(*call);
    463461        dev = devmap_device_find_handle(handle);
    464462
     
    470468        }
    471469
    472         /* FIXME: is this correct method how to pass argument on forwarding ?*/
    473470        ipc_forward_fast(callid, dev->driver->phone, (ipcarg_t)(dev->handle),
    474             0, IPC_FF_NONE);
     471            IPC_GET_ARG3(*call), 0, IPC_FF_NONE);
    475472        return;
    476473}
     
    670667                        continue; /* Exit thread */
    671668
    672                 case DEVMAP_DEVICE_CONNECT_ME_TO:
    673                         /* Connect client to selected device */
    674                         printf("DEVMAP: connect to device %d.\n",
    675                             IPC_GET_ARG1(call));
    676                         devmap_forward(callid, &call);
    677                         break;
    678 
    679669                case DEVMAP_DEVICE_GET_HANDLE:
    680670                        devmap_get_handle(callid, &call);
     
    710700                devmap_connection_client(iid, icall);
    711701                break;
     702        case DEVMAP_CONNECT_TO_DEVICE:
     703                        /* Connect client to selected device */
     704                printf("DEVMAP: connect to device %d.\n",
     705                    IPC_GET_ARG2(*icall));
     706                devmap_forward(iid, icall);
     707                break;
    712708        default:
    713709                ipc_answer_0(iid, ENOENT); /* No such interface */
Note: See TracChangeset for help on using the changeset viewer.