Changeset 371bd7d in mainline for uspace/srv/bd/ata_bd/ata_bd.c
- Timestamp:
- 2010-03-27T09:22:17Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 36a75a2
- Parents:
- cd82bb1 (diff), eaf22d4 (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
-
uspace/srv/bd/ata_bd/ata_bd.c
rcd82bb1 r371bd7d 55 55 #include <async.h> 56 56 #include <as.h> 57 #include <fibril_sync .h>58 #include <str ing.h>57 #include <fibril_synch.h> 58 #include <str.h> 59 59 #include <devmap.h> 60 60 #include <sys/types.h> 61 #include <inttypes.h> 61 62 #include <errno.h> 62 63 #include <bool.h> … … 66 67 #include "ata_bd.h" 67 68 68 #define NAME "ata_bd" 69 #define NAME "ata_bd" 70 #define NAMESPACE "bd" 69 71 70 72 /** Physical block size. Should be always 512. */ … … 111 113 printf(NAME ": ATA disk driver\n"); 112 114 113 printf("I/O address 0x%p/0x%p\n", ctl_physical, cmd_physical);115 printf("I/O address %p/%p\n", ctl_physical, cmd_physical); 114 116 115 117 if (ata_bd_init() != EOK) … … 135 137 if (disk[i].present == false) 136 138 continue; 137 138 snprintf(name, 16, " disk%d", i);139 140 snprintf(name, 16, "%s/disk%d", NAMESPACE, i); 139 141 rc = devmap_device_register(name, &disk[i].dev_handle); 140 142 if (rc != EOK) { 141 143 devmap_hangup_phone(DEVMAP_DRIVER); 142 printf(NAME ": Unable to register device %s.\n", 143 name); 144 printf(NAME ": Unable to register device %s.\n", name); 144 145 return rc; 145 146 } … … 180 181 } 181 182 182 printf(" % llublocks", d->blocks, d->blocks / (2 * 1024));183 printf(" %" PRIu64 " blocks", d->blocks, d->blocks / (2 * 1024)); 183 184 184 185 mbytes = d->blocks / (2 * 1024); 185 186 if (mbytes > 0) 186 printf(" % lluMB.", mbytes);187 printf(" %" PRIu64 " MB.", mbytes); 187 188 188 189 printf("\n"); … … 296 297 ipc_answer_1(callid, EOK, block_size); 297 298 continue; 299 case BD_GET_NUM_BLOCKS: 300 ipc_answer_2(callid, EOK, LOWER32(disk[disk_id].blocks), 301 UPPER32(disk[disk_id].blocks)); 302 continue; 298 303 default: 299 304 retval = EINVAL; … … 495 500 496 501 d = &disk[disk_id]; 497 bc.h = 0; /* Silence warning. */ 502 503 /* Silence warning. */ 504 memset(&bc, 0, sizeof(bc)); 498 505 499 506 /* Compute block coordinates. */ … … 569 576 570 577 d = &disk[disk_id]; 571 bc.h = 0; /* Silence warning. */ 578 579 /* Silence warning. */ 580 memset(&bc, 0, sizeof(bc)); 572 581 573 582 /* Compute block coordinates. */
Note:
See TracChangeset
for help on using the changeset viewer.