Changeset ebcb05a in mainline for uspace/drv


Ignore:
Timestamp:
2011-04-01T19:00:51Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
969585f, ea53529
Parents:
bdbb6f6
Message:

Logging functions should append newline automatically. Since one has no
choice but to end log message with a newline, there is no need to do it
manually in every invocation.

Location:
uspace/drv
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/isa/isa.c

    rbdbb6f6 rebcb05a  
    135135        fd = open(conf_path, O_RDONLY);
    136136        if (fd < 0) {
    137                 ddf_msg(LVL_ERROR, "Unable to open %s\n", conf_path);
     137                ddf_msg(LVL_ERROR, "Unable to open %s", conf_path);
    138138                goto cleanup;
    139139        }
     
    144144        lseek(fd, 0, SEEK_SET);
    145145        if (len == 0) {
    146                 ddf_msg(LVL_ERROR, "Configuration file '%s' is empty.\n",
     146                ddf_msg(LVL_ERROR, "Configuration file '%s' is empty.",
    147147                    conf_path);
    148148                goto cleanup;
     
    151151        buf = malloc(len + 1);
    152152        if (buf == NULL) {
    153                 ddf_msg(LVL_ERROR, "Memory allocation failed.\n");
     153                ddf_msg(LVL_ERROR, "Memory allocation failed.");
    154154                goto cleanup;
    155155        }
    156156
    157157        if (0 >= read(fd, buf, len)) {
    158                 ddf_msg(LVL_ERROR, "Unable to read file '%s'.\n", conf_path);
     158                ddf_msg(LVL_ERROR, "Unable to read file '%s'.", conf_path);
    159159                goto cleanup;
    160160        }
     
    252252                fun->hw_resources.count++;
    253253
    254                 ddf_msg(LVL_NOTE, "Added irq 0x%x to function %s\n", irq,
     254                ddf_msg(LVL_NOTE, "Added irq 0x%x to function %s", irq,
    255255                    fun->fnode->name);
    256256        }
     
    271271
    272272                ddf_msg(LVL_NOTE, "Added io range (addr=0x%x, size=0x%x) to "
    273                     "function %s\n", (unsigned int) addr, (unsigned int) len,
     273                    "function %s", (unsigned int) addr, (unsigned int) len,
    274274                    fun->fnode->name);
    275275        }
     
    332332        if (val == end) {
    333333                ddf_msg(LVL_ERROR, "Cannot read match score for function "
    334                     "%s.\n", fun->fnode->name);
     334                    "%s.", fun->fnode->name);
    335335                return;
    336336        }
     
    339339        get_match_id(&id, val);
    340340        if (id == NULL) {
    341                 ddf_msg(LVL_ERROR, "Cannot read match ID for function %s.\n",
     341                ddf_msg(LVL_ERROR, "Cannot read match ID for function %s.",
    342342                    fun->fnode->name);
    343343                return;
     
    345345
    346346        ddf_msg(LVL_DEBUG, "Adding match id '%s' with score %d to "
    347             "function %s\n", id, score, fun->fnode->name);
     347            "function %s", id, score, fun->fnode->name);
    348348
    349349        rc = ddf_fun_add_match_id(fun->fnode, id, score);
    350350        if (rc != EOK) {
    351                 ddf_msg(LVL_ERROR, "Failed adding match ID: %s\n",
     351                ddf_msg(LVL_ERROR, "Failed adding match ID: %s",
    352352                    str_error(rc));
    353353        }
     
    379379            !prop_parse(fun, line, "match", &fun_parse_match_id)) {
    380380
    381                 ddf_msg(LVL_ERROR, "Undefined device property at line '%s'\n",
     381                ddf_msg(LVL_ERROR, "Undefined device property at line '%s'",
    382382                    line);
    383383        }
     
    441441        fun->fnode->ops = &isa_fun_ops;
    442442
    443         ddf_msg(LVL_DEBUG, "Binding function %s.\n", fun->fnode->name);
     443        ddf_msg(LVL_DEBUG, "Binding function %s.", fun->fnode->name);
    444444
    445445        /* XXX Handle error */
     
    469469static int isa_add_device(ddf_dev_t *dev)
    470470{
    471         ddf_msg(LVL_DEBUG, "isa_add_device, device handle = %d\n",
     471        ddf_msg(LVL_DEBUG, "isa_add_device, device handle = %d",
    472472            (int) dev->handle);
    473473
    474474        /* Make the bus device more visible. Does not do anything. */
    475         ddf_msg(LVL_DEBUG, "Adding a 'ctl' function\n");
     475        ddf_msg(LVL_DEBUG, "Adding a 'ctl' function");
    476476
    477477        ddf_fun_t *ctl = ddf_fun_create(dev, fun_exposed, "ctl");
    478478        if (ctl == NULL) {
    479                 ddf_msg(LVL_ERROR, "Failed creating control function.\n");
     479                ddf_msg(LVL_ERROR, "Failed creating control function.");
    480480                return EXDEV;
    481481        }
    482482
    483483        if (ddf_fun_bind(ctl) != EOK) {
    484                 ddf_msg(LVL_ERROR, "Failed binding control function.\n");
     484                ddf_msg(LVL_ERROR, "Failed binding control function.");
    485485                return EXDEV;
    486486        }
     
    488488        /* Add functions as specified in the configuration file. */
    489489        isa_functions_add(dev);
    490         ddf_msg(LVL_NOTE, "Finished enumerating legacy functions\n");
     490        ddf_msg(LVL_NOTE, "Finished enumerating legacy functions");
    491491
    492492        return EOK;
  • uspace/drv/ns8250/ns8250.c

    rbdbb6f6 rebcb05a  
    276276static bool ns8250_pio_enable(ns8250_t *ns)
    277277{
    278         ddf_msg(LVL_DEBUG, "ns8250_pio_enable %s\n", ns->dev->name);
     278        ddf_msg(LVL_DEBUG, "ns8250_pio_enable %s", ns->dev->name);
    279279       
    280280        /* Gain control over port's registers. */
     
    282282            (void **) &ns->port)) {
    283283                ddf_msg(LVL_ERROR, "Cannot map the port %#" PRIx32
    284                     " for device %s.\n", ns->io_addr, ns->dev->name);
     284                    " for device %s.", ns->io_addr, ns->dev->name);
    285285                return false;
    286286        }
     
    296296static bool ns8250_dev_probe(ns8250_t *ns)
    297297{
    298         ddf_msg(LVL_DEBUG, "ns8250_dev_probe %s\n", ns->dev->name);
     298        ddf_msg(LVL_DEBUG, "ns8250_dev_probe %s", ns->dev->name);
    299299       
    300300        ioport8_t *port_addr = ns->port;
     
    315315       
    316316        if (!res) {
    317                 ddf_msg(LVL_DEBUG, "Device %s is not present.\n",
     317                ddf_msg(LVL_DEBUG, "Device %s is not present.",
    318318                    ns->dev->name);
    319319        }
     
    329329static int ns8250_dev_initialize(ns8250_t *ns)
    330330{
    331         ddf_msg(LVL_DEBUG, "ns8250_dev_initialize %s\n", ns->dev->name);
     331        ddf_msg(LVL_DEBUG, "ns8250_dev_initialize %s", ns->dev->name);
    332332       
    333333        int ret = EOK;
     
    341341        if (ns->dev->parent_phone < 0) {
    342342                ddf_msg(LVL_ERROR, "Failed to connect to parent driver of "
    343                     "device %s.\n", ns->dev->name);
     343                    "device %s.", ns->dev->name);
    344344                ret = ns->dev->parent_phone;
    345345                goto failed;
     
    350350        if (ret != EOK) {
    351351                ddf_msg(LVL_ERROR, "Failed to get HW resources for device "
    352                     "%s.\n", ns->dev->name);
     352                    "%s.", ns->dev->name);
    353353                goto failed;
    354354        }
     
    365365                        ns->irq = res->res.interrupt.irq;
    366366                        irq = true;
    367                         ddf_msg(LVL_NOTE, "Device %s was asigned irq = 0x%x.\n",
     367                        ddf_msg(LVL_NOTE, "Device %s was asigned irq = 0x%x.",
    368368                            ns->dev->name, ns->irq);
    369369                        break;
     
    373373                        if (res->res.io_range.size < REG_COUNT) {
    374374                                ddf_msg(LVL_ERROR, "I/O range assigned to "
    375                                     "device %s is too small.\n", ns->dev->name);
     375                                    "device %s is too small.", ns->dev->name);
    376376                                ret = ELIMIT;
    377377                                goto failed;
     
    379379                        ioport = true;
    380380                        ddf_msg(LVL_NOTE, "Device %s was asigned I/O address = "
    381                             "0x%x.\n", ns->dev->name, ns->io_addr);
    382                         break;
     381                            "0x%x.", ns->dev->name, ns->io_addr);
     382                        break;
    383383                       
    384384                default:
     
    388388       
    389389        if (!irq || !ioport) {
    390                 ddf_msg(LVL_ERROR, "Missing HW resource(s) for device %s.\n",
     390                ddf_msg(LVL_ERROR, "Missing HW resource(s) for device %s.",
    391391                    ns->dev->name);
    392392                ret = ENOENT;
     
    473473       
    474474        if (baud_rate < 50 || MAX_BAUD_RATE % baud_rate != 0) {
    475                 ddf_msg(LVL_ERROR, "Invalid baud rate %d requested.\n",
     475                ddf_msg(LVL_ERROR, "Invalid baud rate %d requested.",
    476476                    baud_rate);
    477477                return EINVAL;
     
    658658                                if (!buf_push_back(&ns->input_buffer, val)) {
    659659                                        ddf_msg(LVL_WARN, "Buffer overflow on "
    660                                             "%s.\n", ns->dev->name);
     660                                            "%s.", ns->dev->name);
    661661                                } else {
    662662                                        ddf_msg(LVL_DEBUG2, "Character %c saved "
    663                                             "to the buffer of %s.\n",
     663                                            "to the buffer of %s.",
    664664                                            val, ns->dev->name);
    665665                                }
     
    717717        int rc;
    718718       
    719         ddf_msg(LVL_DEBUG, "ns8250_add_device %s (handle = %d)\n",
     719        ddf_msg(LVL_DEBUG, "ns8250_add_device %s (handle = %d)",
    720720            dev->name, (int) dev->handle);
    721721       
     
    752752        /* Register interrupt handler. */
    753753        if (ns8250_register_interrupt_handler(ns) != EOK) {
    754                 ddf_msg(LVL_ERROR, "Failed to register interrupt handler.\n");
     754                ddf_msg(LVL_ERROR, "Failed to register interrupt handler.");
    755755                rc = EADDRNOTAVAIL;
    756756                goto fail;
     
    761761        if (rc != EOK) {
    762762                ddf_msg(LVL_ERROR, "Failed to enable the interrupt. Error code = "
    763                     "%d.\n", rc);
     763                    "%d.", rc);
    764764                goto fail;
    765765        }
     
    767767        fun = ddf_fun_create(dev, fun_exposed, "a");
    768768        if (fun == NULL) {
    769                 ddf_msg(LVL_ERROR, "Failed creating function.\n");
     769                ddf_msg(LVL_ERROR, "Failed creating function.");
    770770                goto fail;
    771771        }
     
    775775        rc = ddf_fun_bind(fun);
    776776        if (rc != EOK) {
    777                 ddf_msg(LVL_ERROR, "Failed binding function.\n");
     777                ddf_msg(LVL_ERROR, "Failed binding function.");
    778778                goto fail;
    779779        }
     
    783783        ddf_fun_add_to_class(fun, "serial");
    784784       
    785         ddf_msg(LVL_NOTE, "Device %s successfully initialized.\n",
     785        ddf_msg(LVL_NOTE, "Device %s successfully initialized.",
    786786            dev->name);
    787787       
     
    866866       
    867867        ddf_msg(LVL_DEBUG, "ns8250_get_props: baud rate %d, parity 0x%x, word "
    868             "length %d, stop bits %d\n", *baud_rate, *parity, *word_length,
     868            "length %d, stop bits %d", *baud_rate, *parity, *word_length,
    869869            *stop_bits);
    870870}
     
    883883{
    884884        ddf_msg(LVL_DEBUG, "ns8250_set_props: baud rate %d, parity 0x%x, word "
    885             "length %d, stop bits %d\n", baud_rate, parity, word_length,
     885            "length %d, stop bits %d", baud_rate, parity, word_length,
    886886            stop_bits);
    887887       
  • uspace/drv/pciintel/pci.c

    rbdbb6f6 rebcb05a  
    226226
    227227        if (match_id_str == NULL) {
    228                 ddf_msg(LVL_ERROR, "Out of memory creating match ID.\n");
     228                ddf_msg(LVL_ERROR, "Out of memory creating match ID.");
    229229                return;
    230230        }
     
    232232        rc = ddf_fun_add_match_id(fun->fnode, match_id_str, 90);
    233233        if (rc != EOK) {
    234                 ddf_msg(LVL_ERROR, "Failed adding match ID: %s\n",
     234                ddf_msg(LVL_ERROR, "Failed adding match ID: %s",
    235235                    str_error(rc));
    236236        }
     
    325325        if (range_addr != 0) {
    326326                ddf_msg(LVL_DEBUG, "Function %s : address = %" PRIx64
    327                     ", size = %x\n", fun->fnode->name, range_addr,
     327                    ", size = %x", fun->fnode->name, range_addr,
    328328                    (unsigned int) range_size);
    329329        }
     
    351351        hw_res_list->count++;
    352352       
    353         ddf_msg(LVL_NOTE, "Function %s uses irq %x.\n", fun->fnode->name, irq);
     353        ddf_msg(LVL_NOTE, "Function %s uses irq %x.", fun->fnode->name, irq);
    354354}
    355355
     
    407407                        char *fun_name = pci_fun_create_name(fun);
    408408                        if (fun_name == NULL) {
    409                                 ddf_msg(LVL_ERROR, "Out of memory.\n");
     409                                ddf_msg(LVL_ERROR, "Out of memory.");
    410410                                return;
    411411                        }
     
    413413                        fnode = ddf_fun_create(bus->dnode, fun_inner, fun_name);
    414414                        if (fnode == NULL) {
    415                                 ddf_msg(LVL_ERROR, "Failed creating function.\n");
     415                                ddf_msg(LVL_ERROR, "Failed creating function.");
    416416                                return;
    417417                        }
     
    427427                        fnode->driver_data = fun;
    428428                       
    429                         ddf_msg(LVL_DEBUG, "Adding new function %s.\n",
     429                        ddf_msg(LVL_DEBUG, "Adding new function %s.",
    430430                            fnode->name);
    431431                       
     
    445445                                    PCI_BRIDGE_SEC_BUS_NUM);
    446446                                ddf_msg(LVL_DEBUG, "Device is pci-to-pci "
    447                                     "bridge, secondary bus number = %d.\n",
     447                                    "bridge, secondary bus number = %d.",
    448448                                    bus_num);
    449449                                if (child_bus > bus_num)
     
    468468        int rc;
    469469       
    470         ddf_msg(LVL_DEBUG, "pci_add_device\n");
     470        ddf_msg(LVL_DEBUG, "pci_add_device");
    471471        dnode->parent_phone = -1;
    472472       
    473473        bus = pci_bus_new();
    474474        if (bus == NULL) {
    475                 ddf_msg(LVL_ERROR, "pci_add_device allocation failed.\n");
     475                ddf_msg(LVL_ERROR, "pci_add_device allocation failed.");
    476476                rc = ENOMEM;
    477477                goto fail;
     
    484484        if (dnode->parent_phone < 0) {
    485485                ddf_msg(LVL_ERROR, "pci_add_device failed to connect to the "
    486                     "parent's driver.\n");
     486                    "parent's driver.");
    487487                rc = dnode->parent_phone;
    488488                goto fail;
     
    494494        if (rc != EOK) {
    495495                ddf_msg(LVL_ERROR, "pci_add_device failed to get hw resources "
    496                     "for the device.\n");
     496                    "for the device.");
    497497                goto fail;
    498498        }
    499499        got_res = true;
    500500       
    501         ddf_msg(LVL_DEBUG, "conf_addr = %" PRIx64 ".\n",
     501        ddf_msg(LVL_DEBUG, "conf_addr = %" PRIx64 ".",
    502502            hw_resources.resources[0].res.io_range.address);
    503503       
     
    511511        if (pio_enable((void *)(uintptr_t)bus->conf_io_addr, 8,
    512512            &bus->conf_addr_port)) {
    513                 ddf_msg(LVL_ERROR, "Failed to enable configuration ports.\n");
     513                ddf_msg(LVL_ERROR, "Failed to enable configuration ports.");
    514514                rc = EADDRNOTAVAIL;
    515515                goto fail;
     
    518518       
    519519        /* Make the bus device more visible. It has no use yet. */
    520         ddf_msg(LVL_DEBUG, "Adding a 'ctl' function\n");
     520        ddf_msg(LVL_DEBUG, "Adding a 'ctl' function");
    521521       
    522522        ctl = ddf_fun_create(bus->dnode, fun_exposed, "ctl");
    523523        if (ctl == NULL) {
    524                 printf(NAME ": error creating control function.\n");
     524                ddf_msg(LVL_ERROR, "Failed creating control function.");
    525525                rc = ENOMEM;
    526526                goto fail;
     
    529529        rc = ddf_fun_bind(ctl);
    530530        if (rc != EOK) {
    531                 printf(NAME ": error binding control function.\n");
     531                ddf_msg(LVL_ERROR, "Failed binding control function.");
    532532                goto fail;
    533533        }
    534534       
    535535        /* Enumerate functions. */
    536         ddf_msg(LVL_DEBUG, "Scanning the bus\n");
     536        ddf_msg(LVL_DEBUG, "Scanning the bus");
    537537        pci_bus_scan(bus, 0);
    538538       
     
    634634int main(int argc, char *argv[])
    635635{
    636         printf(NAME ": HelenOS pci bus driver (intel method 1).\n");
     636        printf(NAME ": HelenOS PCI bus driver (Intel method 1).\n");
    637637        pciintel_init();
    638638        return ddf_driver_main(&pci_driver);
  • uspace/drv/root/root.c

    rbdbb6f6 rebcb05a  
    9191
    9292        ddf_msg(LVL_DEBUG, "Adding new function for virtual devices. "
    93             "Function node is `%s' (%d %s)\n", name,
     93            "Function node is `%s' (%d %s)", name,
    9494            VIRTUAL_FUN_MATCH_SCORE, VIRTUAL_FUN_MATCH_ID);
    9595
    9696        fun = ddf_fun_create(dev, fun_inner, name);
    9797        if (fun == NULL) {
    98                 ddf_msg(LVL_ERROR, "Failed creating function %s\n", name);
     98                ddf_msg(LVL_ERROR, "Failed creating function %s", name);
    9999                return ENOMEM;
    100100        }
     
    103103            VIRTUAL_FUN_MATCH_SCORE);
    104104        if (rc != EOK) {
    105                 ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s\n", name);
     105                ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s",
     106                    name);
    106107                ddf_fun_destroy(fun);
    107108                return rc;
     
    110111        rc = ddf_fun_bind(fun);
    111112        if (rc != EOK) {
    112                 ddf_msg(LVL_ERROR, "Failed binding function %s: %s\n", name,
     113                ddf_msg(LVL_ERROR, "Failed binding function %s: %s", name,
    113114                    str_error(rc));
    114115                ddf_fun_destroy(fun);
     
    137138        platform = sysinfo_get_data("platform", &platform_size);
    138139        if (platform == NULL) {
    139                 ddf_msg(LVL_ERROR, "Failed to obtain platform name.\n");
     140                ddf_msg(LVL_ERROR, "Failed to obtain platform name.");
    140141                return ENOENT;
    141142        }
     
    144145        platform = realloc(platform, platform_size + 1);
    145146        if (platform == NULL) {
    146                 ddf_msg(LVL_ERROR, "Memory allocation failed.\n");
     147                ddf_msg(LVL_ERROR, "Memory allocation failed.");
    147148                return ENOMEM;
    148149        }
     
    152153        /* Construct match ID. */
    153154        if (asprintf(&match_id, PLATFORM_FUN_MATCH_ID_FMT, platform) == -1) {
    154                 ddf_msg(LVL_ERROR, "Memory allocation failed.\n");
     155                ddf_msg(LVL_ERROR, "Memory allocation failed.");
    155156                return ENOMEM;
    156157        }
     
    158159        /* Add function. */
    159160        ddf_msg(LVL_DEBUG, "Adding platform function. Function node is `%s' "
    160             " (%d %s)\n", PLATFORM_FUN_NAME, PLATFORM_FUN_MATCH_SCORE,
     161            " (%d %s)", PLATFORM_FUN_NAME, PLATFORM_FUN_MATCH_SCORE,
    161162            match_id);
    162163
    163164        fun = ddf_fun_create(dev, fun_inner, name);
    164165        if (fun == NULL) {
    165                 ddf_msg(LVL_ERROR, "Error creating function %s\n", name);
     166                ddf_msg(LVL_ERROR, "Error creating function %s", name);
    166167                return ENOMEM;
    167168        }
     
    169170        rc = ddf_fun_add_match_id(fun, match_id, PLATFORM_FUN_MATCH_SCORE);
    170171        if (rc != EOK) {
    171                 ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s\n",
     172                ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s",
    172173                    name);
    173174                ddf_fun_destroy(fun);
     
    177178        rc = ddf_fun_bind(fun);
    178179        if (rc != EOK) {
    179                 ddf_msg(LVL_ERROR, "Failed binding function %s: %s\n", name,
     180                ddf_msg(LVL_ERROR, "Failed binding function %s: %s", name,
    180181                    str_error(rc));
    181182                ddf_fun_destroy(fun);
     
    193194static int root_add_device(ddf_dev_t *dev)
    194195{
    195         ddf_msg(LVL_DEBUG, "root_add_device, device handle=%" PRIun "\n",
     196        ddf_msg(LVL_DEBUG, "root_add_device, device handle=%" PRIun,
    196197            dev->handle);
    197198
     
    206207        int res = add_platform_fun(dev);
    207208        if (EOK != res)
    208                 ddf_msg(LVL_ERROR, "Failed adding child device for platform.\n");
     209                ddf_msg(LVL_ERROR, "Failed adding child device for platform.");
    209210
    210211        return res;
  • uspace/drv/rootpc/rootpc.c

    rbdbb6f6 rebcb05a  
    120120    rootpc_fun_t *fun)
    121121{
    122         ddf_msg(LVL_DEBUG, "Adding new function '%s'.\n", name);
     122        ddf_msg(LVL_DEBUG, "Adding new function '%s'.", name);
    123123       
    124124        ddf_fun_t *fnode = NULL;
     
    146146        /* Register function. */
    147147        if (ddf_fun_bind(fnode) != EOK) {
    148                 ddf_msg(LVL_ERROR, "Failed binding function %s.\n", name);
     148                ddf_msg(LVL_ERROR, "Failed binding function %s.", name);
    149149                goto failure;
    150150        }
     
    159159                ddf_fun_destroy(fnode);
    160160       
    161         ddf_msg(LVL_ERROR, "Failed adding function '%s'.\n", name);
     161        ddf_msg(LVL_ERROR, "Failed adding function '%s'.", name);
    162162       
    163163        return false;
     
    177177static int rootpc_add_device(ddf_dev_t *dev)
    178178{
    179         ddf_msg(LVL_DEBUG, "rootpc_add_device, device handle = %d\n",
     179        ddf_msg(LVL_DEBUG, "rootpc_add_device, device handle = %d",
    180180            (int)dev->handle);
    181181       
    182182        /* Register functions. */
    183183        if (!rootpc_add_functions(dev)) {
    184                 ddf_msg(LVL_ERROR, "Failed to add functions for PC platform.\n");
     184                ddf_msg(LVL_ERROR, "Failed to add functions for PC platform.");
    185185        }
    186186       
  • uspace/drv/rootvirt/rootvirt.c

    rbdbb6f6 rebcb05a  
    8484        int rc;
    8585
    86         ddf_msg(LVL_DEBUG, "Registering function `%s' (match \"%s\")\n",
     86        ddf_msg(LVL_DEBUG, "Registering function `%s' (match \"%s\")",
    8787            vfun->name, vfun->match_id);
    8888
    8989        fun = ddf_fun_create(vdev, fun_inner, vfun->name);
    9090        if (fun == NULL) {
    91                 ddf_msg(LVL_ERROR, "Failed creating function %s\n", vfun->name);
     91                ddf_msg(LVL_ERROR, "Failed creating function %s", vfun->name);
    9292                return ENOMEM;
    9393        }
     
    9595        rc = ddf_fun_add_match_id(fun, vfun->match_id, 10);
    9696        if (rc != EOK) {
    97                 ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s\n",
     97                ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s",
    9898                    vfun->name);
    9999                ddf_fun_destroy(fun);
     
    103103        rc = ddf_fun_bind(fun);
    104104        if (rc != EOK) {
    105                 ddf_msg(LVL_ERROR, "Failed binding function %s: %s\n", vfun->name,
    106                     str_error(rc));
     105                ddf_msg(LVL_ERROR, "Failed binding function %s: %s",
     106                    vfun->name, str_error(rc));
    107107                ddf_fun_destroy(fun);
    108108                return rc;
    109109        }
    110110
    111         ddf_msg(LVL_NOTE, "Registered child device `%s'\n", vfun->name);
     111        ddf_msg(LVL_NOTE, "Registered child device `%s'", vfun->name);
    112112        return EOK;
    113113}
     
    125125        }
    126126
    127         ddf_msg(LVL_DEBUG, "add_device(handle=%d)\n", (int)dev->handle);
     127        ddf_msg(LVL_DEBUG, "add_device(handle=%d)", (int)dev->handle);
    128128
    129129        /*
  • uspace/drv/test1/test1.c

    rbdbb6f6 rebcb05a  
    6565        int rc;
    6666
    67         ddf_msg(LVL_DEBUG, "Registering function `%s': %s.\n", name, message);
     67        ddf_msg(LVL_DEBUG, "Registering function `%s': %s.", name, message);
    6868
    6969        fun = ddf_fun_create(parent, fun_inner, name);
    7070        if (fun == NULL) {
    71                 ddf_msg(LVL_ERROR, "Failed creating function %s\n", name);
     71                ddf_msg(LVL_ERROR, "Failed creating function %s", name);
    7272                rc = ENOMEM;
    7373                goto leave;
     
    7676        rc = ddf_fun_add_match_id(fun, str_dup(match_id), match_score);
    7777        if (rc != EOK) {
    78                 ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s\n",
     78                ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s",
    7979                    name);
    8080                goto leave;
     
    8383        rc = ddf_fun_bind(fun);
    8484        if (rc != EOK) {
    85                 ddf_msg(LVL_ERROR, "Failed binding function %s: %s\n", name,
     85                ddf_msg(LVL_ERROR, "Failed binding function %s: %s", name,
    8686                    str_error(rc));
    8787                goto leave;
    8888        }
    8989
    90         ddf_msg(LVL_NOTE, "Registered child device `%s'\n", name);
     90        ddf_msg(LVL_NOTE, "Registered child device `%s'", name);
    9191        rc = EOK;
    9292
     
    128128        int rc;
    129129
    130         ddf_msg(LVL_DEBUG, "add_device(name=\"%s\", handle=%d)\n",
     130        ddf_msg(LVL_DEBUG, "add_device(name=\"%s\", handle=%d)",
    131131            dev->name, (int) dev->handle);
    132132
    133133        fun_a = ddf_fun_create(dev, fun_exposed, "a");
    134134        if (fun_a == NULL) {
    135                 ddf_msg(LVL_ERROR, "Failed creating function 'a'.\n");
     135                ddf_msg(LVL_ERROR, "Failed creating function 'a'.");
    136136                return ENOMEM;
    137137        }
     
    139139        rc = ddf_fun_bind(fun_a);
    140140        if (rc != EOK) {
    141                 ddf_msg(LVL_ERROR, "Failed binding function 'a'.\n");
     141                ddf_msg(LVL_ERROR, "Failed binding function 'a'.");
    142142                return rc;
    143143        }
     
    161161        }
    162162
    163         ddf_msg(LVL_DEBUG, "Device `%s' accepted.\n", dev->name);
     163        ddf_msg(LVL_DEBUG, "Device `%s' accepted.", dev->name);
    164164
    165165        return EOK;
  • uspace/drv/test2/test2.c

    rbdbb6f6 rebcb05a  
    6565        int rc;
    6666
    67         ddf_msg(LVL_DEBUG, "Registering function `%s': %s.\n", name, message);
     67        ddf_msg(LVL_DEBUG, "Registering function `%s': %s.", name, message);
    6868
    6969        fun = ddf_fun_create(parent, fun_inner, name);
    7070        if (fun == NULL) {
    71                 ddf_msg(LVL_ERROR, "Failed creating function %s\n", name);
     71                ddf_msg(LVL_ERROR, "Failed creating function %s", name);
    7272                return ENOMEM;
    7373        }
     
    7575        rc = ddf_fun_add_match_id(fun, match_id, match_score);
    7676        if (rc != EOK) {
    77                 ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s\n",
     77                ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s",
    7878                    name);
    7979                ddf_fun_destroy(fun);
     
    8383        rc = ddf_fun_bind(fun);
    8484        if (rc != EOK) {
    85                 ddf_msg(LVL_ERROR, "Failed binding function %s: %s\n", name,
     85                ddf_msg(LVL_ERROR, "Failed binding function %s: %s", name,
    8686                    str_error(rc));
    8787                ddf_fun_destroy(fun);
     
    8989        }
    9090
    91         ddf_msg(LVL_NOTE, "Registered child device `%s'\n", name);
     91        ddf_msg(LVL_NOTE, "Registered child device `%s'", name);
    9292        return EOK;
    9393}
     
    113113        fun_a = ddf_fun_create(dev, fun_exposed, "a");
    114114        if (fun_a == NULL) {
    115                 ddf_msg(LVL_ERROR, "Failed creating function 'a'.\n");
     115                ddf_msg(LVL_ERROR, "Failed creating function 'a'.");
    116116                return ENOMEM;
    117117        }
     
    119119        rc = ddf_fun_bind(fun_a);
    120120        if (rc != EOK) {
    121                 ddf_msg(LVL_ERROR, "Failed binding function 'a'.\n");
     121                ddf_msg(LVL_ERROR, "Failed binding function 'a'.");
    122122                return rc;
    123123        }
     
    130130static int test2_add_device(ddf_dev_t *dev)
    131131{
    132         ddf_msg(LVL_DEBUG, "test2_add_device(name=\"%s\", handle=%d)\n",
     132        ddf_msg(LVL_DEBUG, "test2_add_device(name=\"%s\", handle=%d)",
    133133            dev->name, (int) dev->handle);
    134134
     
    136136                fid_t postpone = fibril_create(postponed_birth, dev);
    137137                if (postpone == 0) {
    138                         ddf_msg(LVL_ERROR, "fibril_create() failed.\n");
     138                        ddf_msg(LVL_ERROR, "fibril_create() failed.");
    139139                        return ENOMEM;
    140140                }
Note: See TracChangeset for help on using the changeset viewer.