Changeset 03cd7a9e in mainline for uspace/lib/pcap/src/pcapctl_dump.c


Ignore:
Timestamp:
2024-12-13T08:44:05Z (10 months ago)
Author:
Nataliia Korop <n.corop08@…>
Children:
f08447b
Parents:
59fe16d
git-author:
Nataliia Korop <n.corop08@…> (2024-10-28 09:57:08)
git-committer:
Nataliia Korop <n.corop08@…> (2024-12-13 08:44:05)
Message:

refactoring after 23.10

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/pcap/src/pcapctl_dump.c

    r59fe16d r03cd7a9e  
    151151        printf("number: %d\n", *index);
    152152        if (*index == -1) {
    153 
    154                 rc = loc_service_get_id("net/eth1", &svc, 0);
    155                 if (rc != EOK)
    156                 {
    157                         fprintf(stderr, "Error getting service id.\n");
    158                         return ENOENT;
    159                 }
    160         }
    161         else {
    162                 rc  = pcapctl_cat_get_svc(index, &svc);
    163                 if (rc != EOK) {
    164                         printf("Error finding the device with index: %d\n", *index);
    165                         goto error;
    166                 }
     153                *index = 0;
     154        }
     155
     156        rc  = pcapctl_cat_get_svc(index, &svc);
     157        if (rc != EOK) {
     158                printf("Error finding the device with index: %d\n", *index);
     159                goto error;
    167160        }
    168161
     
    206199        aid_t req = async_send_0(exch, PCAP_CONTROL_SET_START, NULL);
    207200
    208         rc = async_data_write_start(exch, (const void *) name, size);
     201        rc = async_data_write_start(exch, (const void *)name, size);
    209202
    210203        pcapctl_dump_exchange_end(exch);
Note: See TracChangeset for help on using the changeset viewer.