Changeset ebcb05a in mainline for uspace/drv/isa/isa.c


Ignore:
Timestamp:
2011-04-01T19:00:51Z (14 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.

File:
1 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;
Note: See TracChangeset for help on using the changeset viewer.