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/nic/include/nic_rx_control.h

    rfacacc71 r46577995  
    114114} __attribute__ ((packed)) vlan_header_t;
    115115
    116 extern int nic_rxc_init(nic_rxc_t *rxc);
    117 extern int nic_rxc_clear(nic_rxc_t *rxc);
    118 extern int nic_rxc_set_addr(nic_rxc_t *rxc,
     116extern errno_t nic_rxc_init(nic_rxc_t *rxc);
     117extern errno_t nic_rxc_clear(nic_rxc_t *rxc);
     118extern errno_t nic_rxc_set_addr(nic_rxc_t *rxc,
    119119        const nic_address_t *prev_addr, const nic_address_t *curr_addr);
    120120extern bool nic_rxc_check(const nic_rxc_t *rxc,
     
    126126extern void nic_rxc_unicast_get_mode(const nic_rxc_t *, nic_unicast_mode_t *,
    127127        size_t max_count, nic_address_t *address_list, size_t *address_count);
    128 extern int nic_rxc_unicast_set_mode(nic_rxc_t *rxc, nic_unicast_mode_t mode,
     128extern errno_t nic_rxc_unicast_set_mode(nic_rxc_t *rxc, nic_unicast_mode_t mode,
    129129        const nic_address_t *address_list, size_t address_count);
    130130extern void nic_rxc_multicast_get_mode(const nic_rxc_t *,
    131131        nic_multicast_mode_t *, size_t, nic_address_t *, size_t *);
    132 extern int nic_rxc_multicast_set_mode(nic_rxc_t *, nic_multicast_mode_t mode,
     132extern errno_t nic_rxc_multicast_set_mode(nic_rxc_t *, nic_multicast_mode_t mode,
    133133        const nic_address_t *address_list, size_t address_count);
    134134extern void nic_rxc_broadcast_get_mode(const nic_rxc_t *,
    135135        nic_broadcast_mode_t *mode);
    136 extern int nic_rxc_broadcast_set_mode(nic_rxc_t *,
     136extern errno_t nic_rxc_broadcast_set_mode(nic_rxc_t *,
    137137        nic_broadcast_mode_t mode);
    138138extern void nic_rxc_blocked_sources_get(const nic_rxc_t *,
    139139        size_t max_count, nic_address_t *address_list, size_t *address_count);
    140 extern int nic_rxc_blocked_sources_set(nic_rxc_t *,
     140extern errno_t nic_rxc_blocked_sources_set(nic_rxc_t *,
    141141        const nic_address_t *address_list, size_t address_count);
    142 extern int nic_rxc_vlan_get_mask(const nic_rxc_t *rxc, nic_vlan_mask_t *mask);
    143 extern int nic_rxc_vlan_set_mask(nic_rxc_t *rxc, const nic_vlan_mask_t *mask);
     142extern errno_t nic_rxc_vlan_get_mask(const nic_rxc_t *rxc, nic_vlan_mask_t *mask);
     143extern errno_t nic_rxc_vlan_set_mask(nic_rxc_t *rxc, const nic_vlan_mask_t *mask);
    144144
    145145#endif
Note: See TracChangeset for help on using the changeset viewer.