Ignore:
Timestamp:
2017-12-08T21:03:35Z (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:
f77c1c9
Parents:
9eb1ff5
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-07 18:20:13)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 21:03:35)
Message:

Add str_error() in numerous places.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/wifi_supplicant/wifi_supplicant.c

    r9eb1ff5 rc1694b6b  
    4141#include <stdio.h>
    4242#include <stdlib.h>
     43#include <str_error.h>
    4344#include <loc.h>
    4445
     
    139140        int rc = get_wifi_list(&wifis, &count);
    140141        if (rc != EOK) {
    141                 printf("Error fetching wifi list.\n");
     142                printf("Error fetching wifi list: %s\n", str_error(rc));
    142143                return EINVAL;
    143144        }
     
    148149                rc = loc_service_get_name(wifis[i], &svc_name);
    149150                if (rc != EOK) {
    150                         printf("Error getting service name.\n");
     151                        printf("Error getting service name: %s\n", str_error(rc));
    151152                        free(wifis);
    152153                        return rc;
     
    177178                        printf("Device is not ready yet.\n");
    178179                else
    179                         printf("Error when disconnecting device. "
    180                             "Error: %d\n", rc);
     180                        printf("Error when disconnecting device: %s\n",
     181                            str_error(rc));
    181182               
    182183                return rc;
     
    192193                        printf("Given SSID not in scan results.\n");
    193194                else
    194                         printf("Error when connecting to network. "
    195                             "Error: %d\n", rc);
     195                        printf("Error when connecting to network: %s\n",
     196                            str_error(rc));
    196197               
    197198                return rc;
     
    221222                        printf("Not connected to any WiFi network.\n");
    222223                else
    223                         printf("Error when disconnecting from network. "
    224                             "Error: %d\n", rc);
     224                        printf("Error when disconnecting from network: %s\n",
     225                            str_error(rc));
    225226               
    226227                return rc;
     
    247248                        printf("Device is not ready yet.\n");
    248249                else
    249                         printf("Failed to fetch scan results. Error: %d\n", rc);
     250                        printf("Failed to fetch scan results: %s\n",
     251                            str_error(rc));
    250252               
    251253                return rc;
     
    277279        int rc = inetcfg_init();
    278280        if (rc != EOK) {
    279                 printf("%s: Failed connecting to inetcfg service (%d).\n",
    280                     NAME, rc);
     281                printf("%s: Failed connecting to inetcfg service: %s.\n",
     282                    NAME, str_error(rc));
    281283                return 1;
    282284        }
     
    284286        rc = dhcp_init();
    285287        if (rc != EOK) {
    286                 printf("%s: Failed connecting to dhcp service (%d).\n",
    287                     NAME, rc);
     288                printf("%s: Failed connecting to dhcp service: %s.\n",
     289                    NAME, str_error(rc));
    288290                return 1;
    289291        }
Note: See TracChangeset for help on using the changeset viewer.