Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/irc/i8259/i8259.c

    rffa2c8ef r15f3c3f  
    3838#include <ipc/services.h>
    3939#include <ipc/irc.h>
    40 #include <ipc/ns.h>
     40#include <ns.h>
    4141#include <sysinfo.h>
    4242#include <as.h>
     
    5050#include <async.h>
    5151#include <stdio.h>
    52 #include <ipc/devmap.h>
     52#include <ipc/loc.h>
    5353
    5454#define NAME  "i8259"
     
    9898 * @param iid   Hash of the request that opened the connection.
    9999 * @param icall Call data of the request that opened the connection.
    100  *
     100 * @param arg   Local argument.
    101101 */
    102 static void i8259_connection(ipc_callid_t iid, ipc_call_t *icall)
     102static void i8259_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
    103103{
    104104        ipc_callid_t callid;
     
    112112        while (true) {
    113113                callid = async_get_call(&call);
     114               
     115                if (!IPC_GET_IMETHOD(call)) {
     116                        /* The other side has hung up. */
     117                        async_answer_0(callid, EOK);
     118                        return;
     119                }
    114120               
    115121                switch (IPC_GET_IMETHOD(call)) {
     
    136142       
    137143        if ((sysinfo_get_value("i8259", &i8259) != EOK) || (!i8259)) {
    138                 printf(NAME ": No i8259 found\n");
     144                printf("%s: No i8259 found\n", NAME);
    139145                return false;
    140146        }
     
    144150            (pio_enable((void *) IO_RANGE1_START, IO_RANGE1_SIZE,
    145151            (void **) &io_range1) != EOK)) {
    146                 printf(NAME ": i8259 not accessible\n");
     152                printf("%s: i8259 not accessible\n", NAME);
    147153                return false;
    148154        }
    149155       
    150156        async_set_client_connection(i8259_connection);
    151         service_register(SERVICE_I8259);
     157        service_register(SERVICE_IRC);
    152158       
    153159        return true;
     
    156162int main(int argc, char **argv)
    157163{
    158         printf(NAME ": HelenOS i8259 driver\n");
     164        printf("%s: HelenOS i8259 driver\n", NAME);
    159165       
    160166        if (!i8259_init())
    161167                return -1;
    162168       
    163         printf(NAME ": Accepting connections\n");
     169        printf("%s: Accepting connections\n", NAME);
     170        task_retval(0);
    164171        async_manager();
    165172       
Note: See TracChangeset for help on using the changeset viewer.