Ignore:
File:
1 edited

Legend:

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

    r0da4e41 r19f857a  
    5555#include <async.h>
    5656#include <as.h>
    57 #include <fibril_sync.h>
    58 #include <string.h>
     57#include <fibril_synch.h>
     58#include <str.h>
    5959#include <devmap.h>
    6060#include <sys/types.h>
     61#include <inttypes.h>
    6162#include <errno.h>
    6263#include <bool.h>
     
    6667#include "ata_bd.h"
    6768
    68 #define NAME "ata_bd"
     69#define NAME       "ata_bd"
     70#define NAMESPACE  "bd"
    6971
    7072/** Physical block size. Should be always 512. */
     
    111113        printf(NAME ": ATA disk driver\n");
    112114
    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);
    114116
    115117        if (ata_bd_init() != EOK)
     
    135137                if (disk[i].present == false)
    136138                        continue;
    137 
    138                 snprintf(name, 16, "disk%d", i);
     139               
     140                snprintf(name, 16, "%s/disk%d", NAMESPACE, i);
    139141                rc = devmap_device_register(name, &disk[i].dev_handle);
    140142                if (rc != EOK) {
    141143                        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);
    144145                        return rc;
    145146                }
     
    180181        }
    181182
    182         printf(" %llu blocks", d->blocks, d->blocks / (2 * 1024));
     183        printf(" %" PRIu64 " blocks", d->blocks, d->blocks / (2 * 1024));
    183184
    184185        mbytes = d->blocks / (2 * 1024);
    185186        if (mbytes > 0)
    186                 printf(" %llu MB.", mbytes);
     187                printf(" %" PRIu64 " MB.", mbytes);
    187188
    188189        printf("\n");
     
    296297                        ipc_answer_1(callid, EOK, block_size);
    297298                        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;
    298303                default:
    299304                        retval = EINVAL;
     
    495500
    496501        d = &disk[disk_id];
    497         bc.h = 0;       /* Silence warning. */
     502       
     503        /* Silence warning. */
     504        memset(&bc, 0, sizeof(bc));
    498505
    499506        /* Compute block coordinates. */
     
    569576
    570577        d = &disk[disk_id];
    571         bc.h = 0;       /* Silence warning. */
     578       
     579        /* Silence warning. */
     580        memset(&bc, 0, sizeof(bc));
    572581
    573582        /* Compute block coordinates. */
Note: See TracChangeset for help on using the changeset viewer.