Changeset cb41a5e in mainline for uspace/srv/rd/rd.c
- Timestamp:
- 2009-05-21T07:03:38Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a095d20
- Parents:
- 2246de6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/rd/rd.c
r2246de6 rcb41a5e 113 113 } 114 114 115 while ( 1) {115 while (true) { 116 116 callid = async_get_call(&call); 117 117 switch (IPC_GET_METHOD(call)) { … … 205 205 printf(NAME ": Found RAM disk at %p, %d bytes\n", rd_ph_addr, rd_size); 206 206 207 int driver_phone= devmap_driver_register(NAME, rd_connection);208 if ( driver_phone< 0) {209 printf(NAME ": Unable to register driver \n");207 int rc = devmap_driver_register(NAME, rd_connection); 208 if (rc < 0) { 209 printf(NAME ": Unable to register driver (%d)\n", rc); 210 210 return false; 211 211 } 212 212 213 213 dev_handle_t dev_handle; 214 if (devmap_device_register(driver_phone, "initrd", &dev_handle) != EOK) { 215 ipc_hangup(driver_phone); 216 printf(NAME ": Unable to register device\n"); 217 return false; 218 } 219 220 /* 221 * Create the second device. 222 * We need at least two devices for the sake of testing of non-root 223 * mounts. Of course it would be better to allow the second device 224 * be created dynamically... 225 */ 226 if (devmap_device_register(driver_phone, "spared", &dev_handle) != EOK) { 227 ipc_hangup(driver_phone); 214 if (devmap_device_register("initrd", &dev_handle) != EOK) { 215 devmap_hangup_phone(DEVMAP_DRIVER); 228 216 printf(NAME ": Unable to register device\n"); 229 217 return false; … … 249 237 /** 250 238 * @} 251 */ 239 */
Note:
See TracChangeset
for help on using the changeset viewer.