Changeset 4a5f546 in rtems-libbsd


Ignore:
Timestamp:
Oct 11, 2018, 5:25:34 AM (6 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
647dd08ae2aa69b935c2847ea450fb824322ecae, c6261f97870562d4c797cfb1ff1ba0affb85a916
Children:
91b858d
Parents:
8ee0aa1
git-author:
Sebastian Huber <sebastian.huber@…> (10/11/18 05:25:34)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/11/18 05:26:57)
Message:

Fix dhcpcd.conf content

Do not write '\0' characters to the file. This confuses the options
parser.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuite/include/rtems/bsd/test/default-network-init.h

    r8ee0aa1 r4a5f546  
    142142        assert(fd >= 0);
    143143
    144         n = write(fd, default_cfg, sizeof(default_cfg));
    145         assert(n == (ssize_t) sizeof(default_cfg));
     144        n = write(fd, default_cfg, sizeof(default_cfg) - 1);
     145        assert(n == (ssize_t) sizeof(default_cfg) - 1);
    146146
    147147#ifdef DEFAULT_NETWORK_DHCPCD_NO_DHCP_DISCOVERY
    148148        static const char nodhcp_cfg[] = "nodhcp\nnodhcp6\n";
    149149
    150         n = write(fd, nodhcp_cfg, sizeof(nodhcp_cfg));
    151         assert(n == (ssize_t) sizeof(nodhcp_cfg));
     150        n = write(fd, nodhcp_cfg, sizeof(nodhcp_cfg) - 1);
     151        assert(n == (ssize_t) sizeof(nodhcp_cfg) - 1);
    152152#endif
    153153
Note: See TracChangeset for help on using the changeset viewer.