Ignore:
File:
1 edited

Legend:

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

    rf9b2cb4c rc1694b6b  
    4040#include <errno.h>
    4141#include <stdio.h>
     42#include <stdlib.h>
     43#include <str_error.h>
    4244#include <loc.h>
    4345
     
    138140        int rc = get_wifi_list(&wifis, &count);
    139141        if (rc != EOK) {
    140                 printf("Error fetching wifi list.\n");
     142                printf("Error fetching wifi list: %s\n", str_error(rc));
    141143                return EINVAL;
    142144        }
     
    147149                rc = loc_service_get_name(wifis[i], &svc_name);
    148150                if (rc != EOK) {
    149                         printf("Error getting service name.\n");
     151                        printf("Error getting service name: %s\n", str_error(rc));
    150152                        free(wifis);
    151153                        return rc;
     
    176178                        printf("Device is not ready yet.\n");
    177179                else
    178                         printf("Error when disconnecting device. "
    179                             "Error: %d\n", rc);
     180                        printf("Error when disconnecting device: %s\n",
     181                            str_error(rc));
    180182               
    181183                return rc;
     
    191193                        printf("Given SSID not in scan results.\n");
    192194                else
    193                         printf("Error when connecting to network. "
    194                             "Error: %d\n", rc);
     195                        printf("Error when connecting to network: %s\n",
     196                            str_error(rc));
    195197               
    196198                return rc;
     
    220222                        printf("Not connected to any WiFi network.\n");
    221223                else
    222                         printf("Error when disconnecting from network. "
    223                             "Error: %d\n", rc);
     224                        printf("Error when disconnecting from network: %s\n",
     225                            str_error(rc));
    224226               
    225227                return rc;
     
    246248                        printf("Device is not ready yet.\n");
    247249                else
    248                         printf("Failed to fetch scan results. Error: %d\n", rc);
     250                        printf("Failed to fetch scan results: %s\n",
     251                            str_error(rc));
    249252               
    250253                return rc;
     
    276279        int rc = inetcfg_init();
    277280        if (rc != EOK) {
    278                 printf("%s: Failed connecting to inetcfg service (%d).\n",
    279                     NAME, rc);
     281                printf("%s: Failed connecting to inetcfg service: %s.\n",
     282                    NAME, str_error(rc));
    280283                return 1;
    281284        }
     
    283286        rc = dhcp_init();
    284287        if (rc != EOK) {
    285                 printf("%s: Failed connecting to dhcp service (%d).\n",
    286                     NAME, rc);
     288                printf("%s: Failed connecting to dhcp service: %s.\n",
     289                    NAME, str_error(rc));
    287290                return 1;
    288291        }
Note: See TracChangeset for help on using the changeset viewer.