summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.editorconfig17
-rw-r--r--Makefile.am1
-rw-r--r--man/custom-html.xsl3
-rw-r--r--shell-completion/bash/systemd-nspawn5
-rw-r--r--src/basic/virt.c4
-rw-r--r--src/core/macros.systemd.in2
-rw-r--r--src/libsystemd/sd-event/test-event.c5
-rwxr-xr-xtools/make-directive-index.py1
8 files changed, 32 insertions, 6 deletions
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..70b6c0f139
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,17 @@
+# EditorConfig configuration for systemd
+# http://EditorConfig.org
+
+# top-most EditorConfig file
+root = true
+
+# Unix-style newlines with a newline ending every file, utf-8 charset
+[*]
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+charset = utf-8
+
+# match config files, set indent to spaces with width of eight
+[*.{c,h}]
+indent_style = space
+indent_size = 8
diff --git a/Makefile.am b/Makefile.am
index dd4af12c89..132e592976 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -661,6 +661,7 @@ EXTRA_DIST += \
README.md \
autogen.sh \
.dir-locals.el \
+ .editorconfig \
.vimrc \
.ycm_extra_conf.py \
.travis.yml \
diff --git a/man/custom-html.xsl b/man/custom-html.xsl
index 84c23014e4..e89d73e7f1 100644
--- a/man/custom-html.xsl
+++ b/man/custom-html.xsl
@@ -37,7 +37,8 @@
<xsl:template match="citerefentry[not(@project)]">
<a>
<xsl:attribute name="href">
- <xsl:value-of select="refentrytitle"/><xsl:text>.html</xsl:text>
+ <xsl:value-of select="refentrytitle"/><xsl:text>.html#</xsl:text>
+ <xsl:value-of select="refentrytitle/@target"/>
</xsl:attribute>
<xsl:call-template name="inline.charseq"/>
</a>
diff --git a/shell-completion/bash/systemd-nspawn b/shell-completion/bash/systemd-nspawn
index f9b740380c..2636666b5d 100644
--- a/shell-completion/bash/systemd-nspawn
+++ b/shell-completion/bash/systemd-nspawn
@@ -57,7 +57,7 @@ _systemd_nspawn() {
[ARG]='-D --directory -u --user --uuid --capability --drop-capability --link-journal --bind --bind-ro -M --machine
-S --slice --setenv -Z --selinux-context -L --selinux-apifs-context --register --network-interface --network-bridge
--personality -i --image --tmpfs --volatile
- --network-macvlan'
+ --network-macvlan --kill-signal'
)
_init_completion || return
@@ -132,6 +132,9 @@ _systemd_nspawn() {
compopt -o nospace
comps=$( compgen -A file -- "$cur" )
;;
+ --kill-signal)
+ comps=$(compgen -A signal)
+ ;;
esac
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
return 0
diff --git a/src/basic/virt.c b/src/basic/virt.c
index 1e5d6eea6e..a271c87333 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -269,13 +269,13 @@ int detect_vm(void) {
if (cached_found >= 0)
return cached_found;
- r = detect_vm_cpuid();
+ r = detect_vm_dmi();
if (r < 0)
return r;
if (r != VIRTUALIZATION_NONE)
goto finish;
- r = detect_vm_dmi();
+ r = detect_vm_cpuid();
if (r < 0)
return r;
if (r != VIRTUALIZATION_NONE)
diff --git a/src/core/macros.systemd.in b/src/core/macros.systemd.in
index 8a0e44b58c..2cace3d3ba 100644
--- a/src/core/macros.systemd.in
+++ b/src/core/macros.systemd.in
@@ -43,7 +43,7 @@ if [ $1 -eq 1 ] ; then \
fi \
%{nil}
-%systemd_user_post() %systemd_post --user --global %{?*}
+%systemd_user_post() %{expand:%systemd_post \\--user \\--global %%{?*}}
%systemd_preun() \
if [ $1 -eq 0 ] ; then \
diff --git a/src/libsystemd/sd-event/test-event.c b/src/libsystemd/sd-event/test-event.c
index 4a87159151..9417a8d1d1 100644
--- a/src/libsystemd/sd-event/test-event.c
+++ b/src/libsystemd/sd-event/test-event.c
@@ -173,6 +173,7 @@ static void test_basic(void) {
sd_event_source *w = NULL, *x = NULL, *y = NULL, *z = NULL, *q = NULL, *t = NULL;
static const char ch = 'x';
int a[2] = { -1, -1 }, b[2] = { -1, -1}, d[2] = { -1, -1}, k[2] = { -1, -1 };
+ uint64_t event_now;
assert_se(pipe(a) >= 0);
assert_se(pipe(b) >= 0);
@@ -180,6 +181,7 @@ static void test_basic(void) {
assert_se(pipe(k) >= 0);
assert_se(sd_event_default(&e) >= 0);
+ assert_se(sd_event_now(e, CLOCK_MONOTONIC, &event_now) > 0);
assert_se(sd_event_set_watchdog(e, true) >= 0);
@@ -241,7 +243,8 @@ static void test_basic(void) {
do_quit = true;
assert_se(sd_event_add_post(e, NULL, post_handler, NULL) >= 0);
- assert_se(sd_event_source_set_time(z, now(CLOCK_MONOTONIC) + 200 * USEC_PER_MSEC) >= 0);
+ assert_se(sd_event_now(e, CLOCK_MONOTONIC, &event_now) == 0);
+ assert_se(sd_event_source_set_time(z, event_now + 200 * USEC_PER_MSEC) >= 0);
assert_se(sd_event_source_set_enabled(z, SD_EVENT_ONESHOT) >= 0);
assert_se(sd_event_loop(e) >= 0);
diff --git a/tools/make-directive-index.py b/tools/make-directive-index.py
index 17b1325bba..8091683fee 100755
--- a/tools/make-directive-index.py
+++ b/tools/make-directive-index.py
@@ -268,6 +268,7 @@ def _make_section(template, name, directives, formatting):
b = tree.SubElement(para, 'citerefentry')
c = tree.SubElement(b, 'refentrytitle')
c.text = manpage
+ c.attrib['target'] = varname
d = tree.SubElement(b, 'manvolnum')
d.text = manvolume
entry.tail = '\n\n'