Changeset dd8ab1c in mainline for uspace/drv


Ignore:
Timestamp:
2017-12-10T21:08:11Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
68e5406
Parents:
1afa94d
Message:

More str_error() additions.

Location:
uspace/drv
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/audio/hdaudio/codec.c

    r1afa94d rdd8ab1c  
    3737#include <ddf/log.h>
    3838#include <errno.h>
     39#include <str_error.h>
    3940#include <stdlib.h>
    4041
     
    514515                goto error;
    515516
    516         ddf_msg(LVL_NOTE, "hda_get_subnc -> %d", rc);
     517        ddf_msg(LVL_NOTE, "hda_get_subnc -> %s", str_error_name(rc));
    517518        ddf_msg(LVL_NOTE, "sfg=%d nfg=%d", sfg, nfg);
    518519
     
    524525                        goto error;
    525526
    526                 ddf_msg(LVL_NOTE, "hda_get_fgrp_type -> %d", rc);
     527                ddf_msg(LVL_NOTE, "hda_get_fgrp_type -> %s", str_error_name(rc));
    527528                ddf_msg(LVL_NOTE, "unsol: %d, grptype: %d", unsol, grptype);
    528529
     
    546547                        goto error;
    547548
    548                 ddf_msg(LVL_NOTE, "hda_get_subnc -> %d", rc);
     549                ddf_msg(LVL_NOTE, "hda_get_subnc -> %s", str_error_name(rc));
    549550                ddf_msg(LVL_NOTE, "saw=%d baw=%d", saw, naw);
    550551
  • uspace/drv/audio/hdaudio/hdaudio.c

    r1afa94d rdd8ab1c  
    267267            hdaudio_interrupt, &irq_code, &irq_cap);
    268268        if (rc != EOK) {
    269                 ddf_msg(LVL_ERROR, "Failed registering interrupt handler. (%d)",
    270                     rc);
     269                ddf_msg(LVL_ERROR, "Failed registering interrupt handler: %s",
     270                    str_error_name(rc));
    271271                goto error;
    272272        }
     
    314314        hw_res_list_parsed_clean(&res);
    315315
    316         ddf_msg(LVL_NOTE, "Failing hda_dev_add() -> %d", rc);
     316        ddf_msg(LVL_NOTE, "Failing hda_dev_add() -> %s", str_error_name(rc));
    317317        return rc;
    318318}
  • uspace/drv/audio/hdaudio/stream.c

    r1afa94d rdd8ab1c  
    3939#include <ddi.h>
    4040#include <errno.h>
     41#include <str_error.h>
    4142#include <macros.h>
    4243#include <stdlib.h>
     
    122123            0, &buffer_phys, &buffer);
    123124        if (rc != EOK) {
    124                 ddf_msg(LVL_NOTE, "dmamem_map_anon -> %d", rc);
     125                ddf_msg(LVL_NOTE, "dmamem_map_anon -> %s", str_error_name(rc));
    125126                goto error;
    126127        }
  • uspace/drv/char/ns8250/ns8250.c

    r1afa94d rdd8ab1c  
    4040#include <stdio.h>
    4141#include <errno.h>
     42#include <str_error.h>
    4243#include <stdbool.h>
    4344#include <fibril_synch.h>
     
    887888        if (rc != EOK) {
    888889                ddf_msg(LVL_ERROR, "Failed to enable the interrupt. Error code = "
    889                     "%d.", rc);
     890                    "%s.", str_error_name(rc));
    890891                goto fail;
    891892        }
  • uspace/drv/char/pl050/pl050.c

    r1afa94d rdd8ab1c  
    217217            res.irqs.irqs[0], pl050_interrupt, &pl050_irq_code, &irq_cap);
    218218        if (rc != EOK) {
    219                 ddf_msg(LVL_ERROR, "Failed registering interrupt handler. (%d)",
    220                     rc);
     219                ddf_msg(LVL_ERROR, "Failed registering interrupt handler. (%s)",
     220                    str_error_name(rc));
    221221                goto error;
    222222        }
  • uspace/drv/char/sun4v-con/sun4v-con.c

    r1afa94d rdd8ab1c  
    3636#include <ddi.h>
    3737#include <errno.h>
     38#include <str_error.h>
    3839#include <io/chardev_srv.h>
    3940#include <stdbool.h>
     
    9293            (void *) &con->input_buffer);
    9394        if (rc != EOK) {
    94                 ddf_msg(LVL_ERROR, "Error mapping memory: %d", rc);
     95                ddf_msg(LVL_ERROR, "Error mapping memory: %s", str_error_name(rc));
    9596                goto error;
    9697        }
     
    101102            (void *) &con->output_buffer);
    102103        if (rc != EOK) {
    103                 ddf_msg(LVL_ERROR, "Error mapping memory: %d", rc);
     104                ddf_msg(LVL_ERROR, "Error mapping memory: %s", str_error_name(rc));
    104105                return rc;
    105106        }
  • uspace/drv/hid/ps2mouse/ps2mouse.c

    r1afa94d rdd8ab1c  
    3636#include <stdbool.h>
    3737#include <errno.h>
     38#include <str_error.h>
    3839#include <ddf/log.h>
    3940#include <io/keycode.h>
     
    7879        const int rc = chardev_read((mouse)->chardev, &data, 1, &nread); \
    7980        if (rc != EOK) { \
    80                 ddf_msg(LVL_ERROR, "Failed reading byte: %d", rc);\
     81                ddf_msg(LVL_ERROR, "Failed reading byte: %s", str_error_name(rc));\
    8182                return rc; \
    8283        } \
     
    9596        const int rc = chardev_write((mouse)->chardev, &data, 1, &nwr); \
    9697        if (rc != EOK) { \
    97                 ddf_msg(LVL_ERROR, "Failed writing byte: %d", rc); \
     98                ddf_msg(LVL_ERROR, "Failed writing byte: %s", str_error_name(rc)); \
    9899                return rc; \
    99100        } \
  • uspace/drv/intctl/apic/apic.c

    r1afa94d rdd8ab1c  
    221221        rc = pio_enable((void *) res->base, IO_APIC_SIZE, &regs);
    222222        if (rc != EOK) {
    223                 printf("%s: Failed to enable PIO for APIC: %d\n", NAME, rc);
     223                printf("%s: Failed to enable PIO for APIC: %s\n", NAME, str_error(rc));
    224224                return EIO;
    225225        }
  • uspace/drv/nic/ar9271/ar9271.c

    r1afa94d rdd8ab1c  
    4242#include <ddf/interrupt.h>
    4343#include <errno.h>
     44#include <str_error.h>
    4445#include <nic.h>
    4546#include <macros.h>
     
    784785                        free(buffer);
    785786                        usb_log_error("Error while uploading firmware. "
    786                             "Error: %d\n", rc);
     787                            "Error: %s\n", str_error_name(rc));
    787788                        return rc;
    788789                }
     
    836837        if (rc != EOK) {
    837838                usb_log_error("Failed to create USB device: %s, "
    838                     "ERR_NUM = %d\n", err_msg, rc);
     839                    "ERR_NUM = %s\n", err_msg, str_error_name(rc));
    839840                return NULL;
    840841        }
     
    853854        if (rc != EOK) {
    854855                free(ar9271);
    855                 usb_log_error("Failed to initialize AR9271 structure: %d\n",
    856                     rc);
     856                usb_log_error("Failed to initialize AR9271 structure: %s\n",
     857                    str_error_name(rc));
    857858                return NULL;
    858859        }
  • uspace/drv/nic/ar9271/htc.c

    r1afa94d rdd8ab1c  
    3636#include <byteorder.h>
    3737#include <errno.h>
     38#include <str_error.h>
    3839#include "wmi.h"
    3940#include "htc.h"
     
    264265        if (rc != EOK) {
    265266                free(buffer);
    266                 usb_log_error("Failed to send HTC message. Error: %d\n", rc);
     267                usb_log_error("Failed to send HTC message. Error: %s\n", str_error_name(rc));
    267268                return rc;
    268269        }
     
    278279                free(buffer);
    279280                usb_log_error("Failed to receive HTC service connect response. "
    280                     "Error: %d\n", rc);
     281                    "Error: %s\n", str_error_name(rc));
    281282                return rc;
    282283        }
     
    331332                free(buffer);
    332333                usb_log_error("Failed to send HTC config message. "
    333                     "Error: %d\n", rc);
     334                    "Error: %s\n", str_error_name(rc));
    334335                return rc;
    335336        }
     
    344345        if (rc != EOK) {
    345346                usb_log_error("Failed to receive HTC config response message. "
    346                     "Error: %d\n", rc);
     347                    "Error: %s\n", str_error_name(rc));
    347348        }
    348349       
     
    376377        if (rc != EOK)
    377378                usb_log_error("Failed to send HTC setup complete message. "
    378                     "Error: %d\n", rc);
     379                    "Error: %s\n", str_error_name(rc));
    379380       
    380381        free(buffer);
     
    404405                free(buffer);
    405406                usb_log_error("Failed to receive HTC check ready message. "
    406                     "Error: %d\n", rc);
     407                    "Error: %s\n", str_error_name(rc));
    407408                return rc;
    408409        }
  • uspace/drv/nic/ar9271/wmi.c

    r1afa94d rdd8ab1c  
    3535#include <usb/debug.h>
    3636#include <errno.h>
     37#include <str_error.h>
    3738#include <stdlib.h>
    3839#include <mem.h>
     
    245246        if (rc != EOK) {
    246247                free(buffer);
    247                 usb_log_error("Failed to send WMI message. Error: %d\n", rc);
     248                usb_log_error("Failed to send WMI message. Error: %s\n", str_error_name(rc));
    248249                return rc;
    249250        }
     
    268269                        free(buffer);
    269270                        usb_log_error("Failed to receive WMI message response. "
    270                             "Error: %d\n", rc);
     271                            "Error: %s\n", str_error_name(rc));
    271272                        return rc;
    272273                }
  • uspace/drv/nic/rtl8169/driver.c

    r1afa94d rdd8ab1c  
    3030#include <async.h>
    3131#include <errno.h>
     32#include <str_error.h>
    3233#include <align.h>
    3334#include <byteorder.h>
     
    430431        rc = rtl8169_register_int_handler(nic_data, &irq_cap);
    431432        if (rc != EOK) {
    432                 ddf_msg(LVL_ERROR, "Failed to register IRQ handler (%d)", rc);
     433                ddf_msg(LVL_ERROR, "Failed to register IRQ handler (%s)", str_error_name(rc));
    433434                goto err_irq;
    434435        }
     
    706707        rc = rtl8169_allocate_buffers(rtl8169);
    707708        if (rc != EOK) {
    708                 ddf_msg(LVL_ERROR, "Error allocating buffers: %d", rc);
     709                ddf_msg(LVL_ERROR, "Error allocating buffers: %s", str_error_name(rc));
    709710                return 0;
    710711        }
Note: See TracChangeset for help on using the changeset viewer.