Changeset ebcb05a in mainline for uspace/drv/test1/test1.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/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;
Note: See TracChangeset for help on using the changeset viewer.