Changeset 6843a9c in mainline for uspace/srv/bd/gxe_bd/gxe_bd.c


Ignore:
Timestamp:
2012-06-29T13:02:14Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
722912e
Parents:
ba72f2b (diff), 0bbd13e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

Trivial conflicts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/gxe_bd/gxe_bd.c

    rba72f2b r6843a9c  
    122122static int gxe_bd_init(void)
    123123{
     124        async_set_client_connection(gxe_bd_connection);
     125        int rc = loc_server_register(NAME);
     126        if (rc != EOK) {
     127                printf("%s: Unable to register driver.\n", NAME);
     128                return rc;
     129        }
     130       
    124131        void *vaddr;
    125         int rc, i;
    126         char name[16];
    127 
    128         rc = loc_server_register(NAME, gxe_bd_connection);
    129         if (rc < 0) {
    130                 printf(NAME ": Unable to register driver.\n");
    131                 return rc;
    132         }
    133 
    134132        rc = pio_enable((void *) dev_physical, sizeof(gxe_bd_t), &vaddr);
    135133        if (rc != EOK) {
    136                 printf(NAME ": Could not initialize device I/O space.\n");
     134                printf("%s: Could not initialize device I/O space.\n", NAME);
    137135                return rc;
    138136        }
    139 
     137       
    140138        dev = vaddr;
    141 
    142         for (i = 0; i < MAX_DISKS; i++) {
    143                 snprintf(name, 16, "%s/disk%d", NAMESPACE, i);
     139       
     140        for (unsigned int i = 0; i < MAX_DISKS; i++) {
     141                char name[16];
     142               
     143                snprintf(name, 16, "%s/disk%u", NAMESPACE, i);
    144144                rc = loc_service_register(name, &service_id[i]);
    145145                if (rc != EOK) {
    146                         printf(NAME ": Unable to register device %s.\n", name);
     146                        printf("%s: Unable to register device %s.\n", NAME,
     147                            name);
    147148                        return rc;
    148149                }
     150               
    149151                fibril_mutex_initialize(&dev_lock[i]);
    150152        }
    151 
     153       
    152154        return EOK;
    153155}
     
    193195        }
    194196
    195         fs_va = as_get_mappable_page(comm_size);
    196         if (fs_va == NULL) {
     197        (void) async_share_out_finalize(callid, &fs_va);
     198        if (fs_va == AS_MAP_FAILED) {
    197199                async_answer_0(callid, EHANGUP);
    198200                return;
    199201        }
    200 
    201         (void) async_share_out_finalize(callid, fs_va);
    202202
    203203        while (true) {
Note: See TracChangeset for help on using the changeset viewer.