Ignore:
Timestamp:
2018-01-04T20:50:52Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
e211ea04
Parents:
facacc71
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:47:53)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:50:52)
Message:

Use errno_t in all uspace and kernel code.

Change type of every variable, parameter and return value that holds an
<errno.h> constant to either errno_t (the usual case), or sys_errno_t
(some places in kernel). This is for the purpose of self-documentation,
as well as for type-checking with a bit of type definition hackery.

After this commit, HelenOS is free of code that mixes error codes with non-error
values on the assumption that error codes are negative.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ieee80211/src/ieee80211_iface_impl.c

    rfacacc71 r46577995  
    5050 *
    5151 */
    52 int ieee80211_get_scan_results_impl(ddf_fun_t *fun,
     52errno_t ieee80211_get_scan_results_impl(ddf_fun_t *fun,
    5353    ieee80211_scan_results_t *results, bool now)
    5454{
     
    9898 *
    9999 */
    100 static int ieee80211_connect_proc(ieee80211_dev_t *ieee80211_dev,
     100static errno_t ieee80211_connect_proc(ieee80211_dev_t *ieee80211_dev,
    101101    ieee80211_scan_result_link_t *auth_data, char *password)
    102102{
     
    104104       
    105105        /* Set channel. */
    106         int rc = ieee80211_dev->ops->set_freq(ieee80211_dev,
     106        errno_t rc = ieee80211_dev->ops->set_freq(ieee80211_dev,
    107107            ieee80211_channel_to_freq(auth_data->scan_result.channel));
    108108        if (rc != EOK)
     
    178178 *
    179179 */
    180 int ieee80211_connect_impl(ddf_fun_t *fun, char *ssid_start, char *password)
     180errno_t ieee80211_connect_impl(ddf_fun_t *fun, char *ssid_start, char *password)
    181181{
    182182        assert(ssid_start);
     
    190190       
    191191        if (ieee80211_is_connected(ieee80211_dev)) {
    192                 int rc = ieee80211_dev->iface->disconnect(fun);
     192                errno_t rc = ieee80211_dev->iface->disconnect(fun);
    193193                if (rc != EOK)
    194194                        return rc;
     
    197197        ieee80211_set_connect_request(ieee80211_dev);
    198198       
    199         int rc = ENOENT;
     199        errno_t rc = ENOENT;
    200200        fibril_mutex_lock(&ieee80211_dev->scan_mutex);
    201201       
     
    224224 *
    225225 */
    226 int ieee80211_disconnect_impl(ddf_fun_t *fun)
     226errno_t ieee80211_disconnect_impl(ddf_fun_t *fun)
    227227{
    228228        nic_t *nic_data = nic_get_from_ddf_fun(fun);
     
    236236       
    237237        fibril_mutex_lock(&ieee80211_dev->ap_list.results_mutex);
    238         int rc = ieee80211_deauthenticate(ieee80211_dev);
     238        errno_t rc = ieee80211_deauthenticate(ieee80211_dev);
    239239        fibril_mutex_unlock(&ieee80211_dev->ap_list.results_mutex);
    240240       
Note: See TracChangeset for help on using the changeset viewer.