Changeset 195b7b3 in mainline for uspace/srv/hid/display/output.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/output.c

    r5271e4c r195b7b3  
    3838#include <fibril_synch.h>
    3939#include <io/kbd_event.h>
     40#include <io/log.h>
    4041#include <io/pos_event.h>
    4142#include <loc.h>
    42 #include <stdio.h>
    4343#include <stdlib.h>
    4444#include "ddev.h"
     
    6363            IPC_FLAG_BLOCKING);
    6464        if (rc != EOK) {
    65                 printf("Error looking up category 'display-device'.\n");
     65                log_msg(LOG_DEFAULT, LVL_ERROR,
     66                    "Error looking up category 'display-device'.\n");
    6667                return EIO;
    6768        }
     
    7273        rc = loc_category_get_svcs(ddev_cid, &svcs, &count);
    7374        if (rc != EOK) {
    74                 printf("Error getting list of display devices.\n");
     75                log_msg(LOG_DEFAULT, LVL_ERROR,
     76                    "Error getting list of display devices.\n");
    7577                return EIO;
    7678        }
     
    9092                        rc = ds_ddev_open(output->def_display, svcs[i], &nddev);
    9193                        if (rc != EOK) {
    92                                 printf("Error adding display device.\n");
     94                                log_msg(LOG_DEFAULT, LVL_ERROR,
     95                                    "Error adding display device.\n");
    9396                                continue;
    9497                        }
     
    9699                        list_append(&nddev->loutdevs, &output->ddevs);
    97100
    98                         printf("Added display device '%lu'\n",
     101                        log_msg(LOG_DEFAULT, LVL_NOTE,
     102                            "Added display device '%lu'\n",
    99103                            (unsigned long) svcs[i]);
    100104                }
     
    114118        ds_output_t *output = (ds_output_t *) arg;
    115119
    116         printf("ds_ddev_change_cb\n");
    117120        fibril_mutex_lock(&output->lock);
    118121        (void) ds_output_check_new_devs(output);
     
    151154        rc = loc_register_cat_change_cb(ds_ddev_change_cb, output);
    152155        if (rc != EOK) {
    153                 printf("Failed registering callback for device discovery.\n");
     156                log_msg(LOG_DEFAULT, LVL_ERROR,
     157                    "Failed registering callback for device discovery.\n");
    154158                return rc;
    155159        }
Note: See TracChangeset for help on using the changeset viewer.