Changeset 7831313 in rtems-libbsd


Ignore:
Timestamp:
Jan 20, 2014, 2:27:13 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, b96abfd647154f10ea8f7fac68e25676636eded5, debc0aed8b9bef9996b8ec0ae7a70b0b41912e27, 0ad342ae5f65d22eb6c914d58664d3b5d1d3d43f, freebsd-9.3, 98d197895b6162050176ea18d66783a1dc216d82
Children:
8118e8e
Parents:
f8c3d6e
git-author:
Sebastian Huber <sebastian.huber@…> (01/20/14 14:27:13)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/30/14 14:04:19)
Message:

Add and use RTEMS_BSD_ARGC()

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/include/machine/rtems-bsd-commands.h

    rf8c3d6e r7831313  
    88
    99/*
    10  * Copyright (c) 2013 embedded brains GmbH.  All rights reserved.
     10 * Copyright (c) 2013-2014 embedded brains GmbH.  All rights reserved.
    1111 *
    1212 *  embedded brains GmbH
     
    4343#include <sys/cdefs.h>
    4444
     45#define RTEMS_BSD_ARGC(array) (sizeof(array) / sizeof((array)[0]) - 1)
     46
    4547__BEGIN_DECLS
    4648
  • testsuite/commands01/test_main.c

    rf8c3d6e r7831313  
    11/*
    2  * Copyright (c) 2013 embedded brains GmbH.  All rights reserved.
     2 * Copyright (c) 2013-2014 embedded brains GmbH.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
     
    4444#define TEST_NAME "LIBBSD COMMANDS 1"
    4545
    46 #define ARGC(x) (nitems(x) - 1)
     46#define ARGC(x) RTEMS_BSD_ARGC(x)
    4747
    4848static void
  • testsuite/include/rtems/bsd/test/default-network-init.h

    rf8c3d6e r7831313  
    11/*
    2  * Copyright (c) 2013 embedded brains GmbH.  All rights reserved.
     2 * Copyright (c) 2013-2014 embedded brains GmbH.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
     
    4242#include <rtems/bsd/bsd.h>
    4343
    44 #define DEFAULT_NETWORK_ARGC(x) (RTEMS_ARRAY_SIZE(x) - 1)
    45 
    4644static void
    4745default_network_set_self_prio(rtems_task_priority prio)
     
    7674        };
    7775
    78         exit_code = rtems_bsd_command_ifconfig(DEFAULT_NETWORK_ARGC(lo0), lo0);
     76        exit_code = rtems_bsd_command_ifconfig(RTEMS_BSD_ARGC(lo0), lo0);
    7977        assert(exit_code == EX_OK);
    8078
    81         exit_code = rtems_bsd_command_ifconfig(DEFAULT_NETWORK_ARGC(lo0_inet6), lo0_inet6);
     79        exit_code = rtems_bsd_command_ifconfig(RTEMS_BSD_ARGC(lo0_inet6), lo0_inet6);
    8280        assert(exit_code == EX_OK);
    8381}
     
    9795        };
    9896
    99         exit_code = rtems_bsd_command_ifconfig(DEFAULT_NETWORK_ARGC(iface0), iface0);
     97        exit_code = rtems_bsd_command_ifconfig(RTEMS_BSD_ARGC(iface0), iface0);
    10098        assert(exit_code == EX_OK);
    10199}
     
    122120        };
    123121
    124         exit_code = rtems_bsd_command_route(DEFAULT_NETWORK_ARGC(dflt_route), dflt_route);
     122        exit_code = rtems_bsd_command_route(RTEMS_BSD_ARGC(dflt_route), dflt_route);
    125123        assert(exit_code == EXIT_SUCCESS);
    126124
    127         exit_code = rtems_bsd_command_route(DEFAULT_NETWORK_ARGC(dflt_route2), dflt_route2);
     125        exit_code = rtems_bsd_command_route(RTEMS_BSD_ARGC(dflt_route2), dflt_route2);
    128126        assert(exit_code == EXIT_SUCCESS);
    129127}
  • testsuite/ping01/test_main.c

    rf8c3d6e r7831313  
    11/*
    2  * Copyright (c) 2013 embedded brains GmbH.  All rights reserved.
     2 * Copyright (c) 2013-2014 embedded brains GmbH.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
     
    4242#define TEST_NAME "LIBBSD PING 1"
    4343
    44 #define ARGC(x) (RTEMS_ARRAY_SIZE(x) - 1)
    45 
    4644static void
    4745test_ping(void)
     
    5654        };
    5755
    58         exit_code = rtems_bsd_command_ping(ARGC(ping), ping);
     56        exit_code = rtems_bsd_command_ping(RTEMS_BSD_ARGC(ping), ping);
    5957        assert(exit_code == EXIT_SUCCESS);
    6058}
Note: See TracChangeset for help on using the changeset viewer.