Changeset 195b7b3 in mainline for uspace/srv/hid/display/ddev.c


Ignore:
Timestamp:
2020-06-22T15:25:48Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c8e1f93
Parents:
5271e4c
Message:

Clean up debug messages and logging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/ddev.c

    r5271e4c r195b7b3  
    3838#include <errno.h>
    3939#include <io/log.h>
    40 #include <stdio.h>
    4140#include <stdlib.h>
    4241#include "display.h"
     
    10099        rc = loc_service_get_name(svc_id, &name);
    101100        if (rc != EOK) {
    102                 printf("Error resolving name of service %lu.\n",
     101                log_msg(LOG_DEFAULT, LVL_ERROR,
     102                    "Error resolving name of service %lu.\n",
    103103                    (unsigned long) svc_id);
    104104                return rc;
     
    107107        rc = ddev_open(name, &dd);
    108108        if (rc != EOK) {
    109                 printf("Error opening display device '%s'.\n", name);
     109                log_msg(LOG_DEFAULT, LVL_ERROR,
     110                    "Error opening display device '%s'.\n", name);
    110111                free(name);
    111112                return rc;
     
    114115        rc = ddev_get_info(dd, &info);
    115116        if (rc != EOK) {
    116                 printf("Error getting information for display device '%s'.\n",
     117                log_msg(LOG_DEFAULT, LVL_ERROR,
     118                    "Error getting information for display device '%s'.\n",
    117119                    name);
    118120                free(name);
     
    121123        }
    122124
    123         log_msg(LOG_DEFAULT, LVL_NOTE, "Device rectangle for '%s': "
     125        log_msg(LOG_DEFAULT, LVL_DEBUG, "Device rectangle for '%s': "
    124126            "%d,%d,%d,%d\n", name, info.rect.p0.x, info.rect.p0.y,
    125127            info.rect.p1.x, info.rect.p1.y);
     
    127129        rc = ddev_get_gc(dd, &gc);
    128130        if (rc != EOK) {
    129                 printf("Error getting device context for '%s'.\n", name);
     131                log_msg(LOG_DEFAULT, LVL_ERROR,
     132                    "Error getting device context for '%s'.\n", name);
    130133                ddev_close(dd);
    131134                free(name);
Note: See TracChangeset for help on using the changeset viewer.