Changeset c3bab73b in rtems


Ignore:
Timestamp:
Apr 30, 2018, 7:24:44 AM (12 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
fea9a7a
Parents:
dd8e4b7
git-author:
Sebastian Huber <sebastian.huber@…> (04/30/18 07:24:44)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/02/18 07:56:48)
Message:

tftpfs: Always build TFTP client

Move TFTP client filesystem to separate library libtftpfs.a.
Conditionally use legacy network stack features, e.g. BOOTP support.

Update #3419.

Location:
cpukit
Files:
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • cpukit/headers.am

    rdd8e4b7 rc3bab73b  
    191191include_rtems_HEADERS += include/rtems/termiostypes.h
    192192include_rtems_HEADERS += include/rtems/test.h
     193include_rtems_HEADERS += include/rtems/tftp.h
    193194include_rtems_HEADERS += include/rtems/thread.h
    194195include_rtems_HEADERS += include/rtems/timecounter.h
  • cpukit/libnetworking/Makefile.am

    rdd8e4b7 rc3bab73b  
    22include $(top_srcdir)/automake/compile.am
    33
     4project_lib_LIBRARIES =
     5TMPINSTALL_FILES =
     6
     7project_lib_LIBRARIES += libtftpfs.a
     8libtftpfs_a_SOURCES = lib/tftpDriver.c
     9$(PROJECT_LIB)/libtftpfs.a: libtftpfs.a
     10        $(INSTALL_DATA) $< $(PROJECT_LIB)/libtftpfs.a
     11TMPINSTALL_FILES += $(PROJECT_LIB)/libtftpfs.a
    412
    513# poll is not supported
     
    128136
    129137lib_a_SOURCES = lib/getprotoby.c lib/rtems_bsdnet_ntp.c lib/ftpfs.c \
    130     lib/syslog.c lib/tftpDriver.c
     138    lib/syslog.c
    131139lib_a_SOURCES += rtems/rtems_syscall_api.c
    132140endif
  • cpukit/libnetworking/headers.am

    rdd8e4b7 rc3bab73b  
    116116include_rtems_HEADERS += rtems/rtems_netinet_in.h
    117117include_rtems_HEADERS += rtems/rtems_syscall.h
    118 include_rtems_HEADERS += rtems/tftp.h
    119118
    120119include_rtems_bsdnetdir = $(includedir)/rtems/bsdnet
  • cpukit/libnetworking/lib/tftpDriver.c

    rdd8e4b7 rc3bab73b  
    2929#include <rtems/libio_.h>
    3030#include <rtems/seterr.h>
    31 #include <rtems/rtems_bsdnet.h>
    3231#include <rtems/tftp.h>
    3332#include <rtems/thread.h>
     
    3736#include <arpa/inet.h>
    3837#include <netdb.h>
     38
     39#ifdef RTEMS_NETWORKING
     40#include <rtems/rtems_bsdnet.h>
     41#endif
    3942
    4043#ifdef RTEMS_TFTP_DRIVER_DEBUG
     
    538541    hostname = full_path_name;
    539542    cp1 = strchr (full_path_name, ':');
    540     if (!cp1)
     543    if (!cp1) {
     544#ifdef RTEMS_NETWORKING
    541545        hostname = "BOOTP_HOST";
    542     else {
     546#endif
     547    } else {
    543548        *cp1 = '\0';
    544549        ++cp1;
     
    548553     * Convert hostname to Internet address
    549554     */
     555#ifdef RTEMS_NETWORKING
    550556    if (strcmp (hostname, "BOOTP_HOST") == 0)
    551557        farAddress = rtems_bsdnet_bootp_server_address;
    552     else if (inet_aton (hostname, &farAddress) == 0) {
     558    else
     559#endif
     560    if (inet_aton (hostname, &farAddress) == 0) {
    553561        struct hostent *he = gethostbyname(hostname);
    554562        if (he == NULL)
     
    560568     * Extract file pathname component
    561569     */
     570#ifdef RTEMS_NETWORKING
    562571    if (strcmp (cp1, "BOOTP_FILE") == 0) {
    563572        cp1 = rtems_bsdnet_bootp_boot_file_name;
    564573    }
     574#endif
    565575    if (*cp1 == '\0')
    566576        return ENOENT;
Note: See TracChangeset for help on using the changeset viewer.