Changeset a25e6a9 in rtems-libbsd for libbsd.txt


Ignore:
Timestamp:
Sep 21, 2018, 8:25:18 AM (13 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
c1e05b9ea378b2971e3d7704779112b4bc4296da, 4a77611a223ea883fb548679b516d326a020d447
Children:
de261e0
Parents:
9ff995c
git-author:
Sebastian Huber <sebastian.huber@…> (09/21/18 08:25:18)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/21/18 08:29:32)
Message:

libbsd.txt: Use rtems_bsd_ifconfig_lo0()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libbsd.txt

    r9ff995c ra25e6a9  
    190190#include <sysexits.h>
    191191
    192 #include <machine/rtems-bsd-commands.h>
    193192#include <rtems/bsd/bsd.h>
    194 
    195 static void
    196 network_ifconfig_lo0(void)
    197 {
    198         int exit_code;
    199         char *lo0[] = {
    200                 "ifconfig",
    201                 "lo0",
    202                 "inet",
    203                 "127.0.0.1",
    204                 "netmask",
    205                 "255.255.255.0",
    206                 NULL
    207         };
    208         char *lo0_inet6[] = {
    209                 "ifconfig",
    210                 "lo0",
    211                 "inet6",
    212                 "::1",
    213                 "prefixlen",
    214                 "128",
    215                 NULL
    216         };
    217 
    218         exit_code = rtems_bsd_command_ifconfig(RTEMS_BSD_ARGC(lo0), lo0);
    219         assert(exit_code == EX_OK);
    220 
    221         exit_code = rtems_bsd_command_ifconfig(RTEMS_BSD_ARGC(lo0_inet6), lo0_inet6);
    222         assert(exit_code == EX_OK);
    223 }
    224193
    225194void
     
    227196{
    228197        rtems_status_code sc;
     198        int exit_code;
    229199
    230200        sc = rtems_bsd_initialize();
    231201        assert(sc == RTEMS_SUCCESSFUL);
    232202
    233         network_ifconfig_lo0();
     203        exit_code = rtems_bsd_ifconfig_lo0();
     204        assert(exit_code == EX_OK);
    234205}
    235206-------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.