diff options
-rw-r--r-- | Makefile.am | 11 | ||||
-rw-r--r-- | man/journald.conf.xml | 13 | ||||
-rw-r--r-- | src/basic/macro.h | 11 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-error.c | 8 | ||||
-rw-r--r-- | src/libsystemd/sd-event/sd-event.c | 15 | ||||
-rw-r--r-- | src/udev/udevd.c | 6 |
6 files changed, 27 insertions, 37 deletions
diff --git a/Makefile.am b/Makefile.am index 1dd6dbd5e5..2a79a2a683 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3460,10 +3460,6 @@ libudev_la_SOURCES =\ src/libudev/libudev-queue.c \ src/libudev/libudev-hwdb.c -libudev_la_CFLAGS = \ - $(AM_CFLAGS) \ - -fvisibility=hidden - libudev_la_LDFLAGS = \ $(AM_LDFLAGS) \ -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \ @@ -3495,10 +3491,6 @@ noinst_LTLIBRARIES += \ libudev_internal_la_SOURCES =\ $(libudev_la_SOURCES) -libudev_internal_la_CFLAGS = \ - $(AM_CFLAGS) \ - -fvisibility=default - # ------------------------------------------------------------------------------ INSTALL_DIRS += \ $(sysconfdir)/udev/rules.d @@ -5539,8 +5531,7 @@ pam_systemd_la_SOURCES = \ pam_systemd_la_CFLAGS = \ $(AM_CFLAGS) \ - $(PAM_CFLAGS) \ - -fvisibility=hidden + $(PAM_CFLAGS) pam_systemd_la_LDFLAGS = \ $(AM_LDFLAGS) \ diff --git a/man/journald.conf.xml b/man/journald.conf.xml index 8d0dbb0133..f8eb398aba 100644 --- a/man/journald.conf.xml +++ b/man/journald.conf.xml @@ -231,12 +231,13 @@ eighth of the values configured with <varname>SystemMaxUse=</varname> and <varname>RuntimeMaxUse=</varname>, so that usually seven - rotated journal files are kept as history. Specify values in - bytes or use K, M, G, T, P, E as units for the specified sizes - (equal to 1024, 1024²,... bytes). Note that size limits are - enforced synchronously when journal files are extended, and no - explicit rotation step triggered by time is - needed.</para></listitem> + rotated journal files are kept as history.</para></listitem> + + <para>Specify values in bytes or use K, M, G, T, P, E as + units for the specified sizes (equal to 1024, 1024²,... bytes). + Note that size limits are enforced synchronously when journal + files are extended, and no explicit rotation step triggered by + time is needed.</para> </varlistentry> <varlistentry> diff --git a/src/basic/macro.h b/src/basic/macro.h index cc1c9e73c0..5fa17ed208 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -248,18 +248,19 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) { REENABLE_WARNING #endif +#define assert_log(expr) ((_likely_(expr)) \ + ? (true) \ + : (log_assert_failed_return(#expr, __FILE__, __LINE__, __PRETTY_FUNCTION__), false)) + #define assert_return(expr, r) \ do { \ - if (_unlikely_(!(expr))) { \ - log_assert_failed_return(#expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ + if (!assert_log(expr)) \ return (r); \ - } \ } while (false) #define assert_return_errno(expr, r, err) \ do { \ - if (_unlikely_(!(expr))) { \ - log_assert_failed_return(#expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ + if (!assert_log(expr)) { \ errno = err; \ return (r); \ } \ diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c index dac157be16..64a5a972ae 100644 --- a/src/libsystemd/sd-bus/bus-error.c +++ b/src/libsystemd/sd-bus/bus-error.c @@ -70,9 +70,11 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = { SD_BUS_ERROR_MAP_END }; -/* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */ -extern const sd_bus_error_map __start_BUS_ERROR_MAP[]; -extern const sd_bus_error_map __stop_BUS_ERROR_MAP[]; +/* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section. + * Hide them; for currently unknown reasons they get exported to the shared libries + * even without being listed in the sym file. */ +extern const sd_bus_error_map __start_BUS_ERROR_MAP[] _hidden_; +extern const sd_bus_error_map __stop_BUS_ERROR_MAP[] _hidden_; /* Additional maps registered with sd_bus_error_add_map() are in this * NULL terminated array */ diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 00880c983b..76964aa0cc 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -468,24 +468,22 @@ static bool event_pid_changed(sd_event *e) { return e->original_pid != getpid(); } -static int source_io_unregister(sd_event_source *s) { +static void source_io_unregister(sd_event_source *s) { int r; assert(s); assert(s->type == SOURCE_IO); if (event_pid_changed(s->event)) - return 0; + return; if (!s->io.registered) - return 0; + return; r = epoll_ctl(s->event->epoll_fd, EPOLL_CTL_DEL, s->io.fd, NULL); - if (r < 0) - return -errno; + assert_log(r >= 0); s->io.registered = false; - return 0; } static int source_io_register( @@ -1457,10 +1455,7 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { switch (s->type) { case SOURCE_IO: - r = source_io_unregister(s); - if (r < 0) - return r; - + source_io_unregister(s); s->enabled = m; break; diff --git a/src/udev/udevd.c b/src/udev/udevd.c index d3797bb5e6..5ce11606c9 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -735,14 +735,14 @@ static void manager_exit(Manager *manager) { "STATUS=Starting shutdown..."); /* close sources of new events and discard buffered events */ - manager->ctrl = udev_ctrl_unref(manager->ctrl); manager->ctrl_event = sd_event_source_unref(manager->ctrl_event); + manager->ctrl = udev_ctrl_unref(manager->ctrl); - manager->fd_inotify = safe_close(manager->fd_inotify); manager->inotify_event = sd_event_source_unref(manager->inotify_event); + manager->fd_inotify = safe_close(manager->fd_inotify); - manager->monitor = udev_monitor_unref(manager->monitor); manager->uevent_event = sd_event_source_unref(manager->uevent_event); + manager->monitor = udev_monitor_unref(manager->monitor); /* discard queued events and kill workers */ event_queue_cleanup(manager, EVENT_QUEUED); |