1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 18:27:04 +03:00
Commit Graph

13 Commits

Author SHA1 Message Date
Lennart Poettering
3ffd4af220 util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over.
2015-10-25 13:19:18 +01:00
Lennart Poettering
07630cea1f util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.

This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.

Also touches a few unrelated include files.
2015-10-24 23:05:02 +02:00
Daniel Mack
e76398868a test-socket-util: add test for in_addr_is_null() 2015-07-31 19:58:29 +02:00
Ronny Chevalier
07916bea07 test-socket-util: add test for in_addr_to_string 2015-04-08 02:42:50 +02:00
Michal Schmidt
da927ba997 treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values.
2014-11-28 13:29:21 +01:00
Michal Schmidt
0a1beeb642 treewide: auto-convert the simple cases to log_*_errno()
As a followup to 086891e5c1 "log: add an "error" parameter to all
low-level logging calls and intrdouce log_error_errno() as log calls
that take error numbers", use sed to convert the simple cases to use
the new macros:

find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/'

Multi-line log_*() invocations are not covered.
And we also should add log_unit_*_errno().
2014-11-28 12:04:41 +01:00
Thomas Hindoe Paaboel Andersen
bdf7026e95 test: only use assert_se
The asserts used in the tests should never be allowed to be
optimized away
2014-10-04 23:55:35 +02:00
Ronny Chevalier
43dc004336 tests: add tests for socket-util.c
add tests for:
- socket_address_is
- socket_address_is_netlink
- sockaddr_equal
2014-08-18 18:43:45 +02:00
Thomas Hindoe Paaboel Andersen
eda8090ba9 test-socket-util: silence warnings 2014-07-16 08:52:11 +02:00
Zbigniew Jędrzejewski-Szmek
b31f535c9a shared/socket-util: add function to query remote address 2014-07-15 22:31:40 -04:00
Lennart Poettering
3b653205cf shared: split out in_addr related calls from socket-util.[ch] into its private in-addr-util.[ch]
These are enough calls for a new file, and they are sufficiently
different from the sockaddr-related calls, hence let's split this out.
2014-07-10 21:15:26 +02:00
Lennart Poettering
059f6c42b7 networkd: add a number of calls to manipulate in_addr_union structs 2014-06-18 18:28:29 +02:00
Ronny Chevalier
c182135d3a tests: add test-socket-util 2014-06-16 20:38:22 +02:00