Changeset 97c7682 in mainline for uspace/srv/bd/gxe_bd/gxe_bd.c
- Timestamp:
- 2012-07-14T11:18:40Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 804d9b6
- Parents:
- 0747468 (diff), f0348c8 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified uspace/srv/bd/gxe_bd/gxe_bd.c ¶
r0747468 r97c7682 122 122 static int gxe_bd_init(void) 123 123 { 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 124 131 void *vaddr; 125 int rc, i;126 char name[16];127 128 async_set_client_connection(gxe_bd_connection);129 rc = loc_server_register(NAME);130 if (rc < 0) {131 printf(NAME ": Unable to register driver.\n");132 return rc;133 }134 135 132 rc = pio_enable((void *) dev_physical, sizeof(gxe_bd_t), &vaddr); 136 133 if (rc != EOK) { 137 printf( NAME ": Could not initialize device I/O space.\n");134 printf("%s: Could not initialize device I/O space.\n", NAME); 138 135 return rc; 139 136 } 140 137 141 138 dev = vaddr; 142 143 for (i = 0; i < MAX_DISKS; i++) { 144 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); 145 144 rc = loc_service_register(name, &service_id[i]); 146 145 if (rc != EOK) { 147 printf(NAME ": Unable to register device %s.\n", name); 146 printf("%s: Unable to register device %s.\n", NAME, 147 name); 148 148 return rc; 149 149 } 150 150 151 fibril_mutex_initialize(&dev_lock[i]); 151 152 } 152 153 153 154 return EOK; 154 155 } … … 195 196 196 197 (void) async_share_out_finalize(callid, &fs_va); 197 if (fs_va == (void *) -1) {198 if (fs_va == AS_MAP_FAILED) { 198 199 async_answer_0(callid, EHANGUP); 199 200 return;
Note:
See TracChangeset
for help on using the changeset viewer.