Subversion Repositories HelenOS

Rev

Rev 3767 | Rev 3844 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3767 Rev 3791
Line 492... Line 492...
492
{
492
{
493
    printf(NAME ": HelenOS Console service\n");
493
    printf(NAME ": HelenOS Console service\n");
494
   
494
   
495
    ipcarg_t phonehash;
495
    ipcarg_t phonehash;
496
    int kbd_phone;
496
    int kbd_phone;
-
 
497
    size_t ib_size;
497
    int i;
498
    int i;
498
   
499
   
499
    async_set_client_connection(client_connection);
500
    async_set_client_connection(client_connection);
500
   
501
   
501
    /* Connect to keyboard driver */
502
    /* Connect to keyboard driver */
Line 542... Line 543...
542
            /* FIXME: handle error */
543
            /* FIXME: handle error */
543
            return -1;
544
            return -1;
544
        }
545
        }
545
    }
546
    }
546
    connections[KERNEL_CONSOLE].used = 1;
547
    connections[KERNEL_CONSOLE].used = 1;
547
   
548
 
548
    interbuffer = mmap(NULL,
549
    /* Set up shared memory buffer. */
549
        sizeof(keyfield_t) * fb_info.cols * fb_info.rows,
550
    ib_size = sizeof(keyfield_t) * fb_info.cols * fb_info.rows;
-
 
551
    interbuffer = as_get_mappable_page(ib_size);
-
 
552
 
-
 
553
    if (as_area_create(interbuffer, ib_size, AS_AREA_READ |
550
        PROTO_READ | PROTO_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
554
        AS_AREA_WRITE | AS_AREA_CACHEABLE) != interbuffer) {
-
 
555
        interbuffer = NULL;
-
 
556
    }
-
 
557
 
551
    if (!interbuffer) {
558
    if (interbuffer) {
552
        if (ipc_share_out_start(fb_info.phone, interbuffer,
559
        if (ipc_share_out_start(fb_info.phone, interbuffer,
553
            AS_AREA_READ) != EOK) {
560
            AS_AREA_READ) != EOK) {
554
            munmap(interbuffer,
561
            as_area_destroy(interbuffer);
555
                sizeof(keyfield_t) * fb_info.cols * fb_info.rows);
-
 
556
            interbuffer = NULL;
562
            interbuffer = NULL;
557
        }
563
        }
558
    }
564
    }
559
   
565
   
560
    curs_goto(0, 0);
566
    curs_goto(0, 0);