[systemd-commits] 4 commits - Makefile.am TODO src/libsystemd-bus

Lennart Poettering lennart at kemper.freedesktop.org
Sun Nov 10 14:55:01 PST 2013


 Makefile.am                       |   13 +++++++++----
 TODO                              |    6 ++----
 src/libsystemd-bus/bus-internal.c |    1 +
 src/libsystemd-bus/bus-message.c  |    4 ++--
 src/libsystemd-bus/sd-utf8.c      |    4 ++--
 5 files changed, 16 insertions(+), 12 deletions(-)

New commits:
commit 60411ac750ec928114be80b133d9782a1cb2da62
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Nov 10 23:53:55 2013 +0100

    bus: we really need to get rid of the :no-sender hack
    
    This is where a hack from PID 1 spilled into the client side. We need
    to get rid of this as soon as PID 1 is converted to libsystemd-bus.

diff --git a/TODO b/TODO
index e8dc16c..fe5d2f5 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,4 @@
 Bugfixes:
-* check :no-sender logic after PID conversion
-
 * enabling an instance unit creates a pointless link, and
   the unit will be started with getty at getty.service:
     $ systemctl enable getty at .service
@@ -35,8 +33,6 @@ Fedora 20:
 
 CGroup Rework Completion:
 
-* introduce "mainpid" for scopes (or maybe not?)
-
 * implement system-wide DefaultCPUAccounting=1 switch (and similar for blockio, memory?)
 
 * implement per-slice CPUFairScheduling=1 switch
@@ -47,6 +43,8 @@ CGroup Rework Completion:
 
 Features:
 
+* check :no-sender logic after PID 1 conversion
+
 * increase journal files by a few MB each time, instead of piecemeal
 
 * add field to transient units that indicate whether systemd or somebody else saves/restores its settings, for integration with libvirt
diff --git a/src/libsystemd-bus/bus-internal.c b/src/libsystemd-bus/bus-internal.c
index f0a28c6..3fb1cf4 100644
--- a/src/libsystemd-bus/bus-internal.c
+++ b/src/libsystemd-bus/bus-internal.c
@@ -170,6 +170,7 @@ bool sender_name_is_valid(const char *p) {
         if (isempty(p))
                 return false;
 
+        /* FIXME: remove after PID 1 bus conversion */
         if (streq(p, ":no-sender"))
                 return true;
 

commit 369c583b3fb3d672ef469d53141e274ec9d2e8a7
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Nov 10 23:53:49 2013 +0100

    bus: actually export sd_utf8_is_valid() and sd_ascii_is_valid()

diff --git a/src/libsystemd-bus/sd-utf8.c b/src/libsystemd-bus/sd-utf8.c
index 6c44340..6f2aa60 100644
--- a/src/libsystemd-bus/sd-utf8.c
+++ b/src/libsystemd-bus/sd-utf8.c
@@ -23,13 +23,13 @@
 #include "utf8.h"
 #include "sd-utf8.h"
 
-const char *sd_utf8_is_valid(const char *s) {
+_public_ const char *sd_utf8_is_valid(const char *s) {
         assert_return(s, NULL);
 
         return utf8_is_valid(s);
 }
 
-const char *sd_ascii_is_valid(const char *s) {
+_public_ const char *sd_ascii_is_valid(const char *s) {
         assert_return(s, NULL);
 
         return ascii_is_valid(s);

commit f959af205add314dbe90f588723eabdc177956ed
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Nov 10 23:52:21 2013 +0100

    bus: use ENXIO as error condition when trying to exit a container when we are not in any
    
    So far we used ENXIO whenever the user tried to read something from a
    function that didn't carry the right type, and hence use the same error
    here to indicate that what the user expected and what was in the message
    didn't match up.

diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index 411156a..1a50226 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -3018,7 +3018,7 @@ _public_ int sd_bus_message_exit_container(sd_bus_message *m) {
 
         assert_return(m, -EINVAL);
         assert_return(m->sealed, -EPERM);
-        assert_return(m->n_containers > 0, -ENOENT);
+        assert_return(m->n_containers > 0, -ENXIO);
 
         c = message_get_container(m);
         if (c->enclosing == SD_BUS_TYPE_ARRAY) {
@@ -3030,7 +3030,7 @@ _public_ int sd_bus_message_exit_container(sd_bus_message *m) {
 
         } else {
                 if (c->signature && c->signature[c->index] != 0)
-                        return -EINVAL;
+                        return -EBUSY;
         }
 
         free(c->signature);

commit d23284faa9a4d78410b939d42d20b6da3e475f87
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Nov 10 23:51:22 2013 +0100

    build-sys: subtract list of exported symbols from "check-api-unused" list

diff --git a/Makefile.am b/Makefile.am
index ae927af..55a945b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4624,8 +4624,13 @@ valgrind-tests: $(TESTS)
 		[ "$$f" == "$${f/.pl/}" ] && libtool --mode=execute valgrind --leak-check=full --error-exitcode=55 $(builddir)/$$f ; \
 	done
 
-check-api-docs: $(lib_LTLIBRARIES) man
-	for symbol in `for f in $(lib_LTLIBRARIES) ; do nm -g --defined-only $(builddir)/.libs/"$${f/.la/.so}" 2>&1 /dev/null | grep " T " | cut -d" " -f3 ; done` ; do \
+exported: $(lib_LTLIBRARIES)
+	$(AM_V_GEN)for f in $(lib_LTLIBRARIES) ; do \
+		nm -g --defined-only $(builddir)/.libs/"$${f/.la/.so}" 2>&1 /dev/null | grep " T " | cut -d" " -f3 ; \
+	done > $@
+
+check-api-docs: exported man
+	for symbol in `cat exported` ; do \
 		if test -f $(builddir)/man/$$symbol.html ; then \
 			echo "  Symbol $$symbol() is documented." ; \
 		else \
@@ -4645,5 +4650,5 @@ CLEANFILES += \
 	defined \
 	undefined
 
-check-api-unused: defined undefined
-	diff -u undefined defined | grep ^+ | grep -v ^+++ | cut -c2-
+check-api-unused: defined undefined exported
+	( cat exported undefined ) | sort -u  | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-



More information about the systemd-commits mailing list