diff options
author | Sven Eden <yamakuzure@gmx.net> | 2016-12-30 15:43:50 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 10:18:27 +0100 |
commit | 1532f28b7cf3e6e02e74691450b2b5379be6b805 (patch) | |
tree | 184d2f253b46da8658037e51c1670122983a32c8 /src | |
parent | 37570c53dc8865f07ae8ff5a9915d7ed797b951f (diff) |
Prep v222: Update build system:
- The content of the man pages directory has been overhauled
- Makefile-man.am was regenerated
- Makefile.am and configure.ac needed a few addtitions and fixes
- Some masked functions had to be unmasked
- Now superfluous files have been removed
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/btrfs-util.h | 88 | ||||
-rw-r--r-- | src/basic/util.c | 3 | ||||
-rw-r--r-- | src/login/loginctl.c | 2 | ||||
-rw-r--r-- | src/shared/bus-util.c | 3 | ||||
-rw-r--r-- | src/shared/bus-util.h | 4 | ||||
-rw-r--r-- | src/shared/cgroup-show.h | 3 | ||||
-rw-r--r-- | src/shared/logs-show.h | 71 | ||||
-rw-r--r-- | src/systemd/sd-dhcp6-lease.h | 39 | ||||
-rw-r--r-- | src/systemd/sd-journal.h | 159 |
9 files changed, 5 insertions, 367 deletions
diff --git a/src/basic/btrfs-util.h b/src/basic/btrfs-util.h deleted file mode 100644 index 94ab1b59b..000000000 --- a/src/basic/btrfs-util.h +++ /dev/null @@ -1,88 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - -/*** - This file is part of systemd. - - Copyright 2014 Lennart Poettering - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see <http://www.gnu.org/licenses/>. -***/ - -#pragma once - -#include <stdbool.h> -#include <sys/types.h> - -#include "time-util.h" - -typedef struct BtrfsSubvolInfo { - uint64_t subvol_id; - usec_t otime; - - sd_id128_t uuid; - sd_id128_t parent_uuid; - - bool read_only; -} BtrfsSubvolInfo; - -typedef struct BtrfsQuotaInfo { - uint64_t referenced; - uint64_t exclusive; - uint64_t referenced_max; - uint64_t exclusive_max; -} BtrfsQuotaInfo; - -typedef enum BtrfsSnapshotFlags { - BTRFS_SNAPSHOT_FALLBACK_COPY = 1, - BTRFS_SNAPSHOT_READ_ONLY = 2, - BTRFS_SNAPSHOT_RECURSIVE = 4, -} BtrfsSnapshotFlags; - -int btrfs_is_filesystem(int fd); -int btrfs_is_subvol(int fd); - -int btrfs_subvol_make(const char *path); -int btrfs_subvol_make_label(const char *path); - -int btrfs_subvol_snapshot_fd(int old_fd, const char *new_path, BtrfsSnapshotFlags flags); -int btrfs_subvol_snapshot(const char *old_path, const char *new_path, BtrfsSnapshotFlags flags); - -int btrfs_subvol_set_read_only_fd(int fd, bool b); -int btrfs_subvol_set_read_only(const char *path, bool b); -// UNNEEDED int btrfs_subvol_get_read_only_fd(int fd); -int btrfs_subvol_get_id(int fd, const char *subvolume, uint64_t *ret); -int btrfs_subvol_get_id_fd(int fd, uint64_t *ret); -int btrfs_subvol_get_info_fd(int fd, BtrfsSubvolInfo *info); -int btrfs_subvol_get_quota_fd(int fd, BtrfsQuotaInfo *quota); - -int btrfs_reflink(int infd, int outfd); -// UNNEEDED int btrfs_clone_range(int infd, uint64_t in_offset, int ofd, uint64_t out_offset, uint64_t sz); - -int btrfs_get_block_device_fd(int fd, dev_t *dev); -int btrfs_get_block_device(const char *path, dev_t *dev); - -int btrfs_defrag_fd(int fd); -int btrfs_defrag(const char *p); - -int btrfs_quota_enable_fd(int fd, bool b); -int btrfs_quota_enable(const char *path, bool b); - -int btrfs_quota_limit_fd(int fd, uint64_t referenced_max); -int btrfs_quota_limit(const char *path, uint64_t referenced_max); - -int btrfs_resize_loopback_fd(int fd, uint64_t size, bool grow_only); -int btrfs_resize_loopback(const char *path, uint64_t size, bool grow_only); - -int btrfs_subvol_remove(const char *path, bool recursive); -int btrfs_subvol_remove_fd(int fd, const char *subvolume, bool recursive); diff --git a/src/basic/util.c b/src/basic/util.c index 3945abdbe..f17a473d6 100644 --- a/src/basic/util.c +++ b/src/basic/util.c @@ -4362,8 +4362,6 @@ int parse_proc_cmdline(int (*parse_item)(const char *key, const char *value)) { return 0; } -/// UNNEEDED by elogind -#if 0 int get_proc_cmdline_key(const char *key, char **value) { _cleanup_free_ char *line = NULL, *ret = NULL; bool found = false; @@ -4416,7 +4414,6 @@ int get_proc_cmdline_key(const char *key, char **value) { return found; } -#endif // 0 int container_get_leader(const char *machine, pid_t *pid) { _cleanup_free_ char *s = NULL, *class = NULL; diff --git a/src/login/loginctl.c b/src/login/loginctl.c index bd7ec27da..2a2c71f8f 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -37,7 +37,7 @@ #include "strv.h" #include "unit-name.h" #include "sysfs-show.h" -#include "logs-show.h" +// #include "logs-show.h" #include "cgroup-show.h" #include "cgroup-util.h" #include "spawn-polkit-agent.h" diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index d408e70eb..3674105cc 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -2021,8 +2021,6 @@ int bus_path_decode_unique(const char *path, const char *prefix, char **ret_send return 1; } -/// UNNEEDED by elogind -#if 0 bool is_kdbus_wanted(void) { _cleanup_free_ char *value = NULL; #ifdef ENABLE_KDBUS @@ -2056,4 +2054,3 @@ bool is_kdbus_available(void) { return ioctl(fd, KDBUS_CMD_BUS_MAKE, &cmd) >= 0; } -#endif // 0 diff --git a/src/shared/bus-util.h b/src/shared/bus-util.h index da5874da7..3b6374ae7 100644 --- a/src/shared/bus-util.h +++ b/src/shared/bus-util.h @@ -197,5 +197,5 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(BusWaitForJobs*, bus_wait_for_jobs_free); int bus_path_encode_unique(sd_bus *b, const char *prefix, const char *sender_id, const char *external_id, char **ret_path); int bus_path_decode_unique(const char *path, const char *prefix, char **ret_sender, char **ret_external); -// UNNEEDED bool is_kdbus_wanted(void); -// UNNEEDED bool is_kdbus_available(void); +bool is_kdbus_wanted(void); +bool is_kdbus_available(void); diff --git a/src/shared/cgroup-show.h b/src/shared/cgroup-show.h index 8afe05736..7c9c3f652 100644 --- a/src/shared/cgroup-show.h +++ b/src/shared/cgroup-show.h @@ -23,7 +23,8 @@ #include <stdbool.h> #include <sys/types.h> -#include "logs-show.h" +// #include "logs-show.h" +#include "output-mode.h" int show_cgroup_by_path(const char *path, const char *prefix, unsigned columns, bool kernel_threads, OutputFlags flags); int show_cgroup(const char *controller, const char *path, const char *prefix, unsigned columns, bool kernel_threads, OutputFlags flags); diff --git a/src/shared/logs-show.h b/src/shared/logs-show.h deleted file mode 100644 index 569e1faa5..000000000 --- a/src/shared/logs-show.h +++ /dev/null @@ -1,71 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - -#pragma once - -/*** - This file is part of systemd. - - Copyright 2012 Lennart Poettering - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see <http://www.gnu.org/licenses/>. -***/ - -#include <stdbool.h> -#include <sys/types.h> - -#include "sd-journal.h" - -#include "util.h" -#include "output-mode.h" - -int output_journal( - FILE *f, - sd_journal *j, - OutputMode mode, - unsigned n_columns, - OutputFlags flags, - bool *ellipsized); - -int add_match_this_boot(sd_journal *j, const char *machine); - -int add_matches_for_unit( - sd_journal *j, - const char *unit); - -int add_matches_for_user_unit( - sd_journal *j, - const char *unit, - uid_t uid); - -int show_journal_by_unit( - FILE *f, - const char *unit, - OutputMode mode, - unsigned n_columns, - usec_t not_before, - unsigned how_many, - uid_t uid, - OutputFlags flags, - int journal_open_flags, - bool system_unit, - bool *ellipsized); - -void json_escape( - FILE *f, - const char* p, - size_t l, - OutputFlags flags); - -const char* output_mode_to_string(OutputMode m) _const_; -OutputMode output_mode_from_string(const char *s) _pure_; diff --git a/src/systemd/sd-dhcp6-lease.h b/src/systemd/sd-dhcp6-lease.h deleted file mode 100644 index 716d7678f..000000000 --- a/src/systemd/sd-dhcp6-lease.h +++ /dev/null @@ -1,39 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - -#ifndef foosddhcp6leasehfoo -#define foosddhcp6leasehfoo - -/*** - This file is part of systemd. - - Copyright (C) 2014 Tom Gundersen - Copyright (C) 2014 Intel Corporation. All rights reserved. - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see <http://www.gnu.org/licenses/>. -***/ - -#include <netinet/in.h> - -typedef struct sd_dhcp6_lease sd_dhcp6_lease; - -void sd_dhcp6_lease_reset_address_iter(sd_dhcp6_lease *lease); -int sd_dhcp6_lease_get_address(sd_dhcp6_lease *lease, - struct in6_addr *addr, - uint32_t *lifetime_preferred, - uint32_t *lifetime_valid); - -sd_dhcp6_lease *sd_dhcp6_lease_ref(sd_dhcp6_lease *lease); -sd_dhcp6_lease *sd_dhcp6_lease_unref(sd_dhcp6_lease *lease); - -#endif diff --git a/src/systemd/sd-journal.h b/src/systemd/sd-journal.h deleted file mode 100644 index 00237a215..000000000 --- a/src/systemd/sd-journal.h +++ /dev/null @@ -1,159 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - -#ifndef foosdjournalhfoo -#define foosdjournalhfoo - -/*** - 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 Lesser General Public License as published by - the Free Software Foundation; either version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see <http://www.gnu.org/licenses/>. -***/ - -#include <inttypes.h> -#include <sys/types.h> -#include <stdarg.h> -#include <sys/uio.h> -#include <syslog.h> - -#include "sd-id128.h" -#include "_sd-common.h" - -/* Journal APIs. See sd-journal(3) for more information. */ - -_SD_BEGIN_DECLARATIONS; - -/* Write to daemon */ -int sd_journal_print(int priority, const char *format, ...) _sd_printf_(2, 3); -int sd_journal_printv(int priority, const char *format, va_list ap) _sd_printf_(2, 0); -int sd_journal_send(const char *format, ...) _sd_printf_(1, 0) _sd_sentinel_; -int sd_journal_sendv(const struct iovec *iov, int n); -int sd_journal_perror(const char *message); - -/* Used by the macros below. You probably don't want to call this directly. */ -int sd_journal_print_with_location(int priority, const char *file, const char *line, const char *func, const char *format, ...) _sd_printf_(5, 6); -int sd_journal_printv_with_location(int priority, const char *file, const char *line, const char *func, const char *format, va_list ap) _sd_printf_(5, 0); -int sd_journal_send_with_location(const char *file, const char *line, const char *func, const char *format, ...) _sd_printf_(4, 0) _sd_sentinel_; -int sd_journal_sendv_with_location(const char *file, const char *line, const char *func, const struct iovec *iov, int n); -int sd_journal_perror_with_location(const char *file, const char *line, const char *func, const char *message); - -/* implicitly add code location to messages sent, if this is enabled */ -#ifndef SD_JOURNAL_SUPPRESS_LOCATION - -#define sd_journal_print(priority, ...) sd_journal_print_with_location(priority, "CODE_FILE=" __FILE__, "CODE_LINE=" _SD_STRINGIFY(__LINE__), __func__, __VA_ARGS__) -#define sd_journal_printv(priority, format, ap) sd_journal_printv_with_location(priority, "CODE_FILE=" __FILE__, "CODE_LINE=" _SD_STRINGIFY(__LINE__), __func__, format, ap) -#define sd_journal_send(...) sd_journal_send_with_location("CODE_FILE=" __FILE__, "CODE_LINE=" _SD_STRINGIFY(__LINE__), __func__, __VA_ARGS__) -#define sd_journal_sendv(iovec, n) sd_journal_sendv_with_location("CODE_FILE=" __FILE__, "CODE_LINE=" _SD_STRINGIFY(__LINE__), __func__, iovec, n) -#define sd_journal_perror(message) sd_journal_perror_with_location("CODE_FILE=" __FILE__, "CODE_LINE=" _SD_STRINGIFY(__LINE__), __func__, message) - -#endif - -int sd_journal_stream_fd(const char *identifier, int priority, int level_prefix); - -/* Browse journal stream */ - -typedef struct sd_journal sd_journal; - -/* Open flags */ -enum { - SD_JOURNAL_LOCAL_ONLY = 1, - SD_JOURNAL_RUNTIME_ONLY = 2, - SD_JOURNAL_SYSTEM = 4, - SD_JOURNAL_CURRENT_USER = 8, - - SD_JOURNAL_SYSTEM_ONLY = SD_JOURNAL_SYSTEM, /* deprecated name */ -}; - -/* Wakeup event types */ -enum { - SD_JOURNAL_NOP, - SD_JOURNAL_APPEND, - SD_JOURNAL_INVALIDATE -}; - -int sd_journal_open(sd_journal **ret, int flags); -int sd_journal_open_directory(sd_journal **ret, const char *path, int flags); -int sd_journal_open_files(sd_journal **ret, const char **paths, int flags); -int sd_journal_open_container(sd_journal **ret, const char *machine, int flags); -void sd_journal_close(sd_journal *j); - -int sd_journal_previous(sd_journal *j); -int sd_journal_next(sd_journal *j); - -int sd_journal_previous_skip(sd_journal *j, uint64_t skip); -int sd_journal_next_skip(sd_journal *j, uint64_t skip); - -int sd_journal_get_realtime_usec(sd_journal *j, uint64_t *ret); -int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret, sd_id128_t *ret_boot_id); - -int sd_journal_set_data_threshold(sd_journal *j, size_t sz); -int sd_journal_get_data_threshold(sd_journal *j, size_t *sz); - -int sd_journal_get_data(sd_journal *j, const char *field, const void **data, size_t *l); -int sd_journal_enumerate_data(sd_journal *j, const void **data, size_t *l); -void sd_journal_restart_data(sd_journal *j); - -int sd_journal_add_match(sd_journal *j, const void *data, size_t size); -int sd_journal_add_disjunction(sd_journal *j); -int sd_journal_add_conjunction(sd_journal *j); -void sd_journal_flush_matches(sd_journal *j); - -int sd_journal_seek_head(sd_journal *j); -int sd_journal_seek_tail(sd_journal *j); -int sd_journal_seek_monotonic_usec(sd_journal *j, sd_id128_t boot_id, uint64_t usec); -int sd_journal_seek_realtime_usec(sd_journal *j, uint64_t usec); -int sd_journal_seek_cursor(sd_journal *j, const char *cursor); - -int sd_journal_get_cursor(sd_journal *j, char **cursor); -int sd_journal_test_cursor(sd_journal *j, const char *cursor); - -int sd_journal_get_cutoff_realtime_usec(sd_journal *j, uint64_t *from, uint64_t *to); -int sd_journal_get_cutoff_monotonic_usec(sd_journal *j, const sd_id128_t boot_id, uint64_t *from, uint64_t *to); - -int sd_journal_get_usage(sd_journal *j, uint64_t *bytes); - -int sd_journal_query_unique(sd_journal *j, const char *field); -int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_t *l); -void sd_journal_restart_unique(sd_journal *j); - -int sd_journal_get_fd(sd_journal *j); -int sd_journal_get_events(sd_journal *j); -int sd_journal_get_timeout(sd_journal *j, uint64_t *timeout_usec); -int sd_journal_process(sd_journal *j); -int sd_journal_wait(sd_journal *j, uint64_t timeout_usec); -int sd_journal_reliable_fd(sd_journal *j); - -int sd_journal_get_catalog(sd_journal *j, char **text); -int sd_journal_get_catalog_for_message_id(sd_id128_t id, char **text); - -/* the inverse condition avoids ambiguity of danling 'else' after the macro */ -#define SD_JOURNAL_FOREACH(j) \ - if (sd_journal_seek_head(j) < 0) { } \ - else while (sd_journal_next(j) > 0) - -/* the inverse condition avoids ambiguity of danling 'else' after the macro */ -#define SD_JOURNAL_FOREACH_BACKWARDS(j) \ - if (sd_journal_seek_tail(j) < 0) { } \ - else while (sd_journal_previous(j) > 0) - -#define SD_JOURNAL_FOREACH_DATA(j, data, l) \ - for (sd_journal_restart_data(j); sd_journal_enumerate_data((j), &(data), &(l)) > 0; ) - -#define SD_JOURNAL_FOREACH_UNIQUE(j, data, l) \ - for (sd_journal_restart_unique(j); sd_journal_enumerate_unique((j), &(data), &(l)) > 0; ) - -_SD_END_DECLARATIONS; - -#endif |