[systemd-commits] Branch 'journal' - 4 commits - Makefile.am man/custom-html.xsl man/sd-login.xml src/hashmap.c src/hashmap.h
Lennart Poettering
lennart at kemper.freedesktop.org
Mon Dec 19 11:26:05 PST 2011
Makefile.am | 9 +++++----
man/custom-html.xsl | 29 +++++++++++++++++++++++++++++
man/sd-login.xml | 12 +++++++++++-
src/hashmap.c | 11 +++++++++++
src/hashmap.h | 1 +
5 files changed, 57 insertions(+), 5 deletions(-)
New commits:
commit 76318284fc970b30e9dc4c079960807345331dad
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Dec 19 20:25:52 2011 +0100
man: switch to UTF-8 output, to work around charset issues
diff --git a/Makefile.am b/Makefile.am
index 656909c..f9093b6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -506,7 +506,8 @@ EXTRA_DIST = \
src/libsystemd-login.sym \
introspect.awk \
src/73-seat-late.rules.in \
- src/99-systemd.rules.in
+ src/99-systemd.rules.in \
+ man/custom-html.xsl
if ENABLE_BINFMT
EXTRA_DIST += \
@@ -1758,7 +1759,7 @@ endif
if HAVE_XSLTPROC
XSLTPROC_FLAGS = \
--nonet \
- --param funcsynopsis.style "'ansi'"
+ --stringparam funcsynopsis.style ansi
XSLTPROC_PROCESS_MAN = \
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
@@ -1771,11 +1772,11 @@ XSLTPROC_PROCESS_MAN_IN = \
XSLTPROC_PROCESS_HTML = \
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
- $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
+ $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) man/custom-html.xsl $<
XSLTPROC_PROCESS_HTML_IN = \
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
- $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< && \
+ $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) man/custom-html.xsl $< && \
mv ${@:.in=} $@
man/%.1: man/%.xml
diff --git a/man/custom-html.xsl b/man/custom-html.xsl
new file mode 100644
index 0000000..2d2f458
--- /dev/null
+++ b/man/custom-html.xsl
@@ -0,0 +1,29 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+
+<!--
+ This file is part of systemd.
+
+ Copyright 2011 Lennart Poettering
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ systemd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
+
+<!-- Switch things to UTF-8, ISO-8859-1 is soo yesteryear -->
+<xsl:output method="html" encoding="UTF-8" indent="no"/>
+
+</xsl:stylesheet>
commit 38c67e2a442d875c1de6f5aae46647a195230b05
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Dec 19 19:55:54 2011 +0100
man: generate HTML instead of XHTML with XSL docbook to work around 'fsfunc' noise
diff --git a/Makefile.am b/Makefile.am
index e689355..656909c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1771,11 +1771,11 @@ XSLTPROC_PROCESS_MAN_IN = \
XSLTPROC_PROCESS_HTML = \
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
- $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
+ $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
XSLTPROC_PROCESS_HTML_IN = \
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
- $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
+ $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< && \
mv ${@:.in=} $@
man/%.1: man/%.xml
commit 2e4a6ff47b311216829ed0f48f17ee9bc35641dc
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Dec 19 19:54:51 2011 +0100
hashmap: add hashmap_first_key()
diff --git a/src/hashmap.c b/src/hashmap.c
index 95ea45d..7ef8097 100644
--- a/src/hashmap.c
+++ b/src/hashmap.c
@@ -558,6 +558,17 @@ void* hashmap_first(Hashmap *h) {
return h->iterate_list_head->value;
}
+void* hashmap_first_key(Hashmap *h) {
+
+ if (!h)
+ return NULL;
+
+ if (!h->iterate_list_head)
+ return NULL;
+
+ return (void*) h->iterate_list_head->key;
+}
+
void* hashmap_last(Hashmap *h) {
if (!h)
diff --git a/src/hashmap.h b/src/hashmap.h
index 16ffbd3..ab4363a 100644
--- a/src/hashmap.h
+++ b/src/hashmap.h
@@ -74,6 +74,7 @@ void hashmap_clear(Hashmap *h);
void *hashmap_steal_first(Hashmap *h);
void *hashmap_steal_first_key(Hashmap *h);
void* hashmap_first(Hashmap *h);
+void* hashmap_first_key(Hashmap *h);
void* hashmap_last(Hashmap *h);
char **hashmap_get_strv(Hashmap *h);
commit 5079a105e701f17439635e76d8cb3052badbb34c
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Dec 19 17:40:31 2011 +0100
man: extend sd-login(7) in regards to mixing D-Bus and synchronous library calls a bit
diff --git a/man/sd-login.xml b/man/sd-login.xml
index 9926d2b..3fc0e16 100644
--- a/man/sd-login.xml
+++ b/man/sd-login.xml
@@ -77,13 +77,23 @@
you need to utilize the D-Bus API of
systemd-logind, instead.</para>
- <para>These functions access data in
+ <para>These functions synchronously access data in
<filename>/proc</filename>,
<filename>/sys/fs/cgroup</filename> and
<filename>/run</filename>. All of these are virtual
file systems, hence the runtime cost of the accesses
is relatively cheap.</para>
+ <para>It is possible (and often a very good choice) to
+ mix calls to the synchronous interface of
+ <filename>sd-login.h</filename> with the asynchronous
+ D-Bus interface of systemd-logind. However, if this is
+ done you need to think a bit about possible races
+ since the stream of events from D-Bus and from
+ <filename>sd-login.h</filename> interfaces such as the
+ login monitor are asynchronous and not ordered against
+ each other.</para>
+
<para>If the functions return string arrays, these are
generally NULL terminated and need to be freed by the
caller with the libc
More information about the systemd-commits
mailing list