summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-12-11 20:12:32 +0100
committerGitHub <noreply@github.com>2016-12-11 20:12:32 +0100
commit4682047cf23f3471894d83d847cdac6b3bec92e1 (patch)
treefe3b9c380d88d55ed55d1906ca178ef3803df23a
parent280b29ac84baee304c180fe64f820db56cd5b2b3 (diff)
parent330785f5caf426afa9d93e8eb7dcc7a72d7ea3cb (diff)
Merge pull request #4864 from keszybz/build-sys
Fix some build issues and warnings
-rw-r--r--man/systemd.service.xml20
-rw-r--r--src/basic/architecture.h1
-rw-r--r--src/basic/extract-word.c4
-rw-r--r--src/core/load-fragment.c3
-rw-r--r--src/journal/compress.c4
-rw-r--r--src/shared/dissect-image.c10
-rw-r--r--src/shared/firewall-util.c5
7 files changed, 21 insertions, 26 deletions
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 67c68d2f8b..b244a7e970 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -918,18 +918,14 @@
must be passed as separate words). Lone semicolons may be escaped
as <literal>\;</literal>.</para>
- <para>Each command line is split on whitespace, with the first
- item being the command to execute, and the subsequent items being
- the arguments. Double quotes ("...") and single quotes ('...') may
- be used, in which case everything until the next matching quote
- becomes part of the same argument. C-style escapes are also
- supported. The table below contains the list of allowed escape
- patterns. Only patterns which match the syntax in the table are
- allowed; others will result in an error, and must be escaped by
- doubling the backslash. Quotes themselves are removed after
- parsing and escape sequences substituted. In addition, a trailing
- backslash (<literal>\</literal>) may be used to merge lines.
- </para>
+ <para>Each command line is split on whitespace, with the first item being the command to
+ execute, and the subsequent items being the arguments. Double quotes ("...") and single quotes
+ ('...') may be used, in which case everything until the next matching quote becomes part of the
+ same argument. Quotes themselves are removed. C-style escapes are also supported. The table
+ below contains the list of known escape patterns. Only escape patterns which match the syntax in
+ the table are allowed; other patterns may be added in the future and unknown patterns will
+ result in a warning. In particular, any backslashes should be doubled. Finally, a trailing
+ backslash (<literal>\</literal>) may be used to merge lines.</para>
<para>This syntax is intended to be very similar to shell syntax,
but only the meta-characters and expansions described in the
diff --git a/src/basic/architecture.h b/src/basic/architecture.h
index 5a77c31932..b329df2f6d 100644
--- a/src/basic/architecture.h
+++ b/src/basic/architecture.h
@@ -150,6 +150,7 @@ int uname_architecture(void);
# else
# define native_architecture() ARCHITECTURE_ARM64
# define LIB_ARCH_TUPLE "aarch64-linux-gnu"
+# define SECONDARY_ARCHITECTURE ARCHITECTURE_ARM
# endif
#elif defined(__arm__)
# if __BYTE_ORDER == __BIG_ENDIAN
diff --git a/src/basic/extract-word.c b/src/basic/extract-word.c
index dbe64a9a58..f8cac3e911 100644
--- a/src/basic/extract-word.c
+++ b/src/basic/extract-word.c
@@ -227,8 +227,8 @@ int extract_first_word_and_warn(
*p = save;
r = extract_first_word(p, ret, separators, flags|EXTRACT_CUNESCAPE_RELAX);
if (r >= 0) {
- /* It worked this time, hence it must have been an invalid escape sequence we could correct. */
- log_syntax(unit, LOG_WARNING, filename, line, EINVAL, "Invalid escape sequences in line, correcting: \"%s\"", rvalue);
+ /* It worked this time, hence it must have been an invalid escape sequence. */
+ log_syntax(unit, LOG_WARNING, filename, line, EINVAL, "Ignoring unknown escape sequences: \"%s\"", *ret);
return r;
}
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 6b36b2fc3a..687cd1dd31 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -606,7 +606,6 @@ int config_parse_exec(
_cleanup_strv_free_ char **n = NULL;
size_t nlen = 0, nbufsize = 0;
const char *f;
- int i;
semicolon = false;
@@ -615,7 +614,7 @@ int config_parse_exec(
return 0;
f = firstword;
- for (i = 0; i < 3; i++) {
+ for (;;) {
/* We accept an absolute path as first argument.
* If it's prefixed with - and the path doesn't exist,
* we ignore it instead of erroring out;
diff --git a/src/journal/compress.c b/src/journal/compress.c
index ba734b5561..818a720ba8 100644
--- a/src/journal/compress.c
+++ b/src/journal/compress.c
@@ -112,7 +112,11 @@ int compress_blob_lz4(const void *src, uint64_t src_size,
if (src_size < 9)
return -ENOBUFS;
+#if LZ4_VERSION_NUMBER >= 10700
+ r = LZ4_compress_default(src, (char*)dst + 8, src_size, (int) dst_alloc_size - 8);
+#else
r = LZ4_compress_limitedOutput(src, (char*)dst + 8, src_size, (int) dst_alloc_size - 8);
+#endif
if (r <= 0)
return -ENOBUFS;
diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c
index 257af78781..d3ba9b9dde 100644
--- a/src/shared/dissect-image.c
+++ b/src/shared/dissect-image.c
@@ -372,9 +372,7 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, Dissecte
designator = PARTITION_ROOT;
architecture = native_architecture();
rw = !(flags & GPT_FLAG_READ_ONLY);
- }
-#ifdef GPT_ROOT_NATIVE_VERITY
- else if (sd_id128_equal(type_id, GPT_ROOT_NATIVE_VERITY)) {
+ } else if (sd_id128_equal(type_id, GPT_ROOT_NATIVE_VERITY)) {
m->can_verity = true;
@@ -388,7 +386,6 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, Dissecte
rw = false;
}
#endif
-#endif
#ifdef GPT_ROOT_SECONDARY
else if (sd_id128_equal(type_id, GPT_ROOT_SECONDARY)) {
@@ -399,9 +396,7 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, Dissecte
designator = PARTITION_ROOT_SECONDARY;
architecture = SECONDARY_ARCHITECTURE;
rw = !(flags & GPT_FLAG_READ_ONLY);
- }
-#ifdef GPT_ROOT_SECONDARY_VERITY
- else if (sd_id128_equal(type_id, GPT_ROOT_SECONDARY_VERITY)) {
+ } else if (sd_id128_equal(type_id, GPT_ROOT_SECONDARY_VERITY)) {
m->can_verity = true;
@@ -415,7 +410,6 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, Dissecte
rw = false;
}
#endif
-#endif
else if (sd_id128_equal(type_id, GPT_SWAP)) {
designator = PARTITION_SWAP;
fstype = "swap";
diff --git a/src/shared/firewall-util.c b/src/shared/firewall-util.c
index f73108eaa3..9c29b0afca 100644
--- a/src/shared/firewall-util.c
+++ b/src/shared/firewall-util.c
@@ -17,8 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#warning "Temporary work-around for broken glibc vs. linux kernel header definitions"
-#warning "This really should be removed sooner rather than later, when this is fixed upstream"
+/* Temporary work-around for broken glibc vs. linux kernel header definitions
+ * This is already fixed upstream, remove this when distributions have updated.
+ */
#define _NET_IF_H 1
#include <alloca.h>