Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset fb04cba8 in mainline for uspace/srv/net/netif/lo/lo.c


Ignore:
Timestamp:
2010-11-14T14:07:05Z (11 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
9e2e715
Parents:
c9ebbe71
Message:

Fix style of function headers and comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/netif/lo/lo.c

    rc9ebbe71 rfb04cba8  
    6464netif_globals_t netif_globals;
    6565
    66 int
    67 netif_specific_message(ipc_callid_t callid, ipc_call_t *call,
     66int netif_specific_message(ipc_callid_t callid, ipc_call_t *call,
    6867    ipc_call_t *answer, int *answer_count)
    6968{
     
    7574        if (!address)
    7675                return EBADMEM;
     76
    7777        address->value = str_dup(DEFAULT_ADDR);
    7878        address->length = DEFAULT_ADDR_LEN;
     79
    7980        return EOK;
    8081}
     
    8788        if (!stats)
    8889                return EBADMEM;
     90
    8991        rc = find_device(device_id, &device);
    9092        if (rc != EOK)
    9193                return rc;
     94
    9295        memcpy(stats, (device_stats_ref) device->specific,
    9396            sizeof(device_stats_t));
     97
    9498        return EOK;
    9599}
     
    134138        if (!*device)
    135139                return ENOMEM;
     140
    136141        (*device)->specific = (device_stats_t *) malloc(sizeof(device_stats_t));
    137142        if (!(*device)->specific) {
     
    139144                return ENOMEM;
    140145        }
     146
    141147        null_device_stats((device_stats_ref) (*device)->specific);
    142148        (*device)->device_id = device_id;
     
    145151        index = netif_device_map_add(&netif_globals.device_map,
    146152            (*device)->device_id, *device);
     153
    147154        if (index < 0) {
    148155                free(*device);
     
    167174        int rc;
    168175
    169         // create a new device
     176        /* Create a new device */
    170177        rc = create(device_id, &device);
    171178        if (rc != EOK)
    172179                return rc;
    173         // print the settings
     180
     181        /* Print the settings */
    174182        printf("%s: Device created (id: %d)\n", NAME, device->device_id);
     183
    175184        return EOK;
    176185}
     
    187196        if (rc != EOK)
    188197                return EOK;
     198
    189199        if (device->state != NETIF_ACTIVE) {
    190200                netif_pq_release(packet_get_id(packet));
    191201                return EFORWARD;
    192202        }
     203
    193204        next = packet;
    194205        do {
     
    200211                next = pq_next(next);
    201212        } while(next);
     213
    202214        phone = device->nil_phone;
    203215        fibril_rwlock_write_unlock(&netif_globals.lock);
Note: See TracChangeset for help on using the changeset viewer.