summaryrefslogtreecommitdiff
path: root/src/basic
AgeCommit message (Collapse)Author
2016-02-29Merge pull request #2702 from poettering/resolved-iterate-fixZbigniew Jędrzejewski-Szmek
resolved iteration fix
2016-02-29Merge pull request #2763 from tblume/shorten-hostname-before-removing-dotsLennart Poettering
shorten hostname before checking for trailing dot
2016-02-29Merge pull request #2756 from thom311/masterLennart Poettering
core: avoid compiler warning when compiling with -fexceptions
2016-02-29shorten hostname before checking for trailing dotThomas Blume
Shortening can lead to a hostname that has a trailing dot. Therefore it should be done before checking from trailing dots.
2016-02-27core: avoid compiler warning when compiling with -fexceptionsThomas Haller
Initialize auto variables with cleanup attribute, otherwise we get a compiler warning with -fexceptions. ./configure CFLAGS='-Wmaybe-uninitialized -fexceptions -O2'
2016-02-26clock-util: be more tolerant in parsing /etc/adjtimeMartin Pitt
As we default to "hardware clock is in UTC" if /etc/adjtime is not present, it also makes sense to have that default if /etc/adjtime contains only one or two lines. Drop the "gibberish" test case, as this was just EIO because of not containing three lines, which is already contained in other tests. clock_is_localtime() never actually validated the format of the first two lines, and there is little point in doing that. This addresses the reading half of issue #2638.
2016-02-26clock-util: make clock_is_localtime() testable and add initial testsMartin Pitt
Add path argument to clock_is_localtime() and default to "/etc/adjtime" if it's NULL. This makes the function testable. Add test-clock: initial test cases for some scenarios, using a temporary file. This also checks the behaviour with a NULL (i. e. the system's /etc/adjtime) file.
2016-02-24treewide: fix typos and then/that useTorstein Husebø
2016-02-23Merge pull request #2724 from vcaputo/minor-formatting-cleanupsZbigniew Jędrzejewski-Szmek
tree-wide: minor formatting inconsistency cleanups
2016-02-23tree-wide: minor formatting inconsistency cleanupsVito Caputo
2016-02-23Merge pull request #2639 from nafets227/masterZbigniew Jędrzejewski-Szmek
Bugfix set virt=none when running on XEN Dom0
2016-02-23basic: Bugfix Detect XEN Dom0 as no virtualizationStefan Schallenberg aka nafets227
When running in XEN Dom0 the virtualization check: 1) detect_xen returns HYPERVISOR_NONE so next checks are executed 2) /proc/sys/hypervisor detects a XEN hypervisor it is lacking the special Dom0 detection as in detect_xen With this patch, at the end of all virtualization checks we double-check if running in XEN Dom0 or DomU.
2016-02-23basic: Debug-logging of Virtualisation detectionStefan Schallenberg aka nafets227
print out every single detection executed and its result.
2016-02-23basic: mark unused variable as suchThomas Hindoe Paaboel Andersen
2016-02-23Merge pull request #2664 from zonque/bootchart-removalLennart Poettering
Remove systemd-bootchart
2016-02-23Merge pull request #2717 from keszybz/networkctl-prettificationLennart Poettering
Networkctl prettification
2016-02-23basic: simplify ether_addr_is_nullZbigniew Jędrzejewski-Szmek
2016-02-23Fix two typosZbigniew Jędrzejewski-Szmek
2016-02-23architecture.h: remove PROC_CPUINFO_MODELDaniel Mack
This was only needed for bootchart, so it can go now.
2016-02-23Merge pull request #2709 from vcaputo/normalize_inc_dec_usageMartin Pitt
tree-wide: make ++/-- usage consistent WRT spacing
2016-02-22tree-wide: make ++/-- usage consistent WRT spacingVito Caputo
Throughout the tree there's spurious use of spaces separating ++ and -- operators from their respective operands. Make ++ and -- operator consistent with the majority of existing uses; discard the spaces.
2016-02-22resolved: fix notification iteration logic when transactions are completedLennart Poettering
When a transaction is complete, and we notify its owners, make sure we deal correctly with the requesters removing themselves from the list of owners while we continue iterating. This was previously already dealt with with transactions that require other transactions for DNSSEC purposes, fix this for other possibly transaction owners too now. Since iterating through "Set" objects is not safe regarding removal of entries from it, rework the logic to use two Sets, and move each entry we notified from one set to the other set before we dispatch the notification. This move operation requires no additional memory, and enables us to ensure that we don't notify any object twice. Fixes: #2676
2016-02-22hashmap: use void* and uint8_t* for generic pointersLennart Poettering
As suggested by CODING_STYLE we should use "void*" as type for generic memory, and uint8_t* for generic bytes. Hence use that instead of "char*", which should really be used only for strings these days.
2016-02-22util-lib: simplify personality() string matchingLennart Poettering
2016-02-22virt: make sure we don't ignore some errorsLennart Poettering
2016-02-22util-lib: support various ppc archs in personality logicLennart Poettering
2016-02-22util-lib: use the architecture ids from architecture.h for personalitiesLennart Poettering
We have this ids, hence let's use them universally.
2016-02-22build-sys: move shared/architecture.[ch] into basic/Lennart Poettering
After all, it is pretty generic, has no external deps besides libc, and is very similar to virt.[ch] which is also in basic/
2016-02-22Merge pull request #2685 from poettering/lldp-fixes2Tom Gundersen
lldp fixes, second iteration
2016-02-22Merge pull request #2695 from mustrumr/fix-calendarspec-skipLennart Poettering
calendarspec: fix find_next skipping times
2016-02-22Merge pull request #2694 from zonque/proxyarp-missingLennart Poettering
missing.h: Explicitly check for IFLA_BRPORT_PROXYARP
2016-02-22calendarspec: fix find_next skipping timesHristo Venev
reset usec when bumping hours/minutes
2016-02-22missing.h: Explicitly check for IFLA_BRPORT_PROXYARPDaniel Mack
RHEL explicitly disables IFLA_BRPORT_PROXYARP by renaming the enum value. In order to support unpatched builds, we have two options: a) redefine the enum value through missing.h and ignore the fact that it is really unsupported, or b) omit that enum value on rtnl_prot_info_bridge_port_types[] As we are not actually using this netlink type anywhere, and because it is only hooked up for the sake of completeness, this patch opts for the former.
2016-02-21Merge pull request #2688 from poettering/calendar-fix-2678Zbigniew Jędrzejewski-Szmek
A fix for #2678
2016-02-21util-lib: fix returned error codeLennart Poettering
Make sure we propagate errors properly.
2016-02-21util-lib: add (void) cast to indicate that we don't care about the ↵Lennart Poettering
normalization success After all, we verify that every calendar part is not out of bounds later on, and it's fully OK if the normalization has no effect.
2016-02-21networkd: add basic LLDP transmission supportLennart Poettering
Let's add some minimalistic LLDP sender support. The idea is that this is either on or off, and all fields determined automatically rather than configured explicitly.
2016-02-21sd-lldp: filter out LLDP messages coming from our own MAC addressLennart Poettering
Let's not get confused should we be connected to some bridge that mirrors back our packets.
2016-02-20time-util: check for overflow in conversion from ts to nsec_tZbigniew Jędrzejewski-Szmek
CID #1320855.
2016-02-20tree-wide: place #pragma once at the same place everywhereLennart Poettering
Usually, we place the #pragma once before the copyright blurb in header files, but in a few cases we didn't. Move those around, so that we do the same thing everywhere.
2016-02-20sd-lldp: move ETHERTYPE_LLDP to missing.hLennart Poettering
After all, most ETHERTYPE variables are defined in the system headers, hence define these where we defined all other fill-ins for system headers.
2016-02-19Merge pull request #2666 from keszybz/coverity-fixesZbigniew Jędrzejewski-Szmek
Coverity fixes
2016-02-19Use (void) to silenc coverity on proc title changesZbigniew Jędrzejewski-Szmek
This is a cosmetic best-effort thing anyway.
2016-02-19Merge pull request #2661 from nwmcsween/nwmcsweenDaniel Mack
Include and internal struct member fixes.
2016-02-18time-util: rewrite check in a way that does not confuse gccZbigniew Jędrzejewski-Szmek
gcc thinks that multiplier might be unitialized. Split out the inner loop to make the function easier to grok.
2016-02-18basic/strbuf: do not call bsearch with a null argumentZbigniew Jędrzejewski-Szmek
Das ist verboten! src/basic/strbuf.c:162:23: runtime error: null pointer passed as argument 2, which is declared to never be null
2016-02-18Remove/add (un)needed includesNathan McSween
2016-02-18Merge pull request #2644 from 0xAX/check-alloc-overflow-macroZbigniew Jędrzejewski-Szmek
alloc-util: extract overflow check into inline function
2016-02-19alloc-util: cleanupsAlexander Kuleshov
This patch contains a set of little cleanups for alloc-util.h: 1. The malloc_multiply(), realloc_multiply() and memdup_multiply() functions check allocation related parameters on overflow. Let's move them to the separate size_multiply_overflow() function for simplicity, code duplication prevention and possible reuse in future. 2. use SIZE_MAX from stdlib instead of ((size_t) - 1) to be more clear. 3. The 'a'/'b' variables are renamed to 'size' and 'need' to be more clear.'
2016-02-17Merge pull request #2640 from keszybz/dnssec-work-3Lennart Poettering
resolve: dumping of binary packets