| architecture.h | | architecture.h | |
| | | | |
| skipping to change at line 24 | | skipping to change at line 24 | |
| | | | |
| systemd is distributed in the hope that it will be useful, but | | systemd is distributed in the hope that it will be useful, but | |
| WITHOUT ANY WARRANTY; without even the implied warranty of | | WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| Lesser General Public License for more details. | | Lesser General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU Lesser General Public License | | You should have received a copy of the GNU Lesser General Public License | |
| along with systemd; If not, see <http://www.gnu.org/licenses/>. | | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
| ***/ | | ***/ | |
| | | | |
|
| | | #include <endian.h> | |
| | | | |
| #include "util.h" | | #include "util.h" | |
| | | | |
| /* A cleaned up architecture definition. We don't want to get lost in | | /* A cleaned up architecture definition. We don't want to get lost in | |
| * processor features, models, generations or even ABIs. Hence we | | * processor features, models, generations or even ABIs. Hence we | |
| * focus on general family, and distuignish word width and | | * focus on general family, and distuignish word width and | |
| * endianess. */ | | * endianess. */ | |
| | | | |
| typedef enum Architecture { | | typedef enum Architecture { | |
| ARCHITECTURE_X86 = 0, | | ARCHITECTURE_X86 = 0, | |
| ARCHITECTURE_X86_64, | | ARCHITECTURE_X86_64, | |
| | | | |
| skipping to change at line 83 | | skipping to change at line 85 | |
| * Debian's paths on all distributions. | | * Debian's paths on all distributions. | |
| */ | | */ | |
| | | | |
| #if defined(__x86_64__) | | #if defined(__x86_64__) | |
| # define native_architecture() ARCHITECTURE_X86_64 | | # define native_architecture() ARCHITECTURE_X86_64 | |
| # define LIB_ARCH_TUPLE "x86_64-linux-gnu" | | # define LIB_ARCH_TUPLE "x86_64-linux-gnu" | |
| #elif defined(__i386__) | | #elif defined(__i386__) | |
| # define native_architecture() ARCHITECTURE_X86 | | # define native_architecture() ARCHITECTURE_X86 | |
| # define LIB_ARCH_TUPLE "i386-linux-gnu" | | # define LIB_ARCH_TUPLE "i386-linux-gnu" | |
| #elif defined(__powerpc64__) | | #elif defined(__powerpc64__) | |
|
| # if defined(WORDS_BIGENDIAN) | | # if __BYTE_ORDER == __BIG_ENDIAN | |
| # define native_architecture() ARCHITECTURE_PPC64 | | # define native_architecture() ARCHITECTURE_PPC64 | |
| # define LIB_ARCH_TUPLE "ppc64-linux-gnu" | | # define LIB_ARCH_TUPLE "ppc64-linux-gnu" | |
| # else | | # else | |
| # define native_architecture() ARCHITECTURE_PPC64_LE | | # define native_architecture() ARCHITECTURE_PPC64_LE | |
|
| # error "Missing LIB_ARCH_TUPLE for PPC64LE" | | # define LIB_ARCH_TUPLE "powerpc64le-linux-gnu" | |
| # endif | | # endif | |
| #elif defined(__powerpc__) | | #elif defined(__powerpc__) | |
|
| # if defined(WORDS_BIGENDIAN) | | # if __BYTE_ORDER == __BIG_ENDIAN | |
| # define native_architecture() ARCHITECTURE_PPC | | # define native_architecture() ARCHITECTURE_PPC | |
| # define LIB_ARCH_TUPLE "powerpc-linux-gnu" | | # define LIB_ARCH_TUPLE "powerpc-linux-gnu" | |
| # else | | # else | |
| # define native_architecture() ARCHITECTURE_PPC_LE | | # define native_architecture() ARCHITECTURE_PPC_LE | |
| # error "Missing LIB_ARCH_TUPLE for PPCLE" | | # error "Missing LIB_ARCH_TUPLE for PPCLE" | |
| # endif | | # endif | |
| #elif defined(__ia64__) | | #elif defined(__ia64__) | |
| # define native_architecture() ARCHITECTURE_IA64 | | # define native_architecture() ARCHITECTURE_IA64 | |
| # define LIB_ARCH_TUPLE "ia64-linux-gnu" | | # define LIB_ARCH_TUPLE "ia64-linux-gnu" | |
| #elif defined(__hppa64__) | | #elif defined(__hppa64__) | |
| | | | |
| skipping to change at line 120 | | skipping to change at line 122 | |
| #elif defined(__s390__) | | #elif defined(__s390__) | |
| # define native_architecture() ARCHITECTURE_S390 | | # define native_architecture() ARCHITECTURE_S390 | |
| # define LIB_ARCH_TUPLE "s390-linux-gnu" | | # define LIB_ARCH_TUPLE "s390-linux-gnu" | |
| #elif defined(__sparc64__) | | #elif defined(__sparc64__) | |
| # define native_architecture() ARCHITECTURE_SPARC64 | | # define native_architecture() ARCHITECTURE_SPARC64 | |
| # define LIB_ARCH_TUPLE "sparc64-linux-gnu" | | # define LIB_ARCH_TUPLE "sparc64-linux-gnu" | |
| #elif defined(__sparc__) | | #elif defined(__sparc__) | |
| # define native_architecture() ARCHITECTURE_SPARC | | # define native_architecture() ARCHITECTURE_SPARC | |
| # define LIB_ARCH_TUPLE "sparc-linux-gnu" | | # define LIB_ARCH_TUPLE "sparc-linux-gnu" | |
| #elif defined(__mips64__) | | #elif defined(__mips64__) | |
|
| # if defined(WORDS_BIGENDIAN) | | # if __BYTE_ORDER == __BIG_ENDIAN | |
| # define native_architecture() ARCHITECTURE_MIPS64 | | # define native_architecture() ARCHITECTURE_MIPS64 | |
| # error "Missing LIB_ARCH_TUPLE for MIPS64" | | # error "Missing LIB_ARCH_TUPLE for MIPS64" | |
| # else | | # else | |
| # define native_architecture() ARCHITECTURE_MIPS64_LE | | # define native_architecture() ARCHITECTURE_MIPS64_LE | |
| # error "Missing LIB_ARCH_TUPLE for MIPS64_LE" | | # error "Missing LIB_ARCH_TUPLE for MIPS64_LE" | |
| # endif | | # endif | |
| #elif defined(__mips__) | | #elif defined(__mips__) | |
|
| # if defined(WORDS_BIGENDIAN) | | # if __BYTE_ORDER == __BIG_ENDIAN | |
| # define native_architecture() ARCHITECTURE_MIPS | | # define native_architecture() ARCHITECTURE_MIPS | |
| # define LIB_ARCH_TUPLE "mips-linux-gnu" | | # define LIB_ARCH_TUPLE "mips-linux-gnu" | |
| # else | | # else | |
| # define native_architecture() ARCHITECTURE_MIPS_LE | | # define native_architecture() ARCHITECTURE_MIPS_LE | |
| # define LIB_ARCH_TUPLE "mipsel-linux-gnu" | | # define LIB_ARCH_TUPLE "mipsel-linux-gnu" | |
| #endif | | #endif | |
| #elif defined(__alpha__) | | #elif defined(__alpha__) | |
| # define native_architecture() ARCHITECTURE_ALPHA | | # define native_architecture() ARCHITECTURE_ALPHA | |
| # define LIB_ARCH_TUPLE "alpha-linux-gnu" | | # define LIB_ARCH_TUPLE "alpha-linux-gnu" | |
| #elif defined(__aarch64__) | | #elif defined(__aarch64__) | |
|
| # if defined(WORDS_BIGENDIAN) | | # if __BYTE_ORDER == __BIG_ENDIAN | |
| # define native_architecture() ARCHITECTURE_ARM64_BE | | # define native_architecture() ARCHITECTURE_ARM64_BE | |
| # define LIB_ARCH_TUPLE "aarch64_be-linux-gnu" | | # define LIB_ARCH_TUPLE "aarch64_be-linux-gnu" | |
| # else | | # else | |
| # define native_architecture() ARCHITECTURE_ARM64 | | # define native_architecture() ARCHITECTURE_ARM64 | |
| # define LIB_ARCH_TUPLE "aarch64-linux-gnu" | | # define LIB_ARCH_TUPLE "aarch64-linux-gnu" | |
| # endif | | # endif | |
| #elif defined(__arm__) | | #elif defined(__arm__) | |
|
| # if defined(WORDS_BIGENDIAN) | | # if __BYTE_ORDER == __BIG_ENDIAN | |
| # define native_architecture() ARCHITECTURE_ARM_BE | | # define native_architecture() ARCHITECTURE_ARM_BE | |
| # if defined(__ARM_EABI__) | | # if defined(__ARM_EABI__) | |
| # if defined(__ARM_PCS_VFP) | | # if defined(__ARM_PCS_VFP) | |
| # define LIB_ARCH_TUPLE "armeb-linux-gnueabihf" | | # define LIB_ARCH_TUPLE "armeb-linux-gnueabihf" | |
| # else | | # else | |
| # define LIB_ARCH_TUPLE "armeb-linux-gnueabi" | | # define LIB_ARCH_TUPLE "armeb-linux-gnueabi" | |
| # endif | | # endif | |
| # else | | # else | |
| # define LIB_ARCH_TUPLE "armeb-linux-gnu" | | # define LIB_ARCH_TUPLE "armeb-linux-gnu" | |
| # endif | | # endif | |
| | | | |
End of changes. 8 change blocks. |
| 7 lines changed or deleted | | 9 lines changed or added | |
|
| bus-util.h | | bus-util.h | |
| | | | |
| skipping to change at line 65 | | skipping to change at line 65 | |
| int bus_async_unregister_and_exit(sd_event *e, sd_bus *bus, const char *nam
e); | | int bus_async_unregister_and_exit(sd_event *e, sd_bus *bus, const char *nam
e); | |
| | | | |
| typedef bool (*check_idle_t)(void *userdata); | | typedef bool (*check_idle_t)(void *userdata); | |
| | | | |
| int bus_event_loop_with_idle(sd_event *e, sd_bus *bus, const char *name, us
ec_t timeout, check_idle_t check_idle, void *userdata); | | int bus_event_loop_with_idle(sd_event *e, sd_bus *bus, const char *name, us
ec_t timeout, check_idle_t check_idle, void *userdata); | |
| | | | |
| int bus_name_has_owner(sd_bus *c, const char *name, sd_bus_error *error); | | int bus_name_has_owner(sd_bus *c, const char *name, sd_bus_error *error); | |
| | | | |
| int bus_check_peercred(sd_bus *c); | | int bus_check_peercred(sd_bus *c); | |
| | | | |
|
| int bus_verify_polkit(sd_bus *bus, sd_bus_message *m, const char *action, b
ool interactive, bool *_challenge, sd_bus_error *e); | | int bus_verify_polkit(sd_bus_message *call, int capability, const char *act
ion, bool interactive, bool *_challenge, sd_bus_error *e); | |
| | | | |
|
| int bus_verify_polkit_async(sd_bus *bus, Hashmap **registry, sd_bus_message | | int bus_verify_polkit_async(sd_bus_message *call, int capability, const cha | |
| *m, const char *action, bool interactive, sd_bus_error *error, sd_bus_mess | | r *action, bool interactive, Hashmap **registry, sd_bus_error *error); | |
| age_handler_t callback, void *userdata); | | void bus_verify_polkit_async_registry_free(Hashmap *registry); | |
| void bus_verify_polkit_async_registry_free(sd_bus *bus, Hashmap *registry); | | | |
| | | | |
| int bus_open_system_systemd(sd_bus **_bus); | | int bus_open_system_systemd(sd_bus **_bus); | |
| int bus_open_user_systemd(sd_bus **_bus); | | int bus_open_user_systemd(sd_bus **_bus); | |
| | | | |
| int bus_open_transport(BusTransport transport, const char *host, bool user,
sd_bus **bus); | | int bus_open_transport(BusTransport transport, const char *host, bool user,
sd_bus **bus); | |
| int bus_open_transport_systemd(BusTransport transport, const char *host, bo
ol user, sd_bus **bus); | | int bus_open_transport_systemd(BusTransport transport, const char *host, bo
ol user, sd_bus **bus); | |
| | | | |
| int bus_print_property(const char *name, sd_bus_message *property, bool all
); | | int bus_print_property(const char *name, sd_bus_message *property, bool all
); | |
| int bus_print_all_properties(sd_bus *bus, const char *dest, const char *pat
h, char **filter, bool all); | | int bus_print_all_properties(sd_bus *bus, const char *dest, const char *pat
h, char **filter, bool all); | |
| | | | |
| | | | |
| skipping to change at line 140 | | skipping to change at line 140 | |
| const char *sub_state; | | const char *sub_state; | |
| const char *following; | | const char *following; | |
| const char *unit_path; | | const char *unit_path; | |
| uint32_t job_id; | | uint32_t job_id; | |
| const char *job_type; | | const char *job_type; | |
| const char *job_path; | | const char *job_path; | |
| } UnitInfo; | | } UnitInfo; | |
| | | | |
| int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u); | | int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u); | |
| | | | |
|
| | | static inline void sd_bus_close_unrefp(sd_bus **bus) { | |
| | | if (*bus) { | |
| | | sd_bus_flush(*bus); | |
| | | sd_bus_close(*bus); | |
| | | sd_bus_unref(*bus); | |
| | | } | |
| | | } | |
| | | | |
| DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus*, sd_bus_unref); | | DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus*, sd_bus_unref); | |
| DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_slot*, sd_bus_slot_unref); | | DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_slot*, sd_bus_slot_unref); | |
| DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_message*, sd_bus_message_unref); | | DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_message*, sd_bus_message_unref); | |
| DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_creds*, sd_bus_creds_unref); | | DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_creds*, sd_bus_creds_unref); | |
| DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_track*, sd_bus_track_unref); | | DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_track*, sd_bus_track_unref); | |
| | | | |
| #define _cleanup_bus_unref_ _cleanup_(sd_bus_unrefp) | | #define _cleanup_bus_unref_ _cleanup_(sd_bus_unrefp) | |
|
| | | #define _cleanup_bus_close_unref_ _cleanup_(sd_bus_close_unrefp) | |
| #define _cleanup_bus_slot_unref_ _cleanup_(sd_bus_slot_unrefp) | | #define _cleanup_bus_slot_unref_ _cleanup_(sd_bus_slot_unrefp) | |
| #define _cleanup_bus_message_unref_ _cleanup_(sd_bus_message_unrefp) | | #define _cleanup_bus_message_unref_ _cleanup_(sd_bus_message_unrefp) | |
| #define _cleanup_bus_creds_unref_ _cleanup_(sd_bus_creds_unrefp) | | #define _cleanup_bus_creds_unref_ _cleanup_(sd_bus_creds_unrefp) | |
| #define _cleanup_bus_track_unref_ _cleanup_(sd_bus_slot_unrefp) | | #define _cleanup_bus_track_unref_ _cleanup_(sd_bus_slot_unrefp) | |
| #define _cleanup_bus_error_free_ _cleanup_(sd_bus_error_free) | | #define _cleanup_bus_error_free_ _cleanup_(sd_bus_error_free) | |
| | | | |
| #define BUS_DEFINE_PROPERTY_GET_ENUM(function, name, type) \ | | #define BUS_DEFINE_PROPERTY_GET_ENUM(function, name, type) \ | |
| int function(sd_bus *bus, \ | | int function(sd_bus *bus, \ | |
| const char *path, \ | | const char *path, \ | |
| const char *interface, \ | | const char *interface, \ | |
| | | | |
End of changes. 4 change blocks. |
| 5 lines changed or deleted | | 13 lines changed or added | |
|
| conf-parser.h | | conf-parser.h | |
| | | | |
| skipping to change at line 68 | | skipping to change at line 68 | |
| ConfigParserCallback parse; /* Function that is called to parse
the variable's value */ | | ConfigParserCallback parse; /* Function that is called to parse
the variable's value */ | |
| int ltype; /* Distinguish different variables
passed to the same callback */ | | int ltype; /* Distinguish different variables
passed to the same callback */ | |
| size_t offset; /* Offset where to store data, from
the beginning of userdata */ | | size_t offset; /* Offset where to store data, from
the beginning of userdata */ | |
| } ConfigPerfItem; | | } ConfigPerfItem; | |
| | | | |
| /* Prototype for a low-level gperf lookup function */ | | /* Prototype for a low-level gperf lookup function */ | |
| typedef const ConfigPerfItem* (*ConfigPerfItemLookup)(const char *section_a
nd_lvalue, unsigned length); | | typedef const ConfigPerfItem* (*ConfigPerfItemLookup)(const char *section_a
nd_lvalue, unsigned length); | |
| | | | |
| /* Prototype for a generic high-level lookup function */ | | /* Prototype for a generic high-level lookup function */ | |
| typedef int (*ConfigItemLookup)( | | typedef int (*ConfigItemLookup)( | |
|
| void *table, | | const void *table, | |
| const char *section, | | const char *section, | |
| const char *lvalue, | | const char *lvalue, | |
| ConfigParserCallback *func, | | ConfigParserCallback *func, | |
| int *ltype, | | int *ltype, | |
| void **data, | | void **data, | |
| void *userdata); | | void *userdata); | |
| | | | |
| /* Linear table search implementation of ConfigItemLookup, based on | | /* Linear table search implementation of ConfigItemLookup, based on | |
| * ConfigTableItem arrays */ | | * ConfigTableItem arrays */ | |
|
| int config_item_table_lookup(void *table, const char *section, const char *
lvalue, ConfigParserCallback *func, int *ltype, void **data, void *userdata
); | | int config_item_table_lookup(const void *table, const char *section, const
char *lvalue, ConfigParserCallback *func, int *ltype, void **data, void *us
erdata); | |
| | | | |
| /* gperf implementation of ConfigItemLookup, based on gperf | | /* gperf implementation of ConfigItemLookup, based on gperf | |
| * ConfigPerfItem tables */ | | * ConfigPerfItem tables */ | |
|
| int config_item_perf_lookup(void *table, const char *section, const char *l
value, ConfigParserCallback *func, int *ltype, void **data, void *userdata)
; | | int config_item_perf_lookup(const void *table, const char *section, const c
har *lvalue, ConfigParserCallback *func, int *ltype, void **data, void *use
rdata); | |
| | | | |
| int config_parse(const char *unit, | | int config_parse(const char *unit, | |
| const char *filename, | | const char *filename, | |
| FILE *f, | | FILE *f, | |
| const char *sections, /* nulstr */ | | const char *sections, /* nulstr */ | |
| ConfigItemLookup lookup, | | ConfigItemLookup lookup, | |
|
| void *table, | | const void *table, | |
| bool relaxed, | | bool relaxed, | |
| bool allow_include, | | bool allow_include, | |
|
| | | bool warn, | |
| void *userdata); | | void *userdata); | |
| | | | |
| /* Generic parsers */ | | /* Generic parsers */ | |
| int config_parse_int(const char *unit, const char *filename, unsigned line,
const char *section, unsigned section_line, const char *lvalue, int ltype,
const char *rvalue, void *data, void *userdata); | | int config_parse_int(const char *unit, const char *filename, unsigned line,
const char *section, unsigned section_line, const char *lvalue, int ltype,
const char *rvalue, void *data, void *userdata); | |
| int config_parse_unsigned(const char *unit, const char *filename, unsigned
line, const char *section, unsigned section_line, const char *lvalue, int l
type, const char *rvalue, void *data, void *userdata); | | int config_parse_unsigned(const char *unit, const char *filename, unsigned
line, const char *section, unsigned section_line, const char *lvalue, int l
type, const char *rvalue, void *data, void *userdata); | |
| int config_parse_long(const char *unit, const char *filename, unsigned line
, const char *section, unsigned section_line, const char *lvalue, int ltype
, const char *rvalue, void *data, void *userdata); | | int config_parse_long(const char *unit, const char *filename, unsigned line
, const char *section, unsigned section_line, const char *lvalue, int ltype
, const char *rvalue, void *data, void *userdata); | |
| int config_parse_uint64(const char *unit, const char *filename, unsigned li
ne, const char *section, unsigned section_line, const char *lvalue, int lty
pe, const char *rvalue, void *data, void *userdata); | | int config_parse_uint64(const char *unit, const char *filename, unsigned li
ne, const char *section, unsigned section_line, const char *lvalue, int lty
pe, const char *rvalue, void *data, void *userdata); | |
| int config_parse_double(const char *unit, const char *filename, unsigned li
ne, const char *section, unsigned section_line, const char *lvalue, int lt
ype, const char *rvalue, void *data, void *userdata); | | int config_parse_double(const char *unit, const char *filename, unsigned li
ne, const char *section, unsigned section_line, const char *lvalue, int lt
ype, const char *rvalue, void *data, void *userdata); | |
| int config_parse_iec_size(const char *unit, const char *filename, unsigned
line, const char *section, unsigned section_line, const char *lvalue, int l
type, const char *rvalue, void *data, void *userdata); | | int config_parse_iec_size(const char *unit, const char *filename, unsigned
line, const char *section, unsigned section_line, const char *lvalue, int l
type, const char *rvalue, void *data, void *userdata); | |
| int config_parse_si_size(const char *unit, const char *filename, unsigned l
ine, const char *section, unsigned section_line, const char *lvalue, int lt
ype, const char *rvalue, void *data, void *userdata); | | int config_parse_si_size(const char *unit, const char *filename, unsigned l
ine, const char *section, unsigned section_line, const char *lvalue, int lt
ype, const char *rvalue, void *data, void *userdata); | |
| | | | |
| skipping to change at line 172 | | skipping to change at line 173 | |
| unsigned line,
\ | | unsigned line,
\ | |
| const char *section,
\ | | const char *section,
\ | |
| unsigned section_line,
\ | | unsigned section_line,
\ | |
| const char *lvalue,
\ | | const char *lvalue,
\ | |
| int ltype,
\ | | int ltype,
\ | |
| const char *rvalue,
\ | | const char *rvalue,
\ | |
| void *data,
\ | | void *data,
\ | |
| void *userdata) {
\ | | void *userdata) {
\ | |
|
\ | |
\ | |
| type **enums = data, *xs, x, *ys;
\ | | type **enums = data, *xs, x, *ys;
\ | |
|
| char *w, *state;
\ | | const char *word, *state;
\ | |
| size_t l, i = 0;
\ | | size_t l, i = 0;
\ | |
|
\ | |
\ | |
| assert(filename);
\ | | assert(filename);
\ | |
| assert(lvalue);
\ | | assert(lvalue);
\ | |
| assert(rvalue);
\ | | assert(rvalue);
\ | |
| assert(data);
\ | | assert(data);
\ | |
|
\ | |
\ | |
| xs = new0(type, 1);
\ | | xs = new0(type, 1);
\ | |
| *xs = invalid;
\ | | *xs = invalid;
\ | |
|
\ | |
\ | |
|
| FOREACH_WORD(w, l, rvalue, state) {
\ | | FOREACH_WORD(word, l, rvalue, state) {
\ | |
| _cleanup_free_ char *en = NULL;
\ | | _cleanup_free_ char *en = NULL;
\ | |
|
\ | |
\ | |
|
| en = strndup(w, l);
\ | | en = strndup(word, l);
\ | |
| if (!en)
\ | | if (!en)
\ | |
| return -ENOMEM;
\ | | return -ENOMEM;
\ | |
|
\ | |
\ | |
| if ((x = name##_from_string(en)) < 0) {
\ | | if ((x = name##_from_string(en)) < 0) {
\ | |
| log_syntax(unit, LOG_ERR, filename, line,
\ | | log_syntax(unit, LOG_ERR, filename, line,
\ | |
| -x, msg ", ignoring: %s", en);
\ | | -x, msg ", ignoring: %s", en);
\ | |
| continue;
\ | | continue;
\ | |
| }
\ | | }
\ | |
|
\ | |
\ | |
| for (ys = xs; x != invalid && *ys != invalid; ys++)
{ \ | | for (ys = xs; x != invalid && *ys != invalid; ys++)
{ \ | |
| | | | |
End of changes. 8 change blocks. |
| 7 lines changed or deleted | | 8 lines changed or added | |
|
| config.h | | config.h | |
| | | | |
| skipping to change at line 25 | | skipping to change at line 25 | |
| | | | |
| /* Define if kdbus support is to be enabled */ | | /* Define if kdbus support is to be enabled */ | |
| /* #undef ENABLE_KDBUS */ | | /* #undef ENABLE_KDBUS */ | |
| | | | |
| /* Define if networkd support is to be enabled */ | | /* Define if networkd support is to be enabled */ | |
| #define ENABLE_NETWORKD 1 | | #define ENABLE_NETWORKD 1 | |
| | | | |
| /* Define if PolicyKit support is to be enabled */ | | /* Define if PolicyKit support is to be enabled */ | |
| #define ENABLE_POLKIT 1 | | #define ENABLE_POLKIT 1 | |
| | | | |
|
| | | /* Define if terminal support is to be enabled */ | |
| | | /* #undef ENABLE_TERMINAL */ | |
| | | | |
| /* ACL available */ | | /* ACL available */ | |
| #define HAVE_ACL 1 | | #define HAVE_ACL 1 | |
| | | | |
| /* Define to 1 if you have the <acl/libacl.h> header file. */ | | /* Define to 1 if you have the <acl/libacl.h> header file. */ | |
| #define HAVE_ACL_LIBACL_H 1 | | #define HAVE_ACL_LIBACL_H 1 | |
| | | | |
| /* Define if AppArmor is available */ | | /* Define if AppArmor is available */ | |
| /* #undef HAVE_APPARMOR */ | | /* #undef HAVE_APPARMOR */ | |
| | | | |
| /* Define to 1 if you have the <arpa/inet.h> header file. */ | | /* Define to 1 if you have the <arpa/inet.h> header file. */ | |
| | | | |
| skipping to change at line 65 | | skipping to change at line 68 | |
| #define HAVE_DECL_IFLA_BOND_AD_INFO 0 | | #define HAVE_DECL_IFLA_BOND_AD_INFO 0 | |
| | | | |
| /* Define to 1 if you have the declaration of `IFLA_BRIDGE_VLAN_INFO', and
to | | /* Define to 1 if you have the declaration of `IFLA_BRIDGE_VLAN_INFO', and
to | |
| 0 if you don't. */ | | 0 if you don't. */ | |
| #define HAVE_DECL_IFLA_BRIDGE_VLAN_INFO 0 | | #define HAVE_DECL_IFLA_BRIDGE_VLAN_INFO 0 | |
| | | | |
| /* Define to 1 if you have the declaration of | | /* Define to 1 if you have the declaration of | |
| `IFLA_IPTUN_6RD_RELAY_PREFIXLEN', and to 0 if you don't. */ | | `IFLA_IPTUN_6RD_RELAY_PREFIXLEN', and to 0 if you don't. */ | |
| #define HAVE_DECL_IFLA_IPTUN_6RD_RELAY_PREFIXLEN 0 | | #define HAVE_DECL_IFLA_IPTUN_6RD_RELAY_PREFIXLEN 0 | |
| | | | |
|
| | | /* Define to 1 if you have the declaration of `IFLA_MACVLAN_FLAGS', and to | |
| | | 0 | |
| | | if you don't. */ | |
| | | #define HAVE_DECL_IFLA_MACVLAN_FLAGS 1 | |
| | | | |
| /* Define to 1 if you have the declaration of `IFLA_PHYS_PORT_ID', and to 0
if | | /* Define to 1 if you have the declaration of `IFLA_PHYS_PORT_ID', and to 0
if | |
| you don't. */ | | you don't. */ | |
| #define HAVE_DECL_IFLA_PHYS_PORT_ID 0 | | #define HAVE_DECL_IFLA_PHYS_PORT_ID 0 | |
| | | | |
| /* Define to 1 if you have the declaration of `IFLA_VLAN_PROTOCOL', and to
0 | | /* Define to 1 if you have the declaration of `IFLA_VLAN_PROTOCOL', and to
0 | |
| if you don't. */ | | if you don't. */ | |
| #define HAVE_DECL_IFLA_VLAN_PROTOCOL 0 | | #define HAVE_DECL_IFLA_VLAN_PROTOCOL 0 | |
| | | | |
|
| | | /* Define to 1 if you have the declaration of `IFLA_VTI_REMOTE', and to 0 i | |
| | | f | |
| | | you don't. */ | |
| | | #define HAVE_DECL_IFLA_VTI_REMOTE 1 | |
| | | | |
| /* Define to 1 if you have the declaration of `IFLA_VXLAN_LOCAL6', and to 0
if | | /* Define to 1 if you have the declaration of `IFLA_VXLAN_LOCAL6', and to 0
if | |
| you don't. */ | | you don't. */ | |
| #define HAVE_DECL_IFLA_VXLAN_LOCAL6 0 | | #define HAVE_DECL_IFLA_VXLAN_LOCAL6 0 | |
| | | | |
| /* Define to 1 if you have the declaration of `LO_FLAGS_PARTSCAN', and to 0
if | | /* Define to 1 if you have the declaration of `LO_FLAGS_PARTSCAN', and to 0
if | |
| you don't. */ | | you don't. */ | |
| #define HAVE_DECL_LO_FLAGS_PARTSCAN 1 | | #define HAVE_DECL_LO_FLAGS_PARTSCAN 1 | |
| | | | |
| /* Define to 1 if you have the declaration of `name_to_handle_at', and to 0
if | | /* Define to 1 if you have the declaration of `name_to_handle_at', and to 0
if | |
| you don't. */ | | you don't. */ | |
| | | | |
| skipping to change at line 150 | | skipping to change at line 161 | |
| | | | |
| /* Define if kmod is available */ | | /* Define if kmod is available */ | |
| /* #undef HAVE_KMOD */ | | /* #undef HAVE_KMOD */ | |
| | | | |
| /* Define to 1 if you have the <libaudit.h> header file. */ | | /* Define to 1 if you have the <libaudit.h> header file. */ | |
| #define HAVE_LIBAUDIT_H 1 | | #define HAVE_LIBAUDIT_H 1 | |
| | | | |
| /* Define if libcryptsetup is available */ | | /* Define if libcryptsetup is available */ | |
| /* #undef HAVE_LIBCRYPTSETUP */ | | /* #undef HAVE_LIBCRYPTSETUP */ | |
| | | | |
|
| | | /* Define if libcurl is available */ | |
| | | #define HAVE_LIBCURL 1 | |
| | | | |
| /* Define to 1 if you have the `dw' library (-ldw). */ | | /* Define to 1 if you have the `dw' library (-ldw). */ | |
| #define HAVE_LIBDW 1 | | #define HAVE_LIBDW 1 | |
| | | | |
|
| | | /* Define if libidn is available */ | |
| | | #define HAVE_LIBIDN 1 | |
| | | | |
| /* Define to 1 if you have the <linux/btrfs.h> header file. */ | | /* Define to 1 if you have the <linux/btrfs.h> header file. */ | |
| /* #undef HAVE_LINUX_BTRFS_H */ | | /* #undef HAVE_LINUX_BTRFS_H */ | |
| | | | |
| /* Logind support available */ | | /* Logind support available */ | |
| #define HAVE_LOGIND 1 | | #define HAVE_LOGIND 1 | |
| | | | |
|
| | | /* Define in LZ4 is available */ | |
| | | /* #undef HAVE_LZ4 */ | |
| | | | |
| | | /* Define to 1 if you have the <lz4.h> header file. */ | |
| | | /* #undef HAVE_LZ4_H */ | |
| | | | |
| /* Machined support available */ | | /* Machined support available */ | |
| #define HAVE_MACHINED 1 | | #define HAVE_MACHINED 1 | |
| | | | |
| /* Define to 1 if your system has a GNU libc compatible `malloc' function,
and | | /* Define to 1 if your system has a GNU libc compatible `malloc' function,
and | |
| to 0 otherwise. */ | | to 0 otherwise. */ | |
| #define HAVE_MALLOC 1 | | #define HAVE_MALLOC 1 | |
| | | | |
| /* Define to 1 if you have the <memory.h> header file. */ | | /* Define to 1 if you have the <memory.h> header file. */ | |
| #define HAVE_MEMORY_H 1 | | #define HAVE_MEMORY_H 1 | |
| | | | |
| | | | |
| skipping to change at line 318 | | skipping to change at line 341 | |
| /* Name of package */ | | /* Name of package */ | |
| #define PACKAGE "systemd" | | #define PACKAGE "systemd" | |
| | | | |
| /* Define to the address where bug reports for this package should be sent.
*/ | | /* Define to the address where bug reports for this package should be sent.
*/ | |
| #define PACKAGE_BUGREPORT "http://bugs.freedesktop.org/enter_bug.cgi?produc
t=systemd" | | #define PACKAGE_BUGREPORT "http://bugs.freedesktop.org/enter_bug.cgi?produc
t=systemd" | |
| | | | |
| /* Define to the full name of this package. */ | | /* Define to the full name of this package. */ | |
| #define PACKAGE_NAME "systemd" | | #define PACKAGE_NAME "systemd" | |
| | | | |
| /* Define to the full name and version of this package. */ | | /* Define to the full name and version of this package. */ | |
|
| #define PACKAGE_STRING "systemd 215" | | #define PACKAGE_STRING "systemd 216" | |
| | | | |
| /* Define to the one symbol short name of this package. */ | | /* Define to the one symbol short name of this package. */ | |
| #define PACKAGE_TARNAME "systemd" | | #define PACKAGE_TARNAME "systemd" | |
| | | | |
| /* Define to the home page for this package. */ | | /* Define to the home page for this package. */ | |
| #define PACKAGE_URL "http://www.freedesktop.org/wiki/Software/systemd" | | #define PACKAGE_URL "http://www.freedesktop.org/wiki/Software/systemd" | |
| | | | |
| /* Define to the version of this package. */ | | /* Define to the version of this package. */ | |
|
| #define PACKAGE_VERSION "215" | | #define PACKAGE_VERSION "216" | |
| | | | |
| /* Path of /etc/rc.local script */ | | /* Path of /etc/rc.local script */ | |
| #define RC_LOCAL_SCRIPT_PATH_START "/etc/rc.local" | | #define RC_LOCAL_SCRIPT_PATH_START "/etc/rc.local" | |
| | | | |
| /* Path of /usr/sbin/halt.local script */ | | /* Path of /usr/sbin/halt.local script */ | |
| #define RC_LOCAL_SCRIPT_PATH_STOP "/usr/sbin/halt.local" | | #define RC_LOCAL_SCRIPT_PATH_STOP "/usr/sbin/halt.local" | |
| | | | |
| /* Define to the type of arg 1 for `select'. */ | | /* Define to the type of arg 1 for `select'. */ | |
| #define SELECT_TYPE_ARG1 int | | #define SELECT_TYPE_ARG1 int | |
| | | | |
| /* Define to the type of args 2, 3 and 4 for `select'. */ | | /* Define to the type of args 2, 3 and 4 for `select'. */ | |
| #define SELECT_TYPE_ARG234 (fd_set *) | | #define SELECT_TYPE_ARG234 (fd_set *) | |
| | | | |
| /* Define to the type of arg 5 for `select'. */ | | /* Define to the type of arg 5 for `select'. */ | |
| #define SELECT_TYPE_ARG5 (struct timeval *) | | #define SELECT_TYPE_ARG5 (struct timeval *) | |
| | | | |
|
| | | /* The size of `dev_t', as computed by sizeof. */ | |
| | | #define SIZEOF_DEV_T 8 | |
| | | | |
| /* The size of `gid_t', as computed by sizeof. */ | | /* The size of `gid_t', as computed by sizeof. */ | |
| #define SIZEOF_GID_T 4 | | #define SIZEOF_GID_T 4 | |
| | | | |
| /* The size of `pid_t', as computed by sizeof. */ | | /* The size of `pid_t', as computed by sizeof. */ | |
| #define SIZEOF_PID_T 4 | | #define SIZEOF_PID_T 4 | |
| | | | |
| /* The size of `rlim_t', as computed by sizeof. */ | | /* The size of `rlim_t', as computed by sizeof. */ | |
| #define SIZEOF_RLIM_T 8 | | #define SIZEOF_RLIM_T 8 | |
| | | | |
| /* The size of `time_t', as computed by sizeof. */ | | /* The size of `time_t', as computed by sizeof. */ | |
| | | | |
| skipping to change at line 375 | | skipping to change at line 401 | |
| /* Maximum System GID */ | | /* Maximum System GID */ | |
| #define SYSTEM_GID_MAX 999 | | #define SYSTEM_GID_MAX 999 | |
| | | | |
| /* Maximum System UID */ | | /* Maximum System UID */ | |
| #define SYSTEM_UID_MAX 999 | | #define SYSTEM_UID_MAX 999 | |
| | | | |
| /* Path to telinit */ | | /* Path to telinit */ | |
| #define TELINIT "/lib/sysvinit/telinit" | | #define TELINIT "/lib/sysvinit/telinit" | |
| | | | |
| /* Time Epoch */ | | /* Time Epoch */ | |
|
| #define TIME_EPOCH 1404413182 | | #define TIME_EPOCH 1408486694 | |
| | | | |
| /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ | | /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ | |
| #define TIME_WITH_SYS_TIME 1 | | #define TIME_WITH_SYS_TIME 1 | |
| | | | |
| /* GID of the 'tty' group */ | | /* GID of the 'tty' group */ | |
| #define TTY_GID 5 | | #define TTY_GID 5 | |
| | | | |
| /* Enable extensions on AIX 3, Interix. */ | | /* Enable extensions on AIX 3, Interix. */ | |
| #ifndef _ALL_SOURCE | | #ifndef _ALL_SOURCE | |
| # define _ALL_SOURCE 1 | | # define _ALL_SOURCE 1 | |
| | | | |
| skipping to change at line 405 | | skipping to change at line 431 | |
| /* Enable extensions on HP NonStop. */ | | /* Enable extensions on HP NonStop. */ | |
| #ifndef _TANDEM_SOURCE | | #ifndef _TANDEM_SOURCE | |
| # define _TANDEM_SOURCE 1 | | # define _TANDEM_SOURCE 1 | |
| #endif | | #endif | |
| /* Enable general extensions on Solaris. */ | | /* Enable general extensions on Solaris. */ | |
| #ifndef __EXTENSIONS__ | | #ifndef __EXTENSIONS__ | |
| # define __EXTENSIONS__ 1 | | # define __EXTENSIONS__ 1 | |
| #endif | | #endif | |
| | | | |
| /* Version number of package */ | | /* Version number of package */ | |
|
| #define VERSION "215" | | #define VERSION "216" | |
| | | | |
| /* Enable large inode numbers on Mac OS X 10.5. */ | | /* Enable large inode numbers on Mac OS X 10.5. */ | |
| #ifndef _DARWIN_USE_64_BIT_INODE | | #ifndef _DARWIN_USE_64_BIT_INODE | |
| # define _DARWIN_USE_64_BIT_INODE 1 | | # define _DARWIN_USE_64_BIT_INODE 1 | |
| #endif | | #endif | |
| | | | |
| /* Number of bits in a file offset, on hosts where this is settable. */ | | /* Number of bits in a file offset, on hosts where this is settable. */ | |
| #define _FILE_OFFSET_BITS 64 | | #define _FILE_OFFSET_BITS 64 | |
| | | | |
| /* Define for large files, on AIX-style hosts. */ | | /* Define for large files, on AIX-style hosts. */ | |
| | | | |
End of changes. 11 change blocks. |
| 4 lines changed or deleted | | 32 lines changed or added | |
|
| gpt.h | | gpt.h | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| | | | |
| systemd is distributed in the hope that it will be useful, but | | systemd is distributed in the hope that it will be useful, but | |
| WITHOUT ANY WARRANTY; without even the implied warranty of | | WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| Lesser General Public License for more details. | | Lesser General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU Lesser General Public License | | You should have received a copy of the GNU Lesser General Public License | |
| along with systemd; If not, see <http://www.gnu.org/licenses/>. | | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
| ***/ | | ***/ | |
| | | | |
|
| | | #include <endian.h> | |
| | | | |
| #include "sd-id128.h" | | #include "sd-id128.h" | |
| | | | |
| /* We only support root disk discovery for x86, x86-64 and ARM for | | /* We only support root disk discovery for x86, x86-64 and ARM for | |
| * now, since EFI for anything else doesn't really exist, and we only | | * now, since EFI for anything else doesn't really exist, and we only | |
| * care for root partitions on the same disk as the EFI ESP. */ | | * care for root partitions on the same disk as the EFI ESP. */ | |
| | | | |
| #define GPT_ROOT_X86 SD_ID128_MAKE(44,47,95,40,f2,97,41,b2,9a,f7,d1,31,d
5,f0,45,8a) | | #define GPT_ROOT_X86 SD_ID128_MAKE(44,47,95,40,f2,97,41,b2,9a,f7,d1,31,d
5,f0,45,8a) | |
| #define GPT_ROOT_X86_64 SD_ID128_MAKE(4f,68,bc,e3,e8,cd,4d,b1,96,e7,fb,ca,f
9,84,b7,09) | | #define GPT_ROOT_X86_64 SD_ID128_MAKE(4f,68,bc,e3,e8,cd,4d,b1,96,e7,fb,ca,f
9,84,b7,09) | |
| #define GPT_ROOT_ARM SD_ID128_MAKE(69,da,d7,10,2c,e4,4e,3c,b1,6c,21,a1,d
4,9a,be,d3) | | #define GPT_ROOT_ARM SD_ID128_MAKE(69,da,d7,10,2c,e4,4e,3c,b1,6c,21,a1,d
4,9a,be,d3) | |
| #define GPT_ROOT_ARM_64 SD_ID128_MAKE(b9,21,b0,45,1d,f0,41,c3,af,44,4c,6f,2
8,0d,3f,ae) | | #define GPT_ROOT_ARM_64 SD_ID128_MAKE(b9,21,b0,45,1d,f0,41,c3,af,44,4c,6f,2
8,0d,3f,ae) | |
| | | | |
| skipping to change at line 45 | | skipping to change at line 47 | |
| #define GPT_HOME SD_ID128_MAKE(93,3a,c7,e1,2e,b4,4f,13,b8,44,0e,14,e
2,ae,f9,15) | | #define GPT_HOME SD_ID128_MAKE(93,3a,c7,e1,2e,b4,4f,13,b8,44,0e,14,e
2,ae,f9,15) | |
| #define GPT_SRV SD_ID128_MAKE(3b,8f,84,25,20,e0,4f,3b,90,7f,1a,25,a
7,6f,98,e8) | | #define GPT_SRV SD_ID128_MAKE(3b,8f,84,25,20,e0,4f,3b,90,7f,1a,25,a
7,6f,98,e8) | |
| | | | |
| #if defined(__x86_64__) | | #if defined(__x86_64__) | |
| # define GPT_ROOT_NATIVE GPT_ROOT_X86_64 | | # define GPT_ROOT_NATIVE GPT_ROOT_X86_64 | |
| # define GPT_ROOT_SECONDARY GPT_ROOT_X86 | | # define GPT_ROOT_SECONDARY GPT_ROOT_X86 | |
| #elif defined(__i386__) | | #elif defined(__i386__) | |
| # define GPT_ROOT_NATIVE GPT_ROOT_X86 | | # define GPT_ROOT_NATIVE GPT_ROOT_X86 | |
| #endif | | #endif | |
| | | | |
|
| #if defined(__aarch64__) && !defined(WORDS_BIGENDIAN) | | #if defined(__aarch64__) && (__BYTE_ORDER != __BIG_ENDIAN) | |
| # define GPT_ROOT_NATIVE GPT_ROOT_ARM_64 | | # define GPT_ROOT_NATIVE GPT_ROOT_ARM_64 | |
| # define GPT_ROOT_SECONDARY GPT_ROOT_ARM | | # define GPT_ROOT_SECONDARY GPT_ROOT_ARM | |
|
| #elif defined(__arm__) && !defined(WORDS_BIGENDIAN) | | #elif defined(__arm__) && (__BYTE_ORDER != __BIG_ENDIAN) | |
| # define GPT_ROOT_NATIVE GPT_ROOT_ARM | | # define GPT_ROOT_NATIVE GPT_ROOT_ARM | |
| #endif | | #endif | |
| | | | |
| /* Flags we recognize on the root, swap, home and srv partitions when | | /* Flags we recognize on the root, swap, home and srv partitions when | |
| * doing auto-discovery. These happen to be identical to what | | * doing auto-discovery. These happen to be identical to what | |
| * Microsoft defines for its own Basic Data Partitions, but that's | | * Microsoft defines for its own Basic Data Partitions, but that's | |
| * just because we saw no point in defining any other values here. */ | | * just because we saw no point in defining any other values here. */ | |
| #define GPT_FLAG_READ_ONLY (1ULL << 60) | | #define GPT_FLAG_READ_ONLY (1ULL << 60) | |
| #define GPT_FLAG_NO_AUTO (1ULL << 63) | | #define GPT_FLAG_NO_AUTO (1ULL << 63) | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 4 lines changed or added | |
|
| kdbus.h | | kdbus.h | |
| | | | |
| skipping to change at line 226 | | skipping to change at line 226 | |
| * @KDBUS_ITEM_DST_NAME: Destination's well-known name | | * @KDBUS_ITEM_DST_NAME: Destination's well-known name | |
| * @KDBUS_ITEM_MAKE_NAME: Name of domain, bus, endpoint | | * @KDBUS_ITEM_MAKE_NAME: Name of domain, bus, endpoint | |
| * @KDBUS_ITEM_MEMFD_NAME: The human readable name of a memfd (debuggin
g) | | * @KDBUS_ITEM_MEMFD_NAME: The human readable name of a memfd (debuggin
g) | |
| * @KDBUS_ITEM_ATTACH_FLAGS: Attach-flags, used for updating which metada
ta | | * @KDBUS_ITEM_ATTACH_FLAGS: Attach-flags, used for updating which metada
ta | |
| * a connection subscribes to | | * a connection subscribes to | |
| * @_KDBUS_ITEM_ATTACH_BASE: Start of metadata attach items | | * @_KDBUS_ITEM_ATTACH_BASE: Start of metadata attach items | |
| * @KDBUS_ITEM_NAME: Well-know name with flags | | * @KDBUS_ITEM_NAME: Well-know name with flags | |
| * @KDBUS_ITEM_ID: Connection ID | | * @KDBUS_ITEM_ID: Connection ID | |
| * @KDBUS_ITEM_TIMESTAMP: Timestamp | | * @KDBUS_ITEM_TIMESTAMP: Timestamp | |
| * @KDBUS_ITEM_CREDS: Process credential | | * @KDBUS_ITEM_CREDS: Process credential | |
|
| | | * @KDBUS_ITEM_AUXGROUPS: Auxiliary process groups | |
| * @KDBUS_ITEM_PID_COMM: Process ID "comm" identifier | | * @KDBUS_ITEM_PID_COMM: Process ID "comm" identifier | |
| * @KDBUS_ITEM_TID_COMM: Thread ID "comm" identifier | | * @KDBUS_ITEM_TID_COMM: Thread ID "comm" identifier | |
| * @KDBUS_ITEM_EXE: The path of the executable | | * @KDBUS_ITEM_EXE: The path of the executable | |
| * @KDBUS_ITEM_CMDLINE: The process command line | | * @KDBUS_ITEM_CMDLINE: The process command line | |
| * @KDBUS_ITEM_CGROUP: The croup membership | | * @KDBUS_ITEM_CGROUP: The croup membership | |
| * @KDBUS_ITEM_CAPS: The process capabilities | | * @KDBUS_ITEM_CAPS: The process capabilities | |
| * @KDBUS_ITEM_SECLABEL: The security label | | * @KDBUS_ITEM_SECLABEL: The security label | |
| * @KDBUS_ITEM_AUDIT: The audit IDs | | * @KDBUS_ITEM_AUDIT: The audit IDs | |
| * @KDBUS_ITEM_CONN_NAME: The connection's human-readable name (debugg
ing) | | * @KDBUS_ITEM_CONN_NAME: The connection's human-readable name (debugg
ing) | |
| * @_KDBUS_ITEM_POLICY_BASE: Start of policy items | | * @_KDBUS_ITEM_POLICY_BASE: Start of policy items | |
| | | | |
| skipping to change at line 266 | | skipping to change at line 267 | |
| KDBUS_ITEM_DST_NAME, | | KDBUS_ITEM_DST_NAME, | |
| KDBUS_ITEM_MAKE_NAME, | | KDBUS_ITEM_MAKE_NAME, | |
| KDBUS_ITEM_MEMFD_NAME, | | KDBUS_ITEM_MEMFD_NAME, | |
| KDBUS_ITEM_ATTACH_FLAGS, | | KDBUS_ITEM_ATTACH_FLAGS, | |
| | | | |
| _KDBUS_ITEM_ATTACH_BASE = 0x1000, | | _KDBUS_ITEM_ATTACH_BASE = 0x1000, | |
| KDBUS_ITEM_NAME = _KDBUS_ITEM_ATTACH_BASE, | | KDBUS_ITEM_NAME = _KDBUS_ITEM_ATTACH_BASE, | |
| KDBUS_ITEM_ID, | | KDBUS_ITEM_ID, | |
| KDBUS_ITEM_TIMESTAMP, | | KDBUS_ITEM_TIMESTAMP, | |
| KDBUS_ITEM_CREDS, | | KDBUS_ITEM_CREDS, | |
|
| | | KDBUS_ITEM_AUXGROUPS, | |
| KDBUS_ITEM_PID_COMM, | | KDBUS_ITEM_PID_COMM, | |
| KDBUS_ITEM_TID_COMM, | | KDBUS_ITEM_TID_COMM, | |
| KDBUS_ITEM_EXE, | | KDBUS_ITEM_EXE, | |
| KDBUS_ITEM_CMDLINE, | | KDBUS_ITEM_CMDLINE, | |
| KDBUS_ITEM_CGROUP, | | KDBUS_ITEM_CGROUP, | |
| KDBUS_ITEM_CAPS, | | KDBUS_ITEM_CAPS, | |
| KDBUS_ITEM_SECLABEL, | | KDBUS_ITEM_SECLABEL, | |
| KDBUS_ITEM_AUDIT, | | KDBUS_ITEM_AUDIT, | |
| KDBUS_ITEM_CONN_NAME, | | KDBUS_ITEM_CONN_NAME, | |
| | | | |
| | | | |
| skipping to change at line 484 | | skipping to change at line 486 | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * enum kdbus_hello_flags - flags for struct kdbus_cmd_hello | | * enum kdbus_hello_flags - flags for struct kdbus_cmd_hello | |
| * @KDBUS_HELLO_ACCEPT_FD: The connection allows the receiving of | | * @KDBUS_HELLO_ACCEPT_FD: The connection allows the receiving of | |
| * any passed file descriptors | | * any passed file descriptors | |
| * @KDBUS_HELLO_ACTIVATOR: Special-purpose connection which registers | | * @KDBUS_HELLO_ACTIVATOR: Special-purpose connection which registers | |
| * a well-know name for a process to be started | | * a well-know name for a process to be started | |
| * when traffic arrives | | * when traffic arrives | |
| * @KDBUS_HELLO_POLICY_HOLDER: Special-purpose connection which registers | | * @KDBUS_HELLO_POLICY_HOLDER: Special-purpose connection which registers | |
|
| * policy entries for one or multiple names. Th | | * policy entries for a name. The provided name | |
| e | | * is not activated and not registered with the | |
| * provided names are not activated, and are no | | * name database, it only allows unprivileged | |
| t | | * connections to aquire a name, talk or discov | |
| * registered with the name database | | er | |
| | | * a service | |
| * @KDBUS_HELLO_MONITOR: Special-purpose connection to monitor | | * @KDBUS_HELLO_MONITOR: Special-purpose connection to monitor | |
| * bus traffic | | * bus traffic | |
| */ | | */ | |
| enum kdbus_hello_flags { | | enum kdbus_hello_flags { | |
| KDBUS_HELLO_ACCEPT_FD = 1 << 0, | | KDBUS_HELLO_ACCEPT_FD = 1 << 0, | |
| KDBUS_HELLO_ACTIVATOR = 1 << 1, | | KDBUS_HELLO_ACTIVATOR = 1 << 1, | |
| KDBUS_HELLO_POLICY_HOLDER = 1 << 2, | | KDBUS_HELLO_POLICY_HOLDER = 1 << 2, | |
| KDBUS_HELLO_MONITOR = 1 << 3, | | KDBUS_HELLO_MONITOR = 1 << 3, | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * enum kdbus_attach_flags - flags for metadata attachments | | * enum kdbus_attach_flags - flags for metadata attachments | |
| * @KDBUS_ATTACH_TIMESTAMP: Timestamp | | * @KDBUS_ATTACH_TIMESTAMP: Timestamp | |
| * @KDBUS_ATTACH_CREDS: Credentials | | * @KDBUS_ATTACH_CREDS: Credentials | |
|
| | | * @KDBUS_ATTACH_AUXGROUPS: Auxiliary groups | |
| * @KDBUS_ATTACH_NAMES: Well-known names | | * @KDBUS_ATTACH_NAMES: Well-known names | |
| * @KDBUS_ATTACH_COMM: The "comm" process identifier | | * @KDBUS_ATTACH_COMM: The "comm" process identifier | |
| * @KDBUS_ATTACH_EXE: The path of the executable | | * @KDBUS_ATTACH_EXE: The path of the executable | |
| * @KDBUS_ATTACH_CMDLINE: The process command line | | * @KDBUS_ATTACH_CMDLINE: The process command line | |
| * @KDBUS_ATTACH_CGROUP: The croup membership | | * @KDBUS_ATTACH_CGROUP: The croup membership | |
| * @KDBUS_ATTACH_CAPS: The process capabilities | | * @KDBUS_ATTACH_CAPS: The process capabilities | |
| * @KDBUS_ATTACH_SECLABEL: The security label | | * @KDBUS_ATTACH_SECLABEL: The security label | |
| * @KDBUS_ATTACH_AUDIT: The audit IDs | | * @KDBUS_ATTACH_AUDIT: The audit IDs | |
| * @KDBUS_ATTACH_CONN_NAME: The human-readable connection name | | * @KDBUS_ATTACH_CONN_NAME: The human-readable connection name | |
| * @_KDBUS_ATTACH_ALL: All of the above | | * @_KDBUS_ATTACH_ALL: All of the above | |
| */ | | */ | |
| enum kdbus_attach_flags { | | enum kdbus_attach_flags { | |
| KDBUS_ATTACH_TIMESTAMP = 1 << 0, | | KDBUS_ATTACH_TIMESTAMP = 1 << 0, | |
| KDBUS_ATTACH_CREDS = 1 << 1, | | KDBUS_ATTACH_CREDS = 1 << 1, | |
|
| KDBUS_ATTACH_NAMES = 1 << 2, | | KDBUS_ATTACH_AUXGROUPS = 1 << 2, | |
| KDBUS_ATTACH_COMM = 1 << 3, | | KDBUS_ATTACH_NAMES = 1 << 3, | |
| KDBUS_ATTACH_EXE = 1 << 4, | | KDBUS_ATTACH_COMM = 1 << 4, | |
| KDBUS_ATTACH_CMDLINE = 1 << 5, | | KDBUS_ATTACH_EXE = 1 << 5, | |
| KDBUS_ATTACH_CGROUP = 1 << 6, | | KDBUS_ATTACH_CMDLINE = 1 << 6, | |
| KDBUS_ATTACH_CAPS = 1 << 7, | | KDBUS_ATTACH_CGROUP = 1 << 7, | |
| KDBUS_ATTACH_SECLABEL = 1 << 8, | | KDBUS_ATTACH_CAPS = 1 << 8, | |
| KDBUS_ATTACH_AUDIT = 1 << 9, | | KDBUS_ATTACH_SECLABEL = 1 << 9, | |
| KDBUS_ATTACH_CONN_NAME = 1 << 10, | | KDBUS_ATTACH_AUDIT = 1 << 10, | |
| _KDBUS_ATTACH_ALL = (1 << 11) - 1, | | KDBUS_ATTACH_CONN_NAME = 1 << 11, | |
| | | _KDBUS_ATTACH_ALL = (1 << 12) - 1, | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * struct kdbus_cmd_hello - struct to say hello to kdbus | | * struct kdbus_cmd_hello - struct to say hello to kdbus | |
| * @size: The total size of the structure | | * @size: The total size of the structure | |
| * @conn_flags: Connection flags (KDBUS_HELLO_*). The kernel
will | | * @conn_flags: Connection flags (KDBUS_HELLO_*). The kernel
will | |
| * return its capabilities in that field. | | * return its capabilities in that field. | |
| * @attach_flags: Mask of metadata to attach to each message sent | | * @attach_flags: Mask of metadata to attach to each message sent | |
| * (KDBUS_ATTACH_*) | | * (KDBUS_ATTACH_*) | |
| * @bus_flags: The flags field copied verbatim from the original | | * @bus_flags: The flags field copied verbatim from the original | |
| | | | |
| skipping to change at line 605 | | skipping to change at line 611 | |
| KDBUS_NAME_ALLOW_REPLACEMENT = 1 << 1, | | KDBUS_NAME_ALLOW_REPLACEMENT = 1 << 1, | |
| KDBUS_NAME_QUEUE = 1 << 2, | | KDBUS_NAME_QUEUE = 1 << 2, | |
| KDBUS_NAME_IN_QUEUE = 1 << 3, | | KDBUS_NAME_IN_QUEUE = 1 << 3, | |
| KDBUS_NAME_ACTIVATOR = 1 << 4, | | KDBUS_NAME_ACTIVATOR = 1 << 4, | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * struct kdbus_cmd_name - struct to describe a well-known name | | * struct kdbus_cmd_name - struct to describe a well-known name | |
| * @size: The total size of the struct | | * @size: The total size of the struct | |
| * @flags: Flags for a name entry (KDBUS_NAME_*) | | * @flags: Flags for a name entry (KDBUS_NAME_*) | |
|
| * @owner_id: The current owner of the name. For requests, | | * @owner_id: The current owner of the name. | |
| * privileged users may set this field to | | | |
| * (de)register names on behalf of other connections. | | | |
| * @conn_flags: The flags of the owning connection (KDBUS_HE
LLO_*) | | * @conn_flags: The flags of the owning connection (KDBUS_HE
LLO_*) | |
| * @name: The well-known name | | * @name: The well-known name | |
| * | | * | |
| * This structure is used with the KDBUS_CMD_NAME_ACQUIRE ioctl. | | * This structure is used with the KDBUS_CMD_NAME_ACQUIRE ioctl. | |
| */ | | */ | |
| struct kdbus_cmd_name { | | struct kdbus_cmd_name { | |
| __u64 size; | | __u64 size; | |
| __u64 flags; | | __u64 flags; | |
| __u64 owner_id; | | __u64 owner_id; | |
| __u64 conn_flags; | | __u64 conn_flags; | |
| | | | |
| skipping to change at line 733 | | skipping to change at line 737 | |
| * This structure is used with the KDBUS_CMD_ADD_MATCH and | | * This structure is used with the KDBUS_CMD_ADD_MATCH and | |
| * KDBUS_CMD_REMOVE_MATCH ioctl. | | * KDBUS_CMD_REMOVE_MATCH ioctl. | |
| */ | | */ | |
| struct kdbus_cmd_match { | | struct kdbus_cmd_match { | |
| __u64 size; | | __u64 size; | |
| __u64 cookie; | | __u64 cookie; | |
| struct kdbus_item items[0]; | | struct kdbus_item items[0]; | |
| } __attribute__((aligned(8))); | | } __attribute__((aligned(8))); | |
| | | | |
| /** | | /** | |
|
| * struct kdbus_cmd_memfd_make - create a kdbus memfd | | | |
| * @size: The total size of the struct | | | |
| * @file_size: The initial file size | | | |
| * @fd: The returned file descriptor number | | | |
| * @__pad: Padding to ensure proper alignement | | | |
| * @items: A list of items for additional information | | | |
| * | | | |
| * This structure is used with the KDBUS_CMD_MEMFD_NEW ioctl. | | | |
| */ | | | |
| struct kdbus_cmd_memfd_make { | | | |
| __u64 size; | | | |
| __u64 file_size; | | | |
| int fd; | | | |
| __u32 __pad; | | | |
| struct kdbus_item items[0]; | | | |
| } __attribute__((aligned(8))); | | | |
| | | | |
| /** | | | |
| * enum kdbus_ioctl_type - Ioctl API | | * enum kdbus_ioctl_type - Ioctl API | |
| * @KDBUS_CMD_BUS_MAKE: After opening the "control" device n
ode, this | | * @KDBUS_CMD_BUS_MAKE: After opening the "control" device n
ode, this | |
| * command creates a new bus with the specified | | * command creates a new bus with the specified | |
| * name. The bus is immediately shut down and | | * name. The bus is immediately shut down and | |
| * cleaned up when the opened "control" device
node | | * cleaned up when the opened "control" device
node | |
| * is closed. | | * is closed. | |
| * @KDBUS_CMD_DOMAIN_MAKE: Similar to KDBUS_CMD_BUS_MAKE, but it create
s a | | * @KDBUS_CMD_DOMAIN_MAKE: Similar to KDBUS_CMD_BUS_MAKE, but it create
s a | |
| * new kdbus domain. | | * new kdbus domain. | |
| * @KDBUS_CMD_EP_MAKE: Creates a new named special endpoint to talk
to | | * @KDBUS_CMD_EP_MAKE: Creates a new named special endpoint to talk
to | |
| * the bus. Such endpoints usually carry a more | | * the bus. Such endpoints usually carry a more | |
| | | | |
| skipping to change at line 800 | | skipping to change at line 786 | |
| * necessarily represent the connected process
or | | * necessarily represent the connected process
or | |
| * the actual state of the process. | | * the actual state of the process. | |
| * @KDBUS_CMD_CONN_UPDATE: Update the properties of a connection. Used
to | | * @KDBUS_CMD_CONN_UPDATE: Update the properties of a connection. Used
to | |
| * update the metadata subscription mask and | | * update the metadata subscription mask and | |
| * policy. | | * policy. | |
| * @KDBUS_CMD_EP_UPDATE: Update the properties of a custom enpoint. U
sed | | * @KDBUS_CMD_EP_UPDATE: Update the properties of a custom enpoint. U
sed | |
| * to update the policy. | | * to update the policy. | |
| * @KDBUS_CMD_MATCH_ADD: Install a match which broadcast messages sho
uld | | * @KDBUS_CMD_MATCH_ADD: Install a match which broadcast messages sho
uld | |
| * be delivered to the connection. | | * be delivered to the connection. | |
| * @KDBUS_CMD_MATCH_REMOVE: Remove a current match for broadcast message
s. | | * @KDBUS_CMD_MATCH_REMOVE: Remove a current match for broadcast message
s. | |
|
| * @KDBUS_CMD_MEMFD_NEW: Return a new file descriptor which provides | | | |
| an | | | |
| * anonymous shared memory file and which can b | | | |
| e | | | |
| * used to pass around larger chunks of data. | | | |
| * Kdbus memfd files can be sealed, which allow | | | |
| s | | | |
| * the receiver to trust the data it has receiv | | | |
| ed. | | | |
| * Kdbus memfd files expose only very limited | | | |
| * operations, they can be mmap()ed, seek()ed, | | | |
| * (p)read(v)() and (p)write(v)(); most other | | | |
| * common file operations are not implemented. | | | |
| * Special caution needs to be taken with | | | |
| * read(v)()/write(v)() on a shared file; the | | | |
| * underlying file position is always shared | | | |
| * between all users of the file and race again | | | |
| st | | | |
| * each other, pread(v)()/pwrite(v)() avoid the | | | |
| se | | | |
| * issues. | | | |
| * @KDBUS_CMD_MEMFD_SIZE_GET: Return the size of the underlying file, whic | | | |
| h | | | |
| * changes with write(). | | | |
| * @KDBUS_CMD_MEMFD_SIZE_SET: Truncate the underlying file to the specifie | | | |
| d | | | |
| * size. | | | |
| * @KDBUS_CMD_MEMFD_SEAL_GET: Return the state of the file sealing. | | | |
| * @KDBUS_CMD_MEMFD_SEAL_SET: Seal or break a seal of the file. Only files | | | |
| * which are not shared with other processes an | | | |
| d | | | |
| * which are currently not mapped can be sealed | | | |
| . | | | |
| * The current process needs to be the one and | | | |
| * single owner of the file, the sealing cannot | | | |
| * be changed as long as the file is shared. | | | |
| */ | | */ | |
| enum kdbus_ioctl_type { | | enum kdbus_ioctl_type { | |
| KDBUS_CMD_BUS_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x00, | | KDBUS_CMD_BUS_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x00, | |
| struct kdbus_cmd_make), | | struct kdbus_cmd_make), | |
| KDBUS_CMD_DOMAIN_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x10, | | KDBUS_CMD_DOMAIN_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x10, | |
| struct kdbus_cmd_make), | | struct kdbus_cmd_make), | |
| KDBUS_CMD_EP_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x20, | | KDBUS_CMD_EP_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x20, | |
| struct kdbus_cmd_make), | | struct kdbus_cmd_make), | |
| | | | |
| KDBUS_CMD_HELLO = _IOWR(KDBUS_IOCTL_MAGIC, 0x30, | | KDBUS_CMD_HELLO = _IOWR(KDBUS_IOCTL_MAGIC, 0x30, | |
| | | | |
| skipping to change at line 865 | | skipping to change at line 825 | |
| KDBUS_CMD_CONN_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x61, | | KDBUS_CMD_CONN_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x61, | |
| struct kdbus_cmd_update), | | struct kdbus_cmd_update), | |
| | | | |
| KDBUS_CMD_EP_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x71, | | KDBUS_CMD_EP_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x71, | |
| struct kdbus_cmd_update), | | struct kdbus_cmd_update), | |
| | | | |
| KDBUS_CMD_MATCH_ADD = _IOW(KDBUS_IOCTL_MAGIC, 0x80, | | KDBUS_CMD_MATCH_ADD = _IOW(KDBUS_IOCTL_MAGIC, 0x80, | |
| struct kdbus_cmd_match), | | struct kdbus_cmd_match), | |
| KDBUS_CMD_MATCH_REMOVE = _IOW(KDBUS_IOCTL_MAGIC, 0x81, | | KDBUS_CMD_MATCH_REMOVE = _IOW(KDBUS_IOCTL_MAGIC, 0x81, | |
| struct kdbus_cmd_match), | | struct kdbus_cmd_match), | |
|
| | | | |
| KDBUS_CMD_MEMFD_NEW = _IOWR(KDBUS_IOCTL_MAGIC, 0xc0, | | | |
| struct kdbus_cmd_memfd_make), | | | |
| KDBUS_CMD_MEMFD_SIZE_GET = _IOR(KDBUS_IOCTL_MAGIC, 0xc1, __u64 | | | |
| *), | | | |
| KDBUS_CMD_MEMFD_SIZE_SET = _IOW(KDBUS_IOCTL_MAGIC, 0xc2, __u64 | | | |
| *), | | | |
| KDBUS_CMD_MEMFD_SEAL_GET = _IOR(KDBUS_IOCTL_MAGIC, 0xc3, int *) | | | |
| , | | | |
| KDBUS_CMD_MEMFD_SEAL_SET = _IO(KDBUS_IOCTL_MAGIC, 0xc4), | | | |
| }; | | }; | |
| | | | |
| /* | | /* | |
| * errno - api error codes | | * errno - api error codes | |
| * @E2BIG: A message contains too many records or items. | | * @E2BIG: A message contains too many records or items. | |
| * @EADDRINUSE: A well-known bus name is already taken by an
other | | * @EADDRINUSE: A well-known bus name is already taken by an
other | |
| * connection. | | * connection. | |
| * @EADDRNOTAVAIL: A message flagged not to activate a service, address
ed | | * @EADDRNOTAVAIL: A message flagged not to activate a service, address
ed | |
| * a service which is not currently running. | | * a service which is not currently running. | |
| * @EAGAIN: No messages are queued at the moment. | | * @EAGAIN: No messages are queued at the moment. | |
| | | | |
| skipping to change at line 902 | | skipping to change at line 855 | |
| * @ECONNRESET: A connection is shut down, no further operat
ions are | | * @ECONNRESET: A connection is shut down, no further operat
ions are | |
| * possible. | | * possible. | |
| * @ECOMM: A peer does not accept the file descriptors addresse
d | | * @ECOMM: A peer does not accept the file descriptors addresse
d | |
| * to it. | | * to it. | |
| * @EDESTADDRREQ: The well-known bus name is required but missing. | | * @EDESTADDRREQ: The well-known bus name is required but missing. | |
| * @EDOM: The size of data does not match the expectations. Us
ed | | * @EDOM: The size of data does not match the expectations. Us
ed | |
| * for bloom bit field sizes. | | * for bloom bit field sizes. | |
| * @EEXIST: A requested domain, bus or endpoint with the same | | * @EEXIST: A requested domain, bus or endpoint with the same | |
| * name already exists. A specific data type, which is | | * name already exists. A specific data type, which is | |
| * only expected once, is provided multiple times. | | * only expected once, is provided multiple times. | |
|
| * @EFAULT: The supplied memory could not be accessed, or the da | | * @EFAULT: The supplied memory could not be accessed, the data | |
| ta | | * is not properly aligned, or the current task's memor | |
| * is not properly aligned. | | y | |
| | | * is inaccessible. | |
| * @EINVAL: The provided data does not match its type or other | | * @EINVAL: The provided data does not match its type or other | |
| * expectations, like a string which is not NUL termina
ted, | | * expectations, like a string which is not NUL termina
ted, | |
| * or a string length that points behind the first | | * or a string length that points behind the first | |
| * \0-byte in the string. | | * \0-byte in the string. | |
| * @EMEDIUMTYPE: A file descriptor which is not a kdbus memfd was | | * @EMEDIUMTYPE: A file descriptor which is not a kdbus memfd was | |
| * refused to send as KDBUS_MSG_PAYLOAD_MEMFD. | | * refused to send as KDBUS_MSG_PAYLOAD_MEMFD. | |
| * @EMFILE: Too many file descriptors have been supplied with a | | * @EMFILE: Too many file descriptors have been supplied with a | |
| * message. | | * message. | |
| * Too many connections or buses are created for a give
n | | * Too many connections or buses are created for a give
n | |
| * user. | | * user. | |
| | | | |
End of changes. 10 change blocks. |
| 85 lines changed or deleted | | 25 lines changed or added | |
|
| missing.h | | missing.h | |
| | | | |
| skipping to change at line 67 | | skipping to change at line 67 | |
| #endif | | #endif | |
| | | | |
| #ifndef F_SETPIPE_SZ | | #ifndef F_SETPIPE_SZ | |
| #define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7) | | #define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7) | |
| #endif | | #endif | |
| | | | |
| #ifndef F_GETPIPE_SZ | | #ifndef F_GETPIPE_SZ | |
| #define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8) | | #define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8) | |
| #endif | | #endif | |
| | | | |
|
| | | #ifndef F_ADD_SEALS | |
| | | #define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) | |
| | | #endif | |
| | | | |
| | | #ifndef F_GET_SEALS | |
| | | #define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10) | |
| | | #endif | |
| | | | |
| | | #ifndef F_SEAL_SEAL | |
| | | #define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */ | |
| | | #endif | |
| | | | |
| | | #ifndef F_SEAL_SHRINK | |
| | | #define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */ | |
| | | #endif | |
| | | | |
| | | #ifndef F_SEAL_GROW | |
| | | #define F_SEAL_GROW 0x0004 /* prevent file from growing */ | |
| | | #endif | |
| | | | |
| | | #ifndef F_SEAL_WRITE | |
| | | #define F_SEAL_WRITE 0x0008 /* prevent writes */ | |
| | | #endif | |
| | | | |
| | | #ifndef MFD_ALLOW_SEALING | |
| | | #define MFD_ALLOW_SEALING 0x0002ULL | |
| | | #endif | |
| | | | |
| #ifndef IP_FREEBIND | | #ifndef IP_FREEBIND | |
| #define IP_FREEBIND 15 | | #define IP_FREEBIND 15 | |
| #endif | | #endif | |
| | | | |
| #ifndef OOM_SCORE_ADJ_MIN | | #ifndef OOM_SCORE_ADJ_MIN | |
| #define OOM_SCORE_ADJ_MIN (-1000) | | #define OOM_SCORE_ADJ_MIN (-1000) | |
| #endif | | #endif | |
| | | | |
| #ifndef OOM_SCORE_ADJ_MAX | | #ifndef OOM_SCORE_ADJ_MAX | |
| #define OOM_SCORE_ADJ_MAX 1000 | | #define OOM_SCORE_ADJ_MAX 1000 | |
| | | | |
| skipping to change at line 112 | | skipping to change at line 140 | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #ifdef __x86_64__ | | #ifdef __x86_64__ | |
| # ifndef __NR_fanotify_init | | # ifndef __NR_fanotify_init | |
| # define __NR_fanotify_init 300 | | # define __NR_fanotify_init 300 | |
| # endif | | # endif | |
| # ifndef __NR_fanotify_mark | | # ifndef __NR_fanotify_mark | |
| # define __NR_fanotify_mark 301 | | # define __NR_fanotify_mark 301 | |
| # endif | | # endif | |
|
| | | # ifndef __NR_memfd_create | |
| | | # define __NR_memfd_create 319 | |
| | | # endif | |
| | | #elif defined __arm__ | |
| | | # ifndef __NR_memfd_create | |
| | | # define __NR_memfd_create 385 | |
| | | # endif | |
| #elif defined _MIPS_SIM | | #elif defined _MIPS_SIM | |
| # if _MIPS_SIM == _MIPS_SIM_ABI32 | | # if _MIPS_SIM == _MIPS_SIM_ABI32 | |
| # ifndef __NR_fanotify_init | | # ifndef __NR_fanotify_init | |
| # define __NR_fanotify_init 4336 | | # define __NR_fanotify_init 4336 | |
| # endif | | # endif | |
| # ifndef __NR_fanotify_mark | | # ifndef __NR_fanotify_mark | |
| # define __NR_fanotify_mark 4337 | | # define __NR_fanotify_mark 4337 | |
| # endif | | # endif | |
| # elif _MIPS_SIM == _MIPS_SIM_NABI32 | | # elif _MIPS_SIM == _MIPS_SIM_NABI32 | |
| # ifndef __NR_fanotify_init | | # ifndef __NR_fanotify_init | |
| | | | |
| skipping to change at line 142 | | skipping to change at line 177 | |
| # define __NR_fanotify_mark 5296 | | # define __NR_fanotify_mark 5296 | |
| # endif | | # endif | |
| # endif | | # endif | |
| #else | | #else | |
| # ifndef __NR_fanotify_init | | # ifndef __NR_fanotify_init | |
| # define __NR_fanotify_init 338 | | # define __NR_fanotify_init 338 | |
| # endif | | # endif | |
| # ifndef __NR_fanotify_mark | | # ifndef __NR_fanotify_mark | |
| # define __NR_fanotify_mark 339 | | # define __NR_fanotify_mark 339 | |
| # endif | | # endif | |
|
| | | # ifndef __NR_memfd_create | |
| | | # define __NR_memfd_create 356 | |
| | | # endif | |
| #endif | | #endif | |
| | | | |
| #ifndef HAVE_FANOTIFY_INIT | | #ifndef HAVE_FANOTIFY_INIT | |
| static inline int fanotify_init(unsigned int flags, unsigned int event_f_fl
ags) { | | static inline int fanotify_init(unsigned int flags, unsigned int event_f_fl
ags) { | |
| return syscall(__NR_fanotify_init, flags, event_f_flags); | | return syscall(__NR_fanotify_init, flags, event_f_flags); | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #ifndef HAVE_FANOTIFY_MARK | | #ifndef HAVE_FANOTIFY_MARK | |
| static inline int fanotify_mark(int fanotify_fd, unsigned int flags, uint64
_t mask, | | static inline int fanotify_mark(int fanotify_fd, unsigned int flags, uint64
_t mask, | |
| | | | |
| skipping to change at line 169 | | skipping to change at line 207 | |
| _mask._64 = mask; | | _mask._64 = mask; | |
| | | | |
| return syscall(__NR_fanotify_mark, fanotify_fd, flags, | | return syscall(__NR_fanotify_mark, fanotify_fd, flags, | |
| _mask._32[0], _mask._32[1], dfd, pathname); | | _mask._32[0], _mask._32[1], dfd, pathname); | |
| #else | | #else | |
| return syscall(__NR_fanotify_mark, fanotify_fd, flags, mask, dfd, p
athname); | | return syscall(__NR_fanotify_mark, fanotify_fd, flags, mask, dfd, p
athname); | |
| #endif | | #endif | |
| } | | } | |
| #endif | | #endif | |
| | | | |
|
| | | #ifndef HAVE_MEMFD_CREATE | |
| | | static inline int memfd_create(const char *name, uint64_t flags) { | |
| | | return syscall(__NR_memfd_create, name, flags); | |
| | | } | |
| | | #endif | |
| | | | |
| #ifndef BTRFS_IOCTL_MAGIC | | #ifndef BTRFS_IOCTL_MAGIC | |
| #define BTRFS_IOCTL_MAGIC 0x94 | | #define BTRFS_IOCTL_MAGIC 0x94 | |
| #endif | | #endif | |
| | | | |
| #ifndef BTRFS_PATH_NAME_MAX | | #ifndef BTRFS_PATH_NAME_MAX | |
| #define BTRFS_PATH_NAME_MAX 4087 | | #define BTRFS_PATH_NAME_MAX 4087 | |
| #endif | | #endif | |
| | | | |
| #ifndef BTRFS_DEVICE_PATH_NAME_MAX | | #ifndef BTRFS_DEVICE_PATH_NAME_MAX | |
| #define BTRFS_DEVICE_PATH_NAME_MAX 1024 | | #define BTRFS_DEVICE_PATH_NAME_MAX 1024 | |
| | | | |
| skipping to change at line 213 | | skipping to change at line 257 | |
| | | | |
| struct btrfs_ioctl_fs_info_args { | | struct btrfs_ioctl_fs_info_args { | |
| uint64_t max_id; /* out */ | | uint64_t max_id; /* out */ | |
| uint64_t num_devices; /* out */ | | uint64_t num_devices; /* out */ | |
| uint8_t fsid[BTRFS_FSID_SIZE]; /* out */ | | uint8_t fsid[BTRFS_FSID_SIZE]; /* out */ | |
| uint64_t reserved[124]; /* pad to 1k */ | | uint64_t reserved[124]; /* pad to 1k */ | |
| }; | | }; | |
| #endif | | #endif | |
| | | | |
| #ifndef BTRFS_IOC_DEFRAG | | #ifndef BTRFS_IOC_DEFRAG | |
|
| #define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, struct btrfs_ioctl_vol_ | | #define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \ | |
| args) | | struct btrfs_ioctl_vol_args) | |
| #endif | | #endif | |
| | | | |
| #ifndef BTRFS_IOC_DEV_INFO | | #ifndef BTRFS_IOC_DEV_INFO | |
| #define BTRFS_IOC_DEV_INFO _IOWR(BTRFS_IOCTL_MAGIC, 30, \ | | #define BTRFS_IOC_DEV_INFO _IOWR(BTRFS_IOCTL_MAGIC, 30, \ | |
| struct btrfs_ioctl_dev_info_args) | | struct btrfs_ioctl_dev_info_args) | |
| #endif | | #endif | |
| | | | |
| #ifndef BTRFS_IOC_FS_INFO | | #ifndef BTRFS_IOC_FS_INFO | |
| #define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \ | | #define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \ | |
|
| struct btrfs_ioctl_fs_info_args) | | struct btrfs_ioctl_fs_info_args) | |
| | | #endif | |
| | | | |
| | | #ifndef BTRFS_IOC_DEVICES_READY | |
| | | #define BTRFS_IOC_DEVICES_READY _IOR(BTRFS_IOCTL_MAGIC, 39, \ | |
| | | struct btrfs_ioctl_vol_args) | |
| #endif | | #endif | |
| | | | |
| #ifndef BTRFS_SUPER_MAGIC | | #ifndef BTRFS_SUPER_MAGIC | |
| #define BTRFS_SUPER_MAGIC 0x9123683E | | #define BTRFS_SUPER_MAGIC 0x9123683E | |
| #endif | | #endif | |
| | | | |
| #ifndef MS_MOVE | | #ifndef MS_MOVE | |
| #define MS_MOVE 8192 | | #define MS_MOVE 8192 | |
| #endif | | #endif | |
| | | | |
| | | | |
| skipping to change at line 374 | | skipping to change at line 424 | |
| #endif | | #endif | |
| | | | |
| #ifndef LOOP_CTL_REMOVE | | #ifndef LOOP_CTL_REMOVE | |
| #define LOOP_CTL_REMOVE 0x4C81 | | #define LOOP_CTL_REMOVE 0x4C81 | |
| #endif | | #endif | |
| | | | |
| #ifndef LOOP_CTL_GET_FREE | | #ifndef LOOP_CTL_GET_FREE | |
| #define LOOP_CTL_GET_FREE 0x4C82 | | #define LOOP_CTL_GET_FREE 0x4C82 | |
| #endif | | #endif | |
| | | | |
|
| | | #if !HAVE_DECL_IFLA_MACVLAN_FLAGS | |
| | | #define IFLA_MACVLAN_UNSPEC 0 | |
| | | #define IFLA_MACVLAN_MODE 1 | |
| | | #define IFLA_MACVLAN_FLAGS 2 | |
| | | #define __IFLA_MACVLAN_MAX 3 | |
| | | | |
| | | #define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1) | |
| | | #endif | |
| | | | |
| | | #if !HAVE_DECL_IFLA_VTI_REMOTE | |
| | | #define IFLA_VTI_UNSPEC 0 | |
| | | #define IFLA_VTI_LINK 1 | |
| | | #define IFLA_VTI_IKEY 2 | |
| | | #define IFLA_VTI_OKEY 3 | |
| | | #define IFLA_VTI_LOCAL 4 | |
| | | #define IFLA_VTI_REMOTE 5 | |
| | | #define __IFLA_VTI_MAX 6 | |
| | | | |
| | | #define IFLA_VTI_MAX (__IFLA_VTI_MAX - 1) | |
| | | #endif | |
| | | | |
| #if !HAVE_DECL_IFLA_PHYS_PORT_ID | | #if !HAVE_DECL_IFLA_PHYS_PORT_ID | |
| #undef IFLA_PROMISCUITY | | #undef IFLA_PROMISCUITY | |
| #define IFLA_PROMISCUITY 30 | | #define IFLA_PROMISCUITY 30 | |
| #define IFLA_NUM_TX_QUEUES 31 | | #define IFLA_NUM_TX_QUEUES 31 | |
| #define IFLA_NUM_RX_QUEUES 32 | | #define IFLA_NUM_RX_QUEUES 32 | |
| #define IFLA_CARRIER 33 | | #define IFLA_CARRIER 33 | |
| #define IFLA_PHYS_PORT_ID 34 | | #define IFLA_PHYS_PORT_ID 34 | |
| #define __IFLA_MAX 35 | | #define __IFLA_MAX 35 | |
| | | | |
| #define IFLA_MAX (__IFLA_MAX - 1) | | #define IFLA_MAX (__IFLA_MAX - 1) | |
| | | | |
| skipping to change at line 481 | | skipping to change at line 552 | |
| #endif | | #endif | |
| | | | |
| #if !HAVE_DECL_IFLA_BRIDGE_VLAN_INFO | | #if !HAVE_DECL_IFLA_BRIDGE_VLAN_INFO | |
| #define IFLA_BRIDGE_FLAGS 0 | | #define IFLA_BRIDGE_FLAGS 0 | |
| #define IFLA_BRIDGE_MODE 1 | | #define IFLA_BRIDGE_MODE 1 | |
| #define IFLA_BRIDGE_VLAN_INFO 2 | | #define IFLA_BRIDGE_VLAN_INFO 2 | |
| #define __IFLA_BRIDGE_MAX 3 | | #define __IFLA_BRIDGE_MAX 3 | |
| | | | |
| #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1) | | #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1) | |
| #endif | | #endif | |
|
| | | | |
| | | #ifndef IPV6_UNICAST_IF | |
| | | #define IPV6_UNICAST_IF 76 | |
| | | #endif | |
| | | | |
| | | #ifndef IFF_LOWER_UP | |
| | | #define IFF_LOWER_UP 0x10000 | |
| | | #endif | |
| | | | |
| | | #ifndef IFF_DORMANT | |
| | | #define IFF_DORMANT 0x20000 | |
| | | #endif | |
| | | | |
| | | #ifndef BOND_XMIT_POLICY_ENCAP23 | |
| | | #define BOND_XMIT_POLICY_ENCAP23 3 | |
| | | #endif | |
| | | | |
| | | #ifndef BOND_XMIT_POLICY_ENCAP34 | |
| | | #define BOND_XMIT_POLICY_ENCAP34 4 | |
| | | #endif | |
| | | | |
| | | #ifndef NET_ADDR_RANDOM | |
| | | # define NET_ADDR_RANDOM 1 | |
| | | #endif | |
| | | | |
| | | #ifndef NET_NAME_ENUM | |
| | | # define NET_NAME_ENUM 1 | |
| | | #endif | |
| | | | |
| | | #ifndef NET_NAME_PREDICTABLE | |
| | | # define NET_NAME_PREDICTABLE 2 | |
| | | #endif | |
| | | | |
| | | #ifndef NET_NAME_USER | |
| | | # define NET_NAME_USER 3 | |
| | | #endif | |
| | | | |
| | | #ifndef NET_NAME_RENAMED | |
| | | # define NET_NAME_RENAMED 4 | |
| | | #endif | |
| | | | |
End of changes. 8 change blocks. |
| 3 lines changed or deleted | | 73 lines changed or added | |
|
| network-internal.h | | network-internal.h | |
| /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ | | /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ | |
| | | | |
|
| | | #pragma once | |
| | | | |
| /*** | | /*** | |
| This file is part of systemd. | | This file is part of systemd. | |
| | | | |
| Copyright (C) 2013 Tom Gundersen <teg@jklm.no> | | Copyright (C) 2013 Tom Gundersen <teg@jklm.no> | |
| | | | |
| systemd is free software; you can redistribute it and/or modify it | | 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 | | 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 | | the Free Software Foundation; either version 2.1 of the License, or | |
| (at your option) any later version. | | (at your option) any later version. | |
| | | | |
| systemd is distributed in the hope that it will be useful, but | | systemd is distributed in the hope that it will be useful, but | |
| WITHOUT ANY WARRANTY; without even the implied warranty of | | WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| Lesser General Public License for more details. | | Lesser General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU Lesser General Public License | | You should have received a copy of the GNU Lesser General Public License | |
| along with systemd; If not, see <http://www.gnu.org/licenses/>. | | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
| ***/ | | ***/ | |
| | | | |
|
| #pragma once | | | |
| | | | |
| #include <netinet/ether.h> | | #include <netinet/ether.h> | |
| #include <netinet/in.h> | | #include <netinet/in.h> | |
| #include <stdbool.h> | | #include <stdbool.h> | |
| | | | |
| #include "udev.h" | | #include "udev.h" | |
| #include "condition-util.h" | | #include "condition-util.h" | |
| | | | |
| bool net_match_config(const struct ether_addr *match_mac, | | bool net_match_config(const struct ether_addr *match_mac, | |
| const char *match_path, | | const char *match_path, | |
| const char *match_driver, | | const char *match_driver, | |
| | | | |
| skipping to change at line 47 | | skipping to change at line 47 | |
| Condition *match_virt, | | Condition *match_virt, | |
| Condition *match_kernel, | | Condition *match_kernel, | |
| Condition *match_arch, | | Condition *match_arch, | |
| const struct ether_addr *dev_mac, | | const struct ether_addr *dev_mac, | |
| const char *dev_path, | | const char *dev_path, | |
| const char *dev_parent_driver, | | const char *dev_parent_driver, | |
| const char *dev_driver, | | const char *dev_driver, | |
| const char *dev_type, | | const char *dev_type, | |
| const char *dev_name); | | const char *dev_name); | |
| | | | |
|
| unsigned net_netmask_to_prefixlen(const struct in_addr *netmask); | | | |
| | | | |
| int config_parse_net_condition(const char *unit, const char *filename, unsi
gned line, | | int config_parse_net_condition(const char *unit, const char *filename, unsi
gned line, | |
| const char *section, unsigned section_line,
const char *lvalue, | | const char *section, unsigned section_line,
const char *lvalue, | |
| int ltype, const char *rvalue, void *data, v
oid *userdata); | | int ltype, const char *rvalue, void *data, v
oid *userdata); | |
| | | | |
| int config_parse_hwaddr(const char *unit, const char *filename, unsigned li
ne, | | int config_parse_hwaddr(const char *unit, const char *filename, unsigned li
ne, | |
| const char *section, unsigned section_line, const c
har *lvalue, | | const char *section, unsigned section_line, const c
har *lvalue, | |
| int ltype, const char *rvalue, void *data, void *us
erdata); | | int ltype, const char *rvalue, void *data, void *us
erdata); | |
| | | | |
| int config_parse_ifname(const char *unit, const char *filename, unsigned li
ne, | | int config_parse_ifname(const char *unit, const char *filename, unsigned li
ne, | |
| const char *section, unsigned section_line, const c
har *lvalue, | | const char *section, unsigned section_line, const c
har *lvalue, | |
| int ltype, const char *rvalue, void *data, void *us
erdata); | | int ltype, const char *rvalue, void *data, void *us
erdata); | |
| | | | |
| int config_parse_ifalias(const char *unit, const char *filename, unsigned l
ine, | | int config_parse_ifalias(const char *unit, const char *filename, unsigned l
ine, | |
| const char *section, unsigned section_line, const
char *lvalue, | | const char *section, unsigned section_line, const
char *lvalue, | |
| int ltype, const char *rvalue, void *data, void *u
serdata); | | int ltype, const char *rvalue, void *data, void *u
serdata); | |
| | | | |
|
| int net_parse_inaddr(const char *address, unsigned char *family, void *dst) | | | |
| ; | | | |
| | | | |
| int net_get_unique_predictable_data(struct udev_device *device, uint8_t res
ult[8]); | | int net_get_unique_predictable_data(struct udev_device *device, uint8_t res
ult[8]); | |
| const char *net_get_name(struct udev_device *device); | | const char *net_get_name(struct udev_device *device); | |
| | | | |
|
| void serialize_in_addrs(FILE *f, const char *key, struct in_addr *addresses | | void serialize_in_addrs(FILE *f, const struct in_addr *addresses, size_t si | |
| , size_t size); | | ze); | |
| int deserialize_in_addrs(struct in_addr **addresses, size_t *size, const ch | | int deserialize_in_addrs(struct in_addr **addresses, const char *string); | |
| ar *string); | | int deserialize_in6_addrs(struct in6_addr **addresses, const char *string); | |
| int deserialize_in6_addrs(struct in6_addr **addresses, size_t *size, const | | | |
| char *string); | | | |
| | | | |
| /* don't include "dhcp-lease-internal.h" as it causes conflicts between net
inet/ip.h and linux/ip.h */ | | /* don't include "dhcp-lease-internal.h" as it causes conflicts between net
inet/ip.h and linux/ip.h */ | |
| struct sd_dhcp_route; | | struct sd_dhcp_route; | |
| | | | |
| void serialize_dhcp_routes(FILE *f, const char *key, struct sd_dhcp_route *
routes, size_t size); | | void serialize_dhcp_routes(FILE *f, const char *key, struct sd_dhcp_route *
routes, size_t size); | |
| int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, s
ize_t *ret_allocated, const char *string); | | int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, s
ize_t *ret_allocated, const char *string); | |
| | | | |
End of changes. 5 change blocks. |
| 13 lines changed or deleted | | 6 lines changed or added | |
|
| networkd.h | | networkd.h | |
| | | | |
| skipping to change at line 41 | | skipping to change at line 41 | |
| #include "sd-ipv4ll.h" | | #include "sd-ipv4ll.h" | |
| #include "sd-icmp6-nd.h" | | #include "sd-icmp6-nd.h" | |
| #include "sd-dhcp6-client.h" | | #include "sd-dhcp6-client.h" | |
| #include "udev.h" | | #include "udev.h" | |
| | | | |
| #include "rtnl-util.h" | | #include "rtnl-util.h" | |
| #include "hashmap.h" | | #include "hashmap.h" | |
| #include "list.h" | | #include "list.h" | |
| #include "set.h" | | #include "set.h" | |
| #include "condition-util.h" | | #include "condition-util.h" | |
|
| #include "socket-util.h" | | #include "in-addr-util.h" | |
| | | | |
| #define CACHE_INFO_INFINITY_LIFE_TIME 0xFFFFFFFFU | | #define CACHE_INFO_INFINITY_LIFE_TIME 0xFFFFFFFFU | |
|
| #define VXLAN_VID_MAX (1u << 24) - 1 | | #define DHCP_ROUTE_METRIC 1024 | |
| #define DHCP_STATIC_ROUTE_METRIC 1024 | | #define IPV4LL_ROUTE_METRIC 2048 | |
| | | | |
| typedef struct NetDev NetDev; | | typedef struct NetDev NetDev; | |
| typedef struct Network Network; | | typedef struct Network Network; | |
| typedef struct Link Link; | | typedef struct Link Link; | |
| typedef struct Address Address; | | typedef struct Address Address; | |
| typedef struct Route Route; | | typedef struct Route Route; | |
| typedef struct Manager Manager; | | typedef struct Manager Manager; | |
| typedef struct AddressPool AddressPool; | | typedef struct AddressPool AddressPool; | |
| | | | |
|
| typedef struct netdev_enslave_callback netdev_enslave_callback; | | | |
| | | | |
| struct netdev_enslave_callback { | | | |
| sd_rtnl_message_handler_t callback; | | | |
| Link *link; | | | |
| | | | |
| LIST_FIELDS(netdev_enslave_callback, callbacks); | | | |
| }; | | | |
| | | | |
| typedef enum MacVlanMode { | | | |
| NETDEV_MACVLAN_MODE_PRIVATE = MACVLAN_MODE_PRIVATE, | | | |
| NETDEV_MACVLAN_MODE_VEPA = MACVLAN_MODE_VEPA, | | | |
| NETDEV_MACVLAN_MODE_BRIDGE = MACVLAN_MODE_BRIDGE, | | | |
| NETDEV_MACVLAN_MODE_PASSTHRU = MACVLAN_MODE_PASSTHRU, | | | |
| _NETDEV_MACVLAN_MODE_MAX, | | | |
| _NETDEV_MACVLAN_MODE_INVALID = -1 | | | |
| } MacVlanMode; | | | |
| | | | |
| typedef enum NetDevKind { | | | |
| NETDEV_KIND_BRIDGE, | | | |
| NETDEV_KIND_BOND, | | | |
| NETDEV_KIND_VLAN, | | | |
| NETDEV_KIND_MACVLAN, | | | |
| NETDEV_KIND_VXLAN, | | | |
| NETDEV_KIND_IPIP, | | | |
| NETDEV_KIND_GRE, | | | |
| NETDEV_KIND_SIT, | | | |
| NETDEV_KIND_VETH, | | | |
| NETDEV_KIND_VTI, | | | |
| NETDEV_KIND_DUMMY, | | | |
| NETDEV_KIND_TUN, | | | |
| NETDEV_KIND_TAP, | | | |
| _NETDEV_KIND_MAX, | | | |
| _NETDEV_KIND_INVALID = -1 | | | |
| } NetDevKind; | | | |
| | | | |
| typedef enum NetDevState { | | | |
| NETDEV_STATE_FAILED, | | | |
| NETDEV_STATE_CREATING, | | | |
| NETDEV_STATE_READY, | | | |
| NETDEV_STATE_LINGER, | | | |
| _NETDEV_STATE_MAX, | | | |
| _NETDEV_STATE_INVALID = -1, | | | |
| } NetDevState; | | | |
| | | | |
| struct NetDev { | | | |
| Manager *manager; | | | |
| | | | |
| int n_ref; | | | |
| | | | |
| char *filename; | | | |
| | | | |
| Condition *match_host; | | | |
| Condition *match_virt; | | | |
| Condition *match_kernel; | | | |
| Condition *match_arch; | | | |
| | | | |
| char *description; | | | |
| char *ifname; | | | |
| char *ifname_peer; | | | |
| char *user_name; | | | |
| char *group_name; | | | |
| size_t mtu; | | | |
| struct ether_addr *mac; | | | |
| struct ether_addr *mac_peer; | | | |
| NetDevKind kind; | | | |
| | | | |
| uint64_t vlanid; | | | |
| uint64_t vxlanid; | | | |
| int32_t macvlan_mode; | | | |
| | | | |
| int ifindex; | | | |
| NetDevState state; | | | |
| | | | |
| bool tunnel_pmtudisc; | | | |
| bool learning; | | | |
| bool one_queue; | | | |
| bool multi_queue; | | | |
| bool packet_info; | | | |
| | | | |
| unsigned ttl; | | | |
| unsigned tos; | | | |
| unsigned char family; | | | |
| union in_addr_union local; | | | |
| union in_addr_union remote; | | | |
| union in_addr_union group; | | | |
| | | | |
| LIST_HEAD(netdev_enslave_callback, callbacks); | | | |
| }; | | | |
| | | | |
| typedef enum DHCPSupport { | | typedef enum DHCPSupport { | |
| DHCP_SUPPORT_NONE, | | DHCP_SUPPORT_NONE, | |
| DHCP_SUPPORT_BOTH, | | DHCP_SUPPORT_BOTH, | |
| DHCP_SUPPORT_V4, | | DHCP_SUPPORT_V4, | |
| DHCP_SUPPORT_V6, | | DHCP_SUPPORT_V6, | |
| _DHCP_SUPPORT_MAX, | | _DHCP_SUPPORT_MAX, | |
| _DHCP_SUPPORT_INVALID = -1, | | _DHCP_SUPPORT_INVALID = -1, | |
| } DHCPSupport; | | } DHCPSupport; | |
| | | | |
|
| | | typedef enum LLMNRSupport { | |
| | | LLMNR_SUPPORT_NO, | |
| | | LLMNR_SUPPORT_YES, | |
| | | LLMNR_SUPPORT_RESOLVE, | |
| | | _LLMNR_SUPPORT_MAX, | |
| | | _LLMNR_SUPPORT_INVALID = -1, | |
| | | } LLMNRSupport; | |
| | | | |
| struct Network { | | struct Network { | |
| Manager *manager; | | Manager *manager; | |
| | | | |
| char *filename; | | char *filename; | |
| | | | |
| struct ether_addr *match_mac; | | struct ether_addr *match_mac; | |
| char *match_path; | | char *match_path; | |
| char *match_driver; | | char *match_driver; | |
| char *match_type; | | char *match_type; | |
| char *match_name; | | char *match_name; | |
|
| | | char *dhcp_vendor_class_identifier; | |
| | | | |
| Condition *match_host; | | Condition *match_host; | |
| Condition *match_virt; | | Condition *match_virt; | |
| Condition *match_kernel; | | Condition *match_kernel; | |
| Condition *match_arch; | | Condition *match_arch; | |
| | | | |
| char *description; | | char *description; | |
| NetDev *bridge; | | NetDev *bridge; | |
| NetDev *bond; | | NetDev *bond; | |
|
| NetDev *tunnel; | | Hashmap *stacked_netdevs; | |
| Hashmap *vlans; | | | |
| Hashmap *macvlans; | | | |
| Hashmap *vxlans; | | | |
| DHCPSupport dhcp; | | DHCPSupport dhcp; | |
| bool dhcp_dns; | | bool dhcp_dns; | |
| bool dhcp_ntp; | | bool dhcp_ntp; | |
| bool dhcp_mtu; | | bool dhcp_mtu; | |
| bool dhcp_hostname; | | bool dhcp_hostname; | |
|
| bool dhcp_domainname; | | bool dhcp_domains; | |
| bool dhcp_sendhost; | | bool dhcp_sendhost; | |
|
| | | bool dhcp_broadcast; | |
| bool dhcp_critical; | | bool dhcp_critical; | |
| bool dhcp_routes; | | bool dhcp_routes; | |
| bool ipv4ll; | | bool ipv4ll; | |
|
| | | bool ipv4ll_route; | |
| | | | |
| bool dhcp_server; | | bool dhcp_server; | |
| | | | |
| LIST_HEAD(Address, static_addresses); | | LIST_HEAD(Address, static_addresses); | |
| LIST_HEAD(Route, static_routes); | | LIST_HEAD(Route, static_routes); | |
| | | | |
| Hashmap *addresses_by_section; | | Hashmap *addresses_by_section; | |
| Hashmap *routes_by_section; | | Hashmap *routes_by_section; | |
| | | | |
|
| LIST_HEAD(Address, dns); | | bool wildcard_domain; | |
| LIST_HEAD(Address, ntp); | | char **domains, **dns, **ntp; | |
| | | | |
| | | LLMNRSupport llmnr; | |
| | | | |
| LIST_FIELDS(Network, networks); | | LIST_FIELDS(Network, networks); | |
| }; | | }; | |
| | | | |
| struct Address { | | struct Address { | |
| Network *network; | | Network *network; | |
|
| uint64_t section; | | unsigned section; | |
| | | | |
|
| unsigned char family; | | int family; | |
| unsigned char prefixlen; | | unsigned char prefixlen; | |
| unsigned char scope; | | unsigned char scope; | |
|
| | | unsigned char flags; | |
| char *label; | | char *label; | |
| | | | |
| struct in_addr broadcast; | | struct in_addr broadcast; | |
| struct ifa_cacheinfo cinfo; | | struct ifa_cacheinfo cinfo; | |
| | | | |
| union in_addr_union in_addr; | | union in_addr_union in_addr; | |
|
| | | union in_addr_union in_addr_peer; | |
| | | | |
| LIST_FIELDS(Address, addresses); | | LIST_FIELDS(Address, addresses); | |
| }; | | }; | |
| | | | |
| struct Route { | | struct Route { | |
| Network *network; | | Network *network; | |
|
| uint64_t section; | | unsigned section; | |
| | | | |
|
| unsigned char family; | | int family; | |
| unsigned char dst_prefixlen; | | unsigned char dst_prefixlen; | |
| unsigned char scope; | | unsigned char scope; | |
| uint32_t metrics; | | uint32_t metrics; | |
|
| | | unsigned char protocol; /* RTPROT_* */ | |
| | | | |
| union in_addr_union in_addr; | | union in_addr_union in_addr; | |
| union in_addr_union dst_addr; | | union in_addr_union dst_addr; | |
| | | | |
| LIST_FIELDS(Route, routes); | | LIST_FIELDS(Route, routes); | |
| }; | | }; | |
| | | | |
|
| typedef enum LinkState { | | | |
| LINK_STATE_INITIALIZING, | | | |
| LINK_STATE_ENSLAVING, | | | |
| LINK_STATE_SETTING_ADDRESSES, | | | |
| LINK_STATE_SETTING_ROUTES, | | | |
| LINK_STATE_CONFIGURED, | | | |
| LINK_STATE_UNMANAGED, | | | |
| LINK_STATE_FAILED, | | | |
| LINK_STATE_LINGER, | | | |
| _LINK_STATE_MAX, | | | |
| _LINK_STATE_INVALID = -1 | | | |
| } LinkState; | | | |
| | | | |
| typedef enum LinkOperationalState { | | | |
| LINK_OPERSTATE_UNKNOWN, | | | |
| LINK_OPERSTATE_DORMANT, | | | |
| LINK_OPERSTATE_CARRIER, | | | |
| LINK_OPERSTATE_DEGRADED, | | | |
| LINK_OPERSTATE_ROUTABLE, | | | |
| _LINK_OPERSTATE_MAX, | | | |
| _LINK_OPERSTATE_INVALID = -1 | | | |
| } LinkOperationalState; | | | |
| | | | |
| struct Link { | | | |
| Manager *manager; | | | |
| | | | |
| int n_ref; | | | |
| | | | |
| uint64_t ifindex; | | | |
| char *ifname; | | | |
| char *state_file; | | | |
| struct ether_addr mac; | | | |
| struct udev_device *udev_device; | | | |
| | | | |
| unsigned flags; | | | |
| uint8_t kernel_operstate; | | | |
| | | | |
| Network *network; | | | |
| | | | |
| LinkState state; | | | |
| LinkOperationalState operstate; | | | |
| | | | |
| unsigned addr_messages; | | | |
| unsigned route_messages; | | | |
| unsigned enslaving; | | | |
| | | | |
| LIST_HEAD(Address, addresses); | | | |
| | | | |
| sd_dhcp_client *dhcp_client; | | | |
| sd_dhcp_lease *dhcp_lease; | | | |
| char *lease_file; | | | |
| uint16_t original_mtu; | | | |
| sd_ipv4ll *ipv4ll; | | | |
| | | | |
| LIST_HEAD(Address, pool_addresses); | | | |
| | | | |
| sd_dhcp_server *dhcp_server; | | | |
| | | | |
| sd_icmp6_nd *icmp6_router_discovery; | | | |
| sd_dhcp6_client *dhcp6_client; | | | |
| }; | | | |
| | | | |
| struct AddressPool { | | struct AddressPool { | |
| Manager *manager; | | Manager *manager; | |
| | | | |
|
| unsigned family; | | int family; | |
| unsigned prefixlen; | | unsigned prefixlen; | |
| | | | |
| union in_addr_union in_addr; | | union in_addr_union in_addr; | |
| | | | |
| LIST_FIELDS(AddressPool, address_pools); | | LIST_FIELDS(AddressPool, address_pools); | |
| }; | | }; | |
| | | | |
| struct Manager { | | struct Manager { | |
| sd_rtnl *rtnl; | | sd_rtnl *rtnl; | |
| sd_event *event; | | sd_event *event; | |
| | | | |
| skipping to change at line 344 | | skipping to change at line 206 | |
| bool manager_should_reload(Manager *m); | | bool manager_should_reload(Manager *m); | |
| | | | |
| int manager_rtnl_enumerate_links(Manager *m); | | int manager_rtnl_enumerate_links(Manager *m); | |
| | | | |
| int manager_rtnl_listen(Manager *m); | | int manager_rtnl_listen(Manager *m); | |
| int manager_udev_listen(Manager *m); | | int manager_udev_listen(Manager *m); | |
| int manager_bus_listen(Manager *m); | | int manager_bus_listen(Manager *m); | |
| | | | |
| int manager_save(Manager *m); | | int manager_save(Manager *m); | |
| | | | |
|
| int manager_address_pool_acquire(Manager *m, unsigned family, unsigned pref
ixlen, union in_addr_union *found); | | int manager_address_pool_acquire(Manager *m, int family, unsigned prefixlen
, union in_addr_union *found); | |
| | | | |
| DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free); | | DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free); | |
| #define _cleanup_manager_free_ _cleanup_(manager_freep) | | #define _cleanup_manager_free_ _cleanup_(manager_freep) | |
| | | | |
|
| /* NetDev */ | | | |
| | | | |
| #define VLANID_MAX 4094 | | | |
| | | | |
| int netdev_load(Manager *manager); | | | |
| void netdev_drop(NetDev *netdev); | | | |
| | | | |
| NetDev *netdev_unref(NetDev *netdev); | | | |
| NetDev *netdev_ref(NetDev *netdev); | | | |
| | | | |
| DEFINE_TRIVIAL_CLEANUP_FUNC(NetDev*, netdev_unref); | | | |
| #define _cleanup_netdev_unref_ _cleanup_(netdev_unrefp) | | | |
| | | | |
| int netdev_get(Manager *manager, const char *name, NetDev **ret); | | | |
| int netdev_set_ifindex(NetDev *netdev, sd_rtnl_message *newlink); | | | |
| int netdev_enslave(NetDev *netdev, Link *link, sd_rtnl_message_handler_t cb | | | |
| ); | | | |
| int netdev_create_tunnel(NetDev *netdev, Link *link, sd_rtnl_message_handle | | | |
| r_t callback); | | | |
| int netdev_create_veth(NetDev *netdev, sd_rtnl_message_handler_t callback); | | | |
| int netdev_create_vxlan(NetDev *netdev, Link *link, sd_rtnl_message_handler | | | |
| _t callback); | | | |
| int netdev_create_vlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_ | | | |
| t callback); | | | |
| int netdev_create_macvlan(NetDev *netdev, Link *link, sd_rtnl_message_handl | | | |
| er_t callback); | | | |
| int netdev_create_dummy(NetDev *netdev, sd_rtnl_message_handler_t callback) | | | |
| ; | | | |
| int netdev_create_tuntap(NetDev *netdev); | | | |
| | | | |
| const char *netdev_kind_to_string(NetDevKind d) _const_; | | | |
| NetDevKind netdev_kind_from_string(const char *d) _pure_; | | | |
| | | | |
| const char *macvlan_mode_to_string(MacVlanMode d) _const_; | | | |
| MacVlanMode macvlan_mode_from_string(const char *d) _pure_; | | | |
| | | | |
| int config_parse_netdev_kind(const char *unit, const char *filename, unsign | | | |
| ed line, const char *section, unsigned section_line, const char *lvalue, in | | | |
| t ltype, const char *rvalue, void *data, void *userdata); | | | |
| | | | |
| int config_parse_macvlan_mode(const char *unit, const char *filename, unsig | | | |
| ned line, const char *section, unsigned section_line, const char *lvalue, i | | | |
| nt ltype, const char *rvalue, void *data, void *userdata); | | | |
| | | | |
| /* gperf */ | | | |
| const struct ConfigPerfItem* network_netdev_gperf_lookup(const char *key, u | | | |
| nsigned length); | | | |
| | | | |
| /* Network */ | | /* Network */ | |
| | | | |
| int network_load(Manager *manager); | | int network_load(Manager *manager); | |
| | | | |
| void network_free(Network *network); | | void network_free(Network *network); | |
| | | | |
| DEFINE_TRIVIAL_CLEANUP_FUNC(Network*, network_free); | | DEFINE_TRIVIAL_CLEANUP_FUNC(Network*, network_free); | |
| #define _cleanup_network_free_ _cleanup_(network_freep) | | #define _cleanup_network_free_ _cleanup_(network_freep) | |
| | | | |
| int network_get(Manager *manager, struct udev_device *device, | | int network_get(Manager *manager, struct udev_device *device, | |
| const char *ifname, const struct ether_addr *mac, | | const char *ifname, const struct ether_addr *mac, | |
| Network **ret); | | Network **ret); | |
| int network_apply(Manager *manager, Network *network, Link *link); | | int network_apply(Manager *manager, Network *network, Link *link); | |
| | | | |
| int config_parse_netdev(const char *unit, const char *filename, unsigned li
ne, | | int config_parse_netdev(const char *unit, const char *filename, unsigned li
ne, | |
| const char *section, unsigned section_line, const c
har *lvalue, | | const char *section, unsigned section_line, const c
har *lvalue, | |
| int ltype, const char *rvalue, void *data, void *us
erdata); | | int ltype, const char *rvalue, void *data, void *us
erdata); | |
| | | | |
|
| | | int config_parse_domains(const char *unit, | |
| | | const char *filename, | |
| | | unsigned line, | |
| | | const char *section, | |
| | | unsigned section_line, | |
| | | const char *lvalue, | |
| | | int ltype, | |
| | | const char *rvalue, | |
| | | void *data, | |
| | | void *userdata); | |
| | | | |
| int config_parse_tunnel(const char *unit, | | int config_parse_tunnel(const char *unit, | |
| const char *filename, | | const char *filename, | |
| unsigned line, | | unsigned line, | |
| const char *section, | | const char *section, | |
| unsigned section_line, | | unsigned section_line, | |
| const char *lvalue, | | const char *lvalue, | |
| int ltype, | | int ltype, | |
| const char *rvalue, | | const char *rvalue, | |
| void *data, | | void *data, | |
| void *userdata); | | void *userdata); | |
| | | | |
| skipping to change at line 431 | | skipping to change at line 267 | |
| int ltype, | | int ltype, | |
| const char *rvalue, | | const char *rvalue, | |
| void *data, | | void *data, | |
| void *userdata); | | void *userdata); | |
| | | | |
| /* gperf */ | | /* gperf */ | |
| const struct ConfigPerfItem* network_network_gperf_lookup(const char *key,
unsigned length); | | const struct ConfigPerfItem* network_network_gperf_lookup(const char *key,
unsigned length); | |
| | | | |
| /* Route */ | | /* Route */ | |
| int route_new_static(Network *network, unsigned section, Route **ret); | | int route_new_static(Network *network, unsigned section, Route **ret); | |
|
| int route_new_dynamic(Route **ret); | | int route_new_dynamic(Route **ret, unsigned char rtm_protocol); | |
| void route_free(Route *route); | | void route_free(Route *route); | |
| int route_configure(Route *route, Link *link, sd_rtnl_message_handler_t cal
lback); | | int route_configure(Route *route, Link *link, sd_rtnl_message_handler_t cal
lback); | |
| int route_drop(Route *route, Link *link, sd_rtnl_message_handler_t callback
); | | int route_drop(Route *route, Link *link, sd_rtnl_message_handler_t callback
); | |
| | | | |
| DEFINE_TRIVIAL_CLEANUP_FUNC(Route*, route_free); | | DEFINE_TRIVIAL_CLEANUP_FUNC(Route*, route_free); | |
| #define _cleanup_route_free_ _cleanup_(route_freep) | | #define _cleanup_route_free_ _cleanup_(route_freep) | |
| | | | |
| int config_parse_gateway(const char *unit, const char *filename, unsigned l
ine, | | int config_parse_gateway(const char *unit, const char *filename, unsigned l
ine, | |
| const char *section, unsigned section_line, const
char *lvalue, | | const char *section, unsigned section_line, const
char *lvalue, | |
| int ltype, const char *rvalue, void *data, void *u
serdata); | | int ltype, const char *rvalue, void *data, void *u
serdata); | |
| | | | |
| int config_parse_destination(const char *unit, const char *filename, unsign
ed line, | | int config_parse_destination(const char *unit, const char *filename, unsign
ed line, | |
| const char *section, unsigned section_line, co
nst char *lvalue, | | const char *section, unsigned section_line, co
nst char *lvalue, | |
| int ltype, const char *rvalue, void *data, voi
d *userdata); | | int ltype, const char *rvalue, void *data, voi
d *userdata); | |
| | | | |
|
| | | int config_parse_route_priority(const char *unit, const char *filename, uns | |
| | | igned line, | |
| | | const char *section, unsigned section_line, | |
| | | const char *lvalue, | |
| | | int ltype, const char *rvalue, void *data, | |
| | | void *userdata); | |
| /* Address */ | | /* Address */ | |
| int address_new_static(Network *network, unsigned section, Address **ret); | | int address_new_static(Network *network, unsigned section, Address **ret); | |
| int address_new_dynamic(Address **ret); | | int address_new_dynamic(Address **ret); | |
| void address_free(Address *address); | | void address_free(Address *address); | |
| int address_configure(Address *address, Link *link, sd_rtnl_message_handler
_t callback); | | int address_configure(Address *address, Link *link, sd_rtnl_message_handler
_t callback); | |
| int address_update(Address *address, Link *link, sd_rtnl_message_handler_t
callback); | | int address_update(Address *address, Link *link, sd_rtnl_message_handler_t
callback); | |
| int address_drop(Address *address, Link *link, sd_rtnl_message_handler_t ca
llback); | | int address_drop(Address *address, Link *link, sd_rtnl_message_handler_t ca
llback); | |
| bool address_equal(Address *a1, Address *a2); | | bool address_equal(Address *a1, Address *a2); | |
| | | | |
| DEFINE_TRIVIAL_CLEANUP_FUNC(Address*, address_free); | | DEFINE_TRIVIAL_CLEANUP_FUNC(Address*, address_free); | |
| #define _cleanup_address_free_ _cleanup_(address_freep) | | #define _cleanup_address_free_ _cleanup_(address_freep) | |
| | | | |
|
| int config_parse_dns(const char *unit, const char *filename, unsigned line, | | | |
| const char *section, unsigned section_line, const char | | | |
| *lvalue, | | | |
| int ltype, const char *rvalue, void *data, void *userd | | | |
| ata); | | | |
| | | | |
| int config_parse_address(const char *unit, const char *filename, unsigned l
ine, | | int config_parse_address(const char *unit, const char *filename, unsigned l
ine, | |
| const char *section, unsigned section_line, const
char *lvalue, | | const char *section, unsigned section_line, const
char *lvalue, | |
| int ltype, const char *rvalue, void *data, void *u
serdata); | | int ltype, const char *rvalue, void *data, void *u
serdata); | |
| | | | |
| int config_parse_broadcast(const char *unit, const char *filename, unsigned
line, | | int config_parse_broadcast(const char *unit, const char *filename, unsigned
line, | |
| const char *section, unsigned section_line, cons
t char *lvalue, | | const char *section, unsigned section_line, cons
t char *lvalue, | |
| int ltype, const char *rvalue, void *data, void
*userdata); | | int ltype, const char *rvalue, void *data, void
*userdata); | |
| | | | |
| int config_parse_label(const char *unit, const char *filename, unsigned lin
e, | | int config_parse_label(const char *unit, const char *filename, unsigned lin
e, | |
| const char *section, unsigned section_line, const ch
ar *lvalue, | | const char *section, unsigned section_line, const ch
ar *lvalue, | |
| int ltype, const char *rvalue, void *data, void *use
rdata); | | int ltype, const char *rvalue, void *data, void *use
rdata); | |
| | | | |
|
| /* Link */ | | | |
| | | | |
| Link *link_unref(Link *link); | | | |
| Link *link_ref(Link *link); | | | |
| int link_get(Manager *m, int ifindex, Link **ret); | | | |
| int link_add(Manager *manager, sd_rtnl_message *message, Link **ret); | | | |
| void link_drop(Link *link); | | | |
| | | | |
| int link_update(Link *link, sd_rtnl_message *message); | | | |
| int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void | | | |
| *userdata); | | | |
| | | | |
| int link_initialized(Link *link, struct udev_device *device); | | | |
| | | | |
| int link_save(Link *link); | | | |
| | | | |
| bool link_has_carrier(unsigned flags, uint8_t operstate); | | | |
| | | | |
| const char* link_state_to_string(LinkState s) _const_; | | | |
| LinkState link_state_from_string(const char *s) _pure_; | | | |
| | | | |
| const char* link_operstate_to_string(LinkOperationalState s) _const_; | | | |
| LinkOperationalState link_operstate_from_string(const char *s) _pure_; | | | |
| | | | |
| DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_unref); | | | |
| #define _cleanup_link_unref_ _cleanup_(link_unrefp) | | | |
| | | | |
| /* DHCP support */ | | /* DHCP support */ | |
| | | | |
| const char* dhcp_support_to_string(DHCPSupport i) _const_; | | const char* dhcp_support_to_string(DHCPSupport i) _const_; | |
| DHCPSupport dhcp_support_from_string(const char *s) _pure_; | | DHCPSupport dhcp_support_from_string(const char *s) _pure_; | |
| | | | |
| int config_parse_dhcp(const char *unit, const char *filename, unsigned line
, | | int config_parse_dhcp(const char *unit, const char *filename, unsigned line
, | |
| const char *section, unsigned section_line, const cha
r *lvalue, | | const char *section, unsigned section_line, const cha
r *lvalue, | |
| int ltype, const char *rvalue, void *data, void *user
data); | | int ltype, const char *rvalue, void *data, void *user
data); | |
| | | | |
|
| | | /* LLMNR support */ | |
| | | | |
| | | const char* llmnr_support_to_string(LLMNRSupport i) _const_; | |
| | | LLMNRSupport llmnr_support_from_string(const char *s) _pure_; | |
| | | | |
| | | int config_parse_llmnr(const char *unit, const char *filename, unsigned lin | |
| | | e, | |
| | | const char *section, unsigned section_line, const cha | |
| | | r *lvalue, | |
| | | int ltype, const char *rvalue, void *data, void *user | |
| | | data); | |
| | | | |
| /* Address Pool */ | | /* Address Pool */ | |
| | | | |
|
| int address_pool_new(Manager *m, AddressPool **ret, unsigned family, const | | int address_pool_new(Manager *m, AddressPool **ret, int family, const union | |
| union in_addr_union *u, unsigned prefixlen); | | in_addr_union *u, unsigned prefixlen); | |
| int address_pool_new_from_string(Manager *m, AddressPool **ret, unsigned fa | | int address_pool_new_from_string(Manager *m, AddressPool **ret, int family, | |
| mily, const char *p, unsigned prefixlen); | | const char *p, unsigned prefixlen); | |
| void address_pool_free(AddressPool *p); | | void address_pool_free(AddressPool *p); | |
| | | | |
| int address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_
union *found); | | int address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_
union *found); | |
| | | | |
| /* Macros which append INTERFACE= to the message */ | | /* Macros which append INTERFACE= to the message */ | |
| | | | |
| #define log_full_link(level, link, fmt, ...) log_meta_object(level, __FILE_
_, __LINE__, __func__, "INTERFACE=", link->ifname, "%-*s: " fmt, IFNAMSIZ,
link->ifname, ##__VA_ARGS__) | | #define log_full_link(level, link, fmt, ...) log_meta_object(level, __FILE_
_, __LINE__, __func__, "INTERFACE=", link->ifname, "%-*s: " fmt, IFNAMSIZ,
link->ifname, ##__VA_ARGS__) | |
| #define log_debug_link(link, ...) log_full_link(LOG_DEBUG, link, ##__
VA_ARGS__) | | #define log_debug_link(link, ...) log_full_link(LOG_DEBUG, link, ##__
VA_ARGS__) | |
| #define log_info_link(link, ...) log_full_link(LOG_INFO, link, ##__V
A_ARGS__) | | #define log_info_link(link, ...) log_full_link(LOG_INFO, link, ##__V
A_ARGS__) | |
| #define log_notice_link(link, ...) log_full_link(LOG_NOTICE, link, ##_
_VA_ARGS__) | | #define log_notice_link(link, ...) log_full_link(LOG_NOTICE, link, ##_
_VA_ARGS__) | |
| #define log_warning_link(link, ...) log_full_link(LOG_WARNING, link, ##
__VA_ARGS__) | | #define log_warning_link(link, ...) log_full_link(LOG_WARNING, link, ##
__VA_ARGS__) | |
| #define log_error_link(link, ...) log_full_link(LOG_ERR, link, ##__VA
_ARGS__) | | #define log_error_link(link, ...) log_full_link(LOG_ERR, link, ##__VA
_ARGS__) | |
| | | | |
| #define log_struct_link(level, link, ...) log_struct(level, "INTERFACE=%s",
link->ifname, __VA_ARGS__) | | #define log_struct_link(level, link, ...) log_struct(level, "INTERFACE=%s",
link->ifname, __VA_ARGS__) | |
| | | | |
|
| /* More macros which append INTERFACE= to the message */ | | | |
| | | | |
| #define log_full_netdev(level, netdev, fmt, ...) log_meta_object(level, __F | | | |
| ILE__, __LINE__, __func__, "INTERFACE=", netdev->ifname, "%-*s: " fmt, IFNA | | | |
| MSIZ, netdev->ifname, ##__VA_ARGS__) | | | |
| #define log_debug_netdev(netdev, ...) log_full_netdev(LOG_DEBUG, netd | | | |
| ev, ##__VA_ARGS__) | | | |
| #define log_info_netdev(netdev, ...) log_full_netdev(LOG_INFO, netde | | | |
| v, ##__VA_ARGS__) | | | |
| #define log_notice_netdev(netdev, ...) log_full_netdev(LOG_NOTICE, net | | | |
| dev, ##__VA_ARGS__) | | | |
| #define log_warning_netdev(netdev, ...) log_full_netdev(LOG_WARNING, ne | | | |
| tdev,## __VA_ARGS__) | | | |
| #define log_error_netdev(netdev, ...) log_full_netdev(LOG_ERR, netdev | | | |
| , ##__VA_ARGS__) | | | |
| | | | |
| #define log_struct_netdev(level, netdev, ...) log_struct(level, "INTERFACE= | | | |
| %s", netdev->ifname, __VA_ARGS__) | | | |
| | | | |
| #define NETDEV(netdev) "INTERFACE=%s", netdev->ifname | | | |
| #define ADDRESS_FMT_VAL(address) \ | | #define ADDRESS_FMT_VAL(address) \ | |
| (address).s_addr & 0xFF, \ | | (address).s_addr & 0xFF, \ | |
| ((address).s_addr >> 8) & 0xFF, \ | | ((address).s_addr >> 8) & 0xFF, \ | |
| ((address).s_addr >> 16) & 0xFF, \ | | ((address).s_addr >> 16) & 0xFF, \ | |
| (address).s_addr >> 24 | | (address).s_addr >> 24 | |
| | | | |
End of changes. 29 change blocks. |
| 274 lines changed or deleted | | 64 lines changed or added | |
|
| sd-bus.h | | sd-bus.h | |
| | | | |
| skipping to change at line 31 | | skipping to change at line 31 | |
| You should have received a copy of the GNU Lesser General Public License | | You should have received a copy of the GNU Lesser General Public License | |
| along with systemd; If not, see <http://www.gnu.org/licenses/>. | | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
| ***/ | | ***/ | |
| | | | |
| #include <inttypes.h> | | #include <inttypes.h> | |
| #include <sys/types.h> | | #include <sys/types.h> | |
| #include <sys/uio.h> | | #include <sys/uio.h> | |
| | | | |
| #include "sd-id128.h" | | #include "sd-id128.h" | |
| #include "sd-event.h" | | #include "sd-event.h" | |
|
| #include "sd-memfd.h" | | #include "memfd.h" | |
| #include "_sd-common.h" | | #include "_sd-common.h" | |
| | | | |
| _SD_BEGIN_DECLARATIONS; | | _SD_BEGIN_DECLARATIONS; | |
| | | | |
| /* Types */ | | /* Types */ | |
| | | | |
| typedef struct sd_bus sd_bus; | | typedef struct sd_bus sd_bus; | |
| typedef struct sd_bus_message sd_bus_message; | | typedef struct sd_bus_message sd_bus_message; | |
| typedef struct sd_bus_slot sd_bus_slot; | | typedef struct sd_bus_slot sd_bus_slot; | |
| typedef struct sd_bus_creds sd_bus_creds; | | typedef struct sd_bus_creds sd_bus_creds; | |
| | | | |
| skipping to change at line 151 | | skipping to change at line 151 | |
| int sd_bus_call(sd_bus *bus, sd_bus_message *m, uint64_t usec, sd_bus_error
*ret_error, sd_bus_message **reply); | | int sd_bus_call(sd_bus *bus, sd_bus_message *m, uint64_t usec, sd_bus_error
*ret_error, sd_bus_message **reply); | |
| int sd_bus_call_async(sd_bus *bus, sd_bus_slot **slot, sd_bus_message *m, s
d_bus_message_handler_t callback, void *userdata, uint64_t usec); | | int sd_bus_call_async(sd_bus *bus, sd_bus_slot **slot, sd_bus_message *m, s
d_bus_message_handler_t callback, void *userdata, uint64_t usec); | |
| | | | |
| int sd_bus_get_fd(sd_bus *bus); | | int sd_bus_get_fd(sd_bus *bus); | |
| int sd_bus_get_events(sd_bus *bus); | | int sd_bus_get_events(sd_bus *bus); | |
| int sd_bus_get_timeout(sd_bus *bus, uint64_t *timeout_usec); | | int sd_bus_get_timeout(sd_bus *bus, uint64_t *timeout_usec); | |
| int sd_bus_process(sd_bus *bus, sd_bus_message **r); | | int sd_bus_process(sd_bus *bus, sd_bus_message **r); | |
| int sd_bus_process_priority(sd_bus *bus, int64_t max_priority, sd_bus_messa
ge **r); | | int sd_bus_process_priority(sd_bus *bus, int64_t max_priority, sd_bus_messa
ge **r); | |
| int sd_bus_wait(sd_bus *bus, uint64_t timeout_usec); | | int sd_bus_wait(sd_bus *bus, uint64_t timeout_usec); | |
| int sd_bus_flush(sd_bus *bus); | | int sd_bus_flush(sd_bus *bus); | |
|
| sd_bus_message* sd_bus_get_current_message(sd_bus *bus); | | | |
| sd_bus_slot* sd_bus_get_current_slot(sd_bus *bus); | | sd_bus_slot* sd_bus_get_current_slot(sd_bus *bus); | |
|
| | | sd_bus_message* sd_bus_get_current_message(sd_bus *bus); | |
| | | sd_bus_message_handler_t sd_bus_get_current_handler(sd_bus *bus); | |
| | | void* sd_bus_get_current_userdata(sd_bus *bus); | |
| | | | |
| int sd_bus_attach_event(sd_bus *bus, sd_event *e, int priority); | | int sd_bus_attach_event(sd_bus *bus, sd_event *e, int priority); | |
| int sd_bus_detach_event(sd_bus *bus); | | int sd_bus_detach_event(sd_bus *bus); | |
| sd_event *sd_bus_get_event(sd_bus *bus); | | sd_event *sd_bus_get_event(sd_bus *bus); | |
| | | | |
| int sd_bus_add_filter(sd_bus *bus, sd_bus_slot **slot, sd_bus_message_handl
er_t callback, void *userdata); | | int sd_bus_add_filter(sd_bus *bus, sd_bus_slot **slot, sd_bus_message_handl
er_t callback, void *userdata); | |
| int sd_bus_add_match(sd_bus *bus, sd_bus_slot **slot, const char *match, sd
_bus_message_handler_t callback, void *userdata); | | int sd_bus_add_match(sd_bus *bus, sd_bus_slot **slot, const char *match, sd
_bus_message_handler_t callback, void *userdata); | |
| int sd_bus_add_object(sd_bus *bus, sd_bus_slot **slot, const char *path, sd
_bus_message_handler_t callback, void *userdata); | | int sd_bus_add_object(sd_bus *bus, sd_bus_slot **slot, const char *path, sd
_bus_message_handler_t callback, void *userdata); | |
| int sd_bus_add_fallback(sd_bus *bus, sd_bus_slot **slot, const char *prefix
, sd_bus_message_handler_t callback, void *userdata); | | int sd_bus_add_fallback(sd_bus *bus, sd_bus_slot **slot, const char *prefix
, sd_bus_message_handler_t callback, void *userdata); | |
| int sd_bus_add_object_vtable(sd_bus *bus, sd_bus_slot **slot, const char *p
ath, const char *interface, const sd_bus_vtable *vtable, void *userdata); | | int sd_bus_add_object_vtable(sd_bus *bus, sd_bus_slot **slot, const char *p
ath, const char *interface, const sd_bus_vtable *vtable, void *userdata); | |
| | | | |
| skipping to change at line 178 | | skipping to change at line 180 | |
| | | | |
| sd_bus_slot* sd_bus_slot_ref(sd_bus_slot *slot); | | sd_bus_slot* sd_bus_slot_ref(sd_bus_slot *slot); | |
| sd_bus_slot* sd_bus_slot_unref(sd_bus_slot *slot); | | sd_bus_slot* sd_bus_slot_unref(sd_bus_slot *slot); | |
| | | | |
| sd_bus* sd_bus_slot_get_bus(sd_bus_slot *slot); | | sd_bus* sd_bus_slot_get_bus(sd_bus_slot *slot); | |
| | | | |
| void *sd_bus_slot_get_userdata(sd_bus_slot *slot); | | void *sd_bus_slot_get_userdata(sd_bus_slot *slot); | |
| void *sd_bus_slot_set_userdata(sd_bus_slot *slot, void *userdata); | | void *sd_bus_slot_set_userdata(sd_bus_slot *slot, void *userdata); | |
| | | | |
| sd_bus_message* sd_bus_slot_get_current_message(sd_bus_slot *slot); | | sd_bus_message* sd_bus_slot_get_current_message(sd_bus_slot *slot); | |
|
| | | sd_bus_message_handler_t sd_bus_slot_get_current_handler(sd_bus_slot *bus); | |
| | | void *sd_bus_slot_get_current_userdata(sd_bus_slot *slot); | |
| | | | |
| /* Message object */ | | /* Message object */ | |
| | | | |
| int sd_bus_message_new_signal(sd_bus *bus, sd_bus_message **m, const char *
path, const char *interface, const char *member); | | int sd_bus_message_new_signal(sd_bus *bus, sd_bus_message **m, const char *
path, const char *interface, const char *member); | |
| int sd_bus_message_new_method_call(sd_bus *bus, sd_bus_message **m, const c
har *destination, const char *path, const char *interface, const char *memb
er); | | int sd_bus_message_new_method_call(sd_bus *bus, sd_bus_message **m, const c
har *destination, const char *path, const char *interface, const char *memb
er); | |
| int sd_bus_message_new_method_return(sd_bus_message *call, sd_bus_message *
*m); | | int sd_bus_message_new_method_return(sd_bus_message *call, sd_bus_message *
*m); | |
| int sd_bus_message_new_method_error(sd_bus_message *call, sd_bus_message **
m, const sd_bus_error *e); | | int sd_bus_message_new_method_error(sd_bus_message *call, sd_bus_message **
m, const sd_bus_error *e); | |
| int sd_bus_message_new_method_errorf(sd_bus_message *call, sd_bus_message *
*m, const char *name, const char *format, ...) _sd_printf_(4, 5); | | int sd_bus_message_new_method_errorf(sd_bus_message *call, sd_bus_message *
*m, const char *name, const char *format, ...) _sd_printf_(4, 5); | |
| int sd_bus_message_new_method_errno(sd_bus_message *call, sd_bus_message **
m, int error, const sd_bus_error *e); | | int sd_bus_message_new_method_errno(sd_bus_message *call, sd_bus_message **
m, int error, const sd_bus_error *e); | |
| int sd_bus_message_new_method_errnof(sd_bus_message *call, sd_bus_message *
*m, int error, const char *format, ...) _sd_printf_(4, 5); | | int sd_bus_message_new_method_errnof(sd_bus_message *call, sd_bus_message *
*m, int error, const char *format, ...) _sd_printf_(4, 5); | |
| | | | |
| skipping to change at line 229 | | skipping to change at line 233 | |
| int sd_bus_message_set_expect_reply(sd_bus_message *m, int b); | | int sd_bus_message_set_expect_reply(sd_bus_message *m, int b); | |
| int sd_bus_message_set_auto_start(sd_bus_message *m, int b); | | int sd_bus_message_set_auto_start(sd_bus_message *m, int b); | |
| int sd_bus_message_set_destination(sd_bus_message *m, const char *destinati
on); | | int sd_bus_message_set_destination(sd_bus_message *m, const char *destinati
on); | |
| int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority); | | int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority); | |
| | | | |
| int sd_bus_message_append(sd_bus_message *m, const char *types, ...); | | int sd_bus_message_append(sd_bus_message *m, const char *types, ...); | |
| int sd_bus_message_append_basic(sd_bus_message *m, char type, const void *p
); | | int sd_bus_message_append_basic(sd_bus_message *m, char type, const void *p
); | |
| int sd_bus_message_append_array(sd_bus_message *m, char type, const void *p
tr, size_t size); | | int sd_bus_message_append_array(sd_bus_message *m, char type, const void *p
tr, size_t size); | |
| int sd_bus_message_append_array_space(sd_bus_message *m, char type, size_t
size, void **ptr); | | int sd_bus_message_append_array_space(sd_bus_message *m, char type, size_t
size, void **ptr); | |
| int sd_bus_message_append_array_iovec(sd_bus_message *m, char type, const s
truct iovec *iov, unsigned n); | | int sd_bus_message_append_array_iovec(sd_bus_message *m, char type, const s
truct iovec *iov, unsigned n); | |
|
| int sd_bus_message_append_array_memfd(sd_bus_message *m, char type, sd_memf
d *memfd); | | int sd_bus_message_append_array_memfd(sd_bus_message *m, char type, int mem
fd); | |
| int sd_bus_message_append_string_space(sd_bus_message *m, size_t size, char
**s); | | int sd_bus_message_append_string_space(sd_bus_message *m, size_t size, char
**s); | |
| int sd_bus_message_append_string_iovec(sd_bus_message *m, const struct iove
c *iov, unsigned n); | | int sd_bus_message_append_string_iovec(sd_bus_message *m, const struct iove
c *iov, unsigned n); | |
|
| int sd_bus_message_append_string_memfd(sd_bus_message *m, sd_memfd* memfd); | | int sd_bus_message_append_string_memfd(sd_bus_message *m, int memfd); | |
| int sd_bus_message_append_strv(sd_bus_message *m, char **l); | | int sd_bus_message_append_strv(sd_bus_message *m, char **l); | |
| int sd_bus_message_open_container(sd_bus_message *m, char type, const char
*contents); | | int sd_bus_message_open_container(sd_bus_message *m, char type, const char
*contents); | |
| int sd_bus_message_close_container(sd_bus_message *m); | | int sd_bus_message_close_container(sd_bus_message *m); | |
| int sd_bus_message_copy(sd_bus_message *m, sd_bus_message *source, int all)
; | | int sd_bus_message_copy(sd_bus_message *m, sd_bus_message *source, int all)
; | |
| | | | |
| int sd_bus_message_read(sd_bus_message *m, const char *types, ...); | | int sd_bus_message_read(sd_bus_message *m, const char *types, ...); | |
| int sd_bus_message_read_basic(sd_bus_message *m, char type, void *p); | | int sd_bus_message_read_basic(sd_bus_message *m, char type, void *p); | |
| int sd_bus_message_read_array(sd_bus_message *m, char type, const void **pt
r, size_t *size); | | int sd_bus_message_read_array(sd_bus_message *m, char type, const void **pt
r, size_t *size); | |
| int sd_bus_message_read_strv(sd_bus_message *m, char ***l); /* free the res
ult! */ | | int sd_bus_message_read_strv(sd_bus_message *m, char ***l); /* free the res
ult! */ | |
| int sd_bus_message_skip(sd_bus_message *m, const char *types); | | int sd_bus_message_skip(sd_bus_message *m, const char *types); | |
| | | | |
| skipping to change at line 285 | | skipping to change at line 289 | |
| | | | |
| int sd_bus_emit_properties_changed_strv(sd_bus *bus, const char *path, cons
t char *interface, char **names); | | int sd_bus_emit_properties_changed_strv(sd_bus *bus, const char *path, cons
t char *interface, char **names); | |
| int sd_bus_emit_properties_changed(sd_bus *bus, const char *path, const cha
r *interface, const char *name, ...) _sd_sentinel_; | | int sd_bus_emit_properties_changed(sd_bus *bus, const char *path, const cha
r *interface, const char *name, ...) _sd_sentinel_; | |
| | | | |
| int sd_bus_emit_interfaces_added_strv(sd_bus *bus, const char *path, char *
*interfaces); | | int sd_bus_emit_interfaces_added_strv(sd_bus *bus, const char *path, char *
*interfaces); | |
| int sd_bus_emit_interfaces_added(sd_bus *bus, const char *path, const char
*interface, ...) _sd_sentinel_; | | int sd_bus_emit_interfaces_added(sd_bus *bus, const char *path, const char
*interface, ...) _sd_sentinel_; | |
| int sd_bus_emit_interfaces_removed_strv(sd_bus *bus, const char *path, char
**interfaces); | | int sd_bus_emit_interfaces_removed_strv(sd_bus *bus, const char *path, char
**interfaces); | |
| int sd_bus_emit_interfaces_removed(sd_bus *bus, const char *path, const cha
r *interface, ...) _sd_sentinel_; | | int sd_bus_emit_interfaces_removed(sd_bus *bus, const char *path, const cha
r *interface, ...) _sd_sentinel_; | |
| | | | |
| int sd_bus_query_sender_creds(sd_bus_message *call, uint64_t mask, sd_bus_c
reds **creds); | | int sd_bus_query_sender_creds(sd_bus_message *call, uint64_t mask, sd_bus_c
reds **creds); | |
|
| | | int sd_bus_query_sender_privilege(sd_bus_message *call, int capability); | |
| | | | |
| /* Credential handling */ | | /* Credential handling */ | |
| | | | |
| int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t creds
_mask); | | int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t creds
_mask); | |
| sd_bus_creds *sd_bus_creds_ref(sd_bus_creds *c); | | sd_bus_creds *sd_bus_creds_ref(sd_bus_creds *c); | |
| sd_bus_creds *sd_bus_creds_unref(sd_bus_creds *c); | | sd_bus_creds *sd_bus_creds_unref(sd_bus_creds *c); | |
| uint64_t sd_bus_creds_get_mask(const sd_bus_creds *c); | | uint64_t sd_bus_creds_get_mask(const sd_bus_creds *c); | |
| | | | |
| int sd_bus_creds_get_pid(sd_bus_creds *c, pid_t *pid); | | int sd_bus_creds_get_pid(sd_bus_creds *c, pid_t *pid); | |
| int sd_bus_creds_get_pid_starttime(sd_bus_creds *c, uint64_t *usec); | | int sd_bus_creds_get_pid_starttime(sd_bus_creds *c, uint64_t *usec); | |
| | | | |
End of changes. 7 change blocks. |
| 4 lines changed or deleted | | 9 lines changed or added | |
|
| sd-network.h | | sd-network.h | |
| | | | |
| skipping to change at line 29 | | skipping to change at line 29 | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| Lesser General Public License for more details. | | Lesser General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU Lesser General Public License | | You should have received a copy of the GNU Lesser General Public License | |
| along with systemd; If not, see <http://www.gnu.org/licenses/>. | | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
| ***/ | | ***/ | |
| | | | |
| #include <sys/types.h> | | #include <sys/types.h> | |
| #include <inttypes.h> | | #include <inttypes.h> | |
| | | | |
|
| #include "sd-dhcp-lease.h" | | | |
| | | | |
| #include "_sd-common.h" | | #include "_sd-common.h" | |
| | | | |
| /* | | /* | |
| * A few points: | | * A few points: | |
| * | | * | |
| * Instead of returning an empty string array or empty integer array, we | | * Instead of returning an empty string array or empty integer array, we | |
| * may return NULL. | | * may return NULL. | |
| * | | * | |
| * Free the data the library returns with libc free(). String arrays | | * Free the data the library returns with libc free(). String arrays | |
| * are NULL terminated, and you need to free the array itself in | | * are NULL terminated, and you need to free the array itself in | |
| | | | |
| skipping to change at line 54 | | skipping to change at line 52 | |
| * return 0 or positive. | | * return 0 or positive. | |
| * | | * | |
| * These functions access data in /run. This is a virtual file system; | | * These functions access data in /run. This is a virtual file system; | |
| * therefore, accesses are relatively cheap. | | * therefore, accesses are relatively cheap. | |
| * | | * | |
| * See sd-network(3) for more information. | | * See sd-network(3) for more information. | |
| */ | | */ | |
| | | | |
| _SD_BEGIN_DECLARATIONS; | | _SD_BEGIN_DECLARATIONS; | |
| | | | |
|
| /* Get state from ifindex. | | /* Get overall operational state | |
| * Possible states: failed, configuring, configured | | * Possible states: down, up, dormant, carrier, degraded, routable | |
| * Possible return codes: | | * Possible return codes: | |
|
| * -ENODATA: networkd is not aware of the link | | * -ENODATA: networkd is not aware of any links | |
| * -EUNATCH: networkd is not managing this link | | | |
| * -EBUSY: udev is still processing the link, networkd does not yet know | | | |
| if it will manage it | | | |
| */ | | */ | |
|
| int sd_network_get_link_state(unsigned index, char **state); | | int sd_network_get_operational_state(char **state); | |
| | | | |
|
| /* Get operatinal state from ifindex. | | /* Get DNS entries for all links. These are string representations of | |
| * Possible states: unknown, dormant, carrier, degraded, routable | | * IP addresses */ | |
| | | int sd_network_get_dns(char ***dns); | |
| | | | |
| | | /* Get NTP entries for all links. These are domain names or string | |
| | | * reperesentations of IP addresses */ | |
| | | int sd_network_get_ntp(char ***ntp); | |
| | | | |
| | | /* Get the search/routing domains for all links. */ | |
| | | int sd_network_get_domains(char ***domains); | |
| | | | |
| | | /* Get setup state from ifindex. | |
| | | * Possible states: | |
| | | * pending: udev is still processing the link, we don't yet know if we wi | |
| | | ll manage it | |
| | | * failed: networkd failed to manage the link | |
| | | * configuring: in the process of retrieving configuration or configuring | |
| | | the link | |
| | | * configured: link configured successfully | |
| | | * unmanaged: networkd is not handling the link | |
| | | * linger: the link is gone, but has not yet been dropped by networkd | |
| * Possible return codes: | | * Possible return codes: | |
| * -ENODATA: networkd is not aware of the link | | * -ENODATA: networkd is not aware of the link | |
| */ | | */ | |
|
| int sd_network_get_link_operational_state(unsigned index, char **state); | | int sd_network_link_get_setup_state(int ifindex, char **state); | |
| | | | |
|
| /* Get overall opeartional state | | /* Get operatinal state from ifindex. | |
| * Possible states: unknown, dormant, carrier, degraded, routable | | * Possible states: | |
| | | * off: the device is powered down | |
| | | * no-carrier: the device is powered up, but it does not yet have a carri | |
| | | er | |
| | | * dormant: the device has a carrier, but is not yet ready for normal tra | |
| | | ffic | |
| | | * carrier: the link has a carrier | |
| | | * degraded: the link has carrier and addresses valid on the local link c | |
| | | onfigured | |
| | | * routable: the link has carrier and routable address configured | |
| * Possible return codes: | | * Possible return codes: | |
|
| * -ENODATA: networkd is not aware of any links | | * -ENODATA: networkd is not aware of the link | |
| */ | | */ | |
|
| int sd_network_get_operational_state(char **state); | | int sd_network_link_get_operational_state(int ifindex, char **state); | |
| | | | |
| /* Returns true if link exists and is loopback, and false otherwise */ | | | |
| int sd_network_link_is_loopback(unsigned index); | | | |
| | | | |
| /* Get DHCPv4 lease from ifindex. */ | | | |
| int sd_network_get_dhcp_lease(unsigned index, sd_dhcp_lease **ret); | | | |
| | | | |
| /* Returns true if link is configured to respect DNS entries received by DH | | | |
| CP */ | | | |
| int sd_network_dhcp_use_dns(unsigned index); | | | |
| | | | |
|
| /* Returns true if link is configured to respect NTP entries received by DH | | /* Get DNS entries for a given link. These are string representations of | |
| CP */ | | * IP addresses */ | |
| int sd_network_dhcp_use_ntp(unsigned index); | | int sd_network_link_get_dns(int ifindex, char ***addr); | |
| | | | |
| | | /* Get NTP entries for a given link. These are domain names or string | |
| | | * reperesentations of IP addresses */ | |
| | | int sd_network_link_get_ntp(int ifindex, char ***addr); | |
| | | | |
|
| /* Get IPv4 DNS entries statically configured for the link */ | | /* Indicates whether or not LLMNR should be enabled for the link | |
| int sd_network_get_dns(unsigned index, struct in_addr **addr, size_t *addr_ | | * Possible levels of support: yes, no, resolve | |
| size); | | * Possible return codes: | |
| | | * -ENODATA: networkd is not aware of the link*/ | |
| /* Get IPv4 NTP entries statically configured for the link */ | | int sd_network_link_get_llmnr(int ifindex, char **llmnr); | |
| int sd_network_get_ntp(unsigned index, struct in_addr **addr, size_t *addr_ | | | |
| size); | | | |
| | | | |
| /* Get IPv6 DNS entries statically configured for the link */ | | | |
| int sd_network_get_dns6(unsigned index, struct in6_addr **addr, size_t *add | | | |
| r_size); | | | |
| | | | |
|
| /* Get IPv6 NTP entries statically configured for the link */ | | /* Get the DNS domain names for a given link. */ | |
| int sd_network_get_ntp6(unsigned index, struct in6_addr **addr, size_t *add | | int sd_network_link_get_domains(int ifindex, char ***domains); | |
| r_size); | | | |
| | | | |
|
| /* Get all network interfaces' indices, and store them in *indices. Returns | | /* Returns whether or not domains that don't match any link should be resol | |
| * the number of indices. If indices is NULL, only returns the number of in | | ved | |
| dices. */ | | * on this link. 1 for yes, 0 for no and negative value for error */ | |
| int sd_network_get_ifindices(unsigned **indices); | | int sd_network_link_get_wildcard_domain(int ifindex); | |
| | | | |
| /* Monitor object */ | | /* Monitor object */ | |
| typedef struct sd_network_monitor sd_network_monitor; | | typedef struct sd_network_monitor sd_network_monitor; | |
| | | | |
| /* Create a new monitor. Category must be NULL, "links" or "leases". */ | | /* Create a new monitor. Category must be NULL, "links" or "leases". */ | |
|
| int sd_network_monitor_new(const char *category, sd_network_monitor **ret); | | int sd_network_monitor_new(sd_network_monitor **ret, const char *category); | |
| | | | |
| /* Destroys the passed monitor. Returns NULL. */ | | /* Destroys the passed monitor. Returns NULL. */ | |
| sd_network_monitor* sd_network_monitor_unref(sd_network_monitor *m); | | sd_network_monitor* sd_network_monitor_unref(sd_network_monitor *m); | |
| | | | |
| /* Flushes the monitor */ | | /* Flushes the monitor */ | |
| int sd_network_monitor_flush(sd_network_monitor *m); | | int sd_network_monitor_flush(sd_network_monitor *m); | |
| | | | |
| /* Get FD from monitor */ | | /* Get FD from monitor */ | |
| int sd_network_monitor_get_fd(sd_network_monitor *m); | | int sd_network_monitor_get_fd(sd_network_monitor *m); | |
| | | | |
| | | | |
End of changes. 14 change blocks. |
| 48 lines changed or deleted | | 58 lines changed or added | |
|
| sd-rtnl.h | | sd-rtnl.h | |
| | | | |
| skipping to change at line 70 | | skipping to change at line 70 | |
| int sd_rtnl_flush(sd_rtnl *nl); | | int sd_rtnl_flush(sd_rtnl *nl); | |
| | | | |
| int sd_rtnl_add_match(sd_rtnl *nl, uint16_t match, sd_rtnl_message_handler_
t c, void *userdata); | | int sd_rtnl_add_match(sd_rtnl *nl, uint16_t match, sd_rtnl_message_handler_
t c, void *userdata); | |
| int sd_rtnl_remove_match(sd_rtnl *nl, uint16_t match, sd_rtnl_message_handl
er_t c, void *userdata); | | int sd_rtnl_remove_match(sd_rtnl *nl, uint16_t match, sd_rtnl_message_handl
er_t c, void *userdata); | |
| | | | |
| int sd_rtnl_attach_event(sd_rtnl *nl, sd_event *e, int priority); | | int sd_rtnl_attach_event(sd_rtnl *nl, sd_event *e, int priority); | |
| int sd_rtnl_detach_event(sd_rtnl *nl); | | int sd_rtnl_detach_event(sd_rtnl *nl); | |
| | | | |
| /* messages */ | | /* messages */ | |
| int sd_rtnl_message_new_link(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_t
msg_type, int index); | | int sd_rtnl_message_new_link(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_t
msg_type, int index); | |
|
| int sd_rtnl_message_new_addr_update(sd_rtnl *rtnl, sd_rtnl_message **ret, i
nt index, unsigned char family); | | int sd_rtnl_message_new_addr_update(sd_rtnl *rtnl, sd_rtnl_message **ret, i
nt index, int family); | |
| int sd_rtnl_message_new_addr(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_t
msg_type, int index, | | int sd_rtnl_message_new_addr(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_t
msg_type, int index, | |
|
| unsigned char family); | | int family); | |
| int sd_rtnl_message_new_route(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_
t nlmsg_type, | | int sd_rtnl_message_new_route(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_
t nlmsg_type, | |
|
| unsigned char rtm_family); | | int rtm_family, unsigned char rtm_protocol); | |
| | | | |
| sd_rtnl_message *sd_rtnl_message_ref(sd_rtnl_message *m); | | sd_rtnl_message *sd_rtnl_message_ref(sd_rtnl_message *m); | |
| sd_rtnl_message *sd_rtnl_message_unref(sd_rtnl_message *m); | | sd_rtnl_message *sd_rtnl_message_unref(sd_rtnl_message *m); | |
| | | | |
| int sd_rtnl_message_request_dump(sd_rtnl_message *m, int dump); | | int sd_rtnl_message_request_dump(sd_rtnl_message *m, int dump); | |
| int sd_rtnl_message_get_errno(sd_rtnl_message *m); | | int sd_rtnl_message_get_errno(sd_rtnl_message *m); | |
| int sd_rtnl_message_get_type(sd_rtnl_message *m, uint16_t *type); | | int sd_rtnl_message_get_type(sd_rtnl_message *m, uint16_t *type); | |
| int sd_rtnl_message_is_broadcast(sd_rtnl_message *m); | | int sd_rtnl_message_is_broadcast(sd_rtnl_message *m); | |
| | | | |
| int sd_rtnl_message_addr_set_prefixlen(sd_rtnl_message *m, unsigned char pr
efixlen); | | int sd_rtnl_message_addr_set_prefixlen(sd_rtnl_message *m, unsigned char pr
efixlen); | |
| int sd_rtnl_message_addr_set_scope(sd_rtnl_message *m, unsigned char scope)
; | | int sd_rtnl_message_addr_set_scope(sd_rtnl_message *m, unsigned char scope)
; | |
| int sd_rtnl_message_addr_set_flags(sd_rtnl_message *m, unsigned char flags)
; | | int sd_rtnl_message_addr_set_flags(sd_rtnl_message *m, unsigned char flags)
; | |
|
| int sd_rtnl_message_addr_get_family(sd_rtnl_message *m, unsigned char *fami
ly); | | int sd_rtnl_message_addr_get_family(sd_rtnl_message *m, int *family); | |
| int sd_rtnl_message_addr_get_prefixlen(sd_rtnl_message *m, unsigned char *p
refixlen); | | int sd_rtnl_message_addr_get_prefixlen(sd_rtnl_message *m, unsigned char *p
refixlen); | |
| int sd_rtnl_message_addr_get_scope(sd_rtnl_message *m, unsigned char *scope
); | | int sd_rtnl_message_addr_get_scope(sd_rtnl_message *m, unsigned char *scope
); | |
| int sd_rtnl_message_addr_get_flags(sd_rtnl_message *m, unsigned char *flags
); | | int sd_rtnl_message_addr_get_flags(sd_rtnl_message *m, unsigned char *flags
); | |
| int sd_rtnl_message_addr_get_ifindex(sd_rtnl_message *m, int *ifindex); | | int sd_rtnl_message_addr_get_ifindex(sd_rtnl_message *m, int *ifindex); | |
| | | | |
| int sd_rtnl_message_link_set_flags(sd_rtnl_message *m, unsigned flags, unsi
gned change); | | int sd_rtnl_message_link_set_flags(sd_rtnl_message *m, unsigned flags, unsi
gned change); | |
| int sd_rtnl_message_link_set_type(sd_rtnl_message *m, unsigned type); | | int sd_rtnl_message_link_set_type(sd_rtnl_message *m, unsigned type); | |
| int sd_rtnl_message_link_get_ifindex(sd_rtnl_message *m, int *ifindex); | | int sd_rtnl_message_link_get_ifindex(sd_rtnl_message *m, int *ifindex); | |
| int sd_rtnl_message_link_get_flags(sd_rtnl_message *m, unsigned *flags); | | int sd_rtnl_message_link_get_flags(sd_rtnl_message *m, unsigned *flags); | |
|
| | | int sd_rtnl_message_link_get_type(sd_rtnl_message *m, unsigned *type); | |
| | | | |
| int sd_rtnl_message_route_set_dst_prefixlen(sd_rtnl_message *m, unsigned ch
ar prefixlen); | | int sd_rtnl_message_route_set_dst_prefixlen(sd_rtnl_message *m, unsigned ch
ar prefixlen); | |
| int sd_rtnl_message_route_set_scope(sd_rtnl_message *m, unsigned char scope
); | | int sd_rtnl_message_route_set_scope(sd_rtnl_message *m, unsigned char scope
); | |
| | | | |
| int sd_rtnl_message_append_string(sd_rtnl_message *m, unsigned short type,
const char *data); | | int sd_rtnl_message_append_string(sd_rtnl_message *m, unsigned short type,
const char *data); | |
| int sd_rtnl_message_append_u8(sd_rtnl_message *m, unsigned short type, uint
8_t data); | | int sd_rtnl_message_append_u8(sd_rtnl_message *m, unsigned short type, uint
8_t data); | |
| int sd_rtnl_message_append_u16(sd_rtnl_message *m, unsigned short type, uin
t16_t data); | | int sd_rtnl_message_append_u16(sd_rtnl_message *m, unsigned short type, uin
t16_t data); | |
| int sd_rtnl_message_append_u32(sd_rtnl_message *m, unsigned short type, uin
t32_t data); | | int sd_rtnl_message_append_u32(sd_rtnl_message *m, unsigned short type, uin
t32_t data); | |
| int sd_rtnl_message_append_in_addr(sd_rtnl_message *m, unsigned short type,
const struct in_addr *data); | | int sd_rtnl_message_append_in_addr(sd_rtnl_message *m, unsigned short type,
const struct in_addr *data); | |
| int sd_rtnl_message_append_in6_addr(sd_rtnl_message *m, unsigned short type
, const struct in6_addr *data); | | int sd_rtnl_message_append_in6_addr(sd_rtnl_message *m, unsigned short type
, const struct in6_addr *data); | |
| int sd_rtnl_message_append_ether_addr(sd_rtnl_message *m, unsigned short ty
pe, const struct ether_addr *data); | | int sd_rtnl_message_append_ether_addr(sd_rtnl_message *m, unsigned short ty
pe, const struct ether_addr *data); | |
| int sd_rtnl_message_append_cache_info(sd_rtnl_message *m, unsigned short ty
pe, const struct ifa_cacheinfo *info); | | int sd_rtnl_message_append_cache_info(sd_rtnl_message *m, unsigned short ty
pe, const struct ifa_cacheinfo *info); | |
| | | | |
| int sd_rtnl_message_open_container(sd_rtnl_message *m, unsigned short type)
; | | int sd_rtnl_message_open_container(sd_rtnl_message *m, unsigned short type)
; | |
| int sd_rtnl_message_open_container_union(sd_rtnl_message *m, unsigned short
type, const char *key); | | int sd_rtnl_message_open_container_union(sd_rtnl_message *m, unsigned short
type, const char *key); | |
| int sd_rtnl_message_close_container(sd_rtnl_message *m); | | int sd_rtnl_message_close_container(sd_rtnl_message *m); | |
| | | | |
|
| int sd_rtnl_message_read_string(sd_rtnl_message *m, unsigned short type, ch
ar **data); | | int sd_rtnl_message_read_string(sd_rtnl_message *m, unsigned short type, co
nst char **data); | |
| int sd_rtnl_message_read_u8(sd_rtnl_message *m, unsigned short type, uint8_
t *data); | | int sd_rtnl_message_read_u8(sd_rtnl_message *m, unsigned short type, uint8_
t *data); | |
| int sd_rtnl_message_read_u16(sd_rtnl_message *m, unsigned short type, uint1
6_t *data); | | int sd_rtnl_message_read_u16(sd_rtnl_message *m, unsigned short type, uint1
6_t *data); | |
| int sd_rtnl_message_read_u32(sd_rtnl_message *m, unsigned short type, uint3
2_t *data); | | int sd_rtnl_message_read_u32(sd_rtnl_message *m, unsigned short type, uint3
2_t *data); | |
| int sd_rtnl_message_read_ether_addr(sd_rtnl_message *m, unsigned short type
, struct ether_addr *data); | | int sd_rtnl_message_read_ether_addr(sd_rtnl_message *m, unsigned short type
, struct ether_addr *data); | |
| int sd_rtnl_message_read_cache_info(sd_rtnl_message *m, unsigned short type
, struct ifa_cacheinfo *info); | | int sd_rtnl_message_read_cache_info(sd_rtnl_message *m, unsigned short type
, struct ifa_cacheinfo *info); | |
| int sd_rtnl_message_read_in_addr(sd_rtnl_message *m, unsigned short type, s
truct in_addr *data); | | int sd_rtnl_message_read_in_addr(sd_rtnl_message *m, unsigned short type, s
truct in_addr *data); | |
| int sd_rtnl_message_read_in6_addr(sd_rtnl_message *m, unsigned short type,
struct in6_addr *data); | | int sd_rtnl_message_read_in6_addr(sd_rtnl_message *m, unsigned short type,
struct in6_addr *data); | |
| int sd_rtnl_message_enter_container(sd_rtnl_message *m, unsigned short type
); | | int sd_rtnl_message_enter_container(sd_rtnl_message *m, unsigned short type
); | |
| int sd_rtnl_message_exit_container(sd_rtnl_message *m); | | int sd_rtnl_message_exit_container(sd_rtnl_message *m); | |
| | | | |
| | | | |
End of changes. 6 change blocks. |
| 5 lines changed or deleted | | 6 lines changed or added | |
|
| time-util.h | | time-util.h | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 40 | |
| #define NSEC_FMT "%" PRIu64 | | #define NSEC_FMT "%" PRIu64 | |
| #define USEC_FMT "%" PRIu64 | | #define USEC_FMT "%" PRIu64 | |
| | | | |
| #include "macro.h" | | #include "macro.h" | |
| | | | |
| typedef struct dual_timestamp { | | typedef struct dual_timestamp { | |
| usec_t realtime; | | usec_t realtime; | |
| usec_t monotonic; | | usec_t monotonic; | |
| } dual_timestamp; | | } dual_timestamp; | |
| | | | |
|
| #define MSEC_PER_SEC ((usec_t) 1000ULL) | | #define USEC_INFINITY ((usec_t) -1) | |
| | | #define NSEC_INFINITY ((nsec_t) -1) | |
| | | | |
| | | #define MSEC_PER_SEC 1000ULL | |
| #define USEC_PER_SEC ((usec_t) 1000000ULL) | | #define USEC_PER_SEC ((usec_t) 1000000ULL) | |
| #define USEC_PER_MSEC ((usec_t) 1000ULL) | | #define USEC_PER_MSEC ((usec_t) 1000ULL) | |
|
| #define NSEC_PER_SEC ((usec_t) 1000000000ULL) | | #define NSEC_PER_SEC ((nsec_t) 1000000000ULL) | |
| #define NSEC_PER_MSEC ((usec_t) 1000000ULL) | | #define NSEC_PER_MSEC ((nsec_t) 1000000ULL) | |
| #define NSEC_PER_USEC ((usec_t) 1000ULL) | | #define NSEC_PER_USEC ((nsec_t) 1000ULL) | |
| | | | |
| #define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC)) | | #define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC)) | |
|
| #define NSEC_PER_MINUTE ((usec_t) (60ULL*NSEC_PER_SEC)) | | #define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC)) | |
| #define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE)) | | #define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE)) | |
|
| #define NSEC_PER_HOUR ((usec_t) (60ULL*NSEC_PER_MINUTE)) | | #define NSEC_PER_HOUR ((nsec_t) (60ULL*NSEC_PER_MINUTE)) | |
| #define USEC_PER_DAY ((usec_t) (24ULL*USEC_PER_HOUR)) | | #define USEC_PER_DAY ((usec_t) (24ULL*USEC_PER_HOUR)) | |
|
| #define NSEC_PER_DAY ((usec_t) (24ULL*NSEC_PER_HOUR)) | | #define NSEC_PER_DAY ((nsec_t) (24ULL*NSEC_PER_HOUR)) | |
| #define USEC_PER_WEEK ((usec_t) (7ULL*USEC_PER_DAY)) | | #define USEC_PER_WEEK ((usec_t) (7ULL*USEC_PER_DAY)) | |
|
| #define NSEC_PER_WEEK ((usec_t) (7ULL*NSEC_PER_DAY)) | | #define NSEC_PER_WEEK ((nsec_t) (7ULL*NSEC_PER_DAY)) | |
| #define USEC_PER_MONTH ((usec_t) (2629800ULL*USEC_PER_SEC)) | | #define USEC_PER_MONTH ((usec_t) (2629800ULL*USEC_PER_SEC)) | |
|
| #define NSEC_PER_MONTH ((usec_t) (2629800ULL*NSEC_PER_SEC)) | | #define NSEC_PER_MONTH ((nsec_t) (2629800ULL*NSEC_PER_SEC)) | |
| #define USEC_PER_YEAR ((usec_t) (31557600ULL*USEC_PER_SEC)) | | #define USEC_PER_YEAR ((usec_t) (31557600ULL*USEC_PER_SEC)) | |
|
| #define NSEC_PER_YEAR ((usec_t) (31557600ULL*NSEC_PER_SEC)) | | #define NSEC_PER_YEAR ((nsec_t) (31557600ULL*NSEC_PER_SEC)) | |
| | | | |
| #define FORMAT_TIMESTAMP_MAX ((4*4+1)+11+9+4+1) /* weekdays can be unicode
*/ | | #define FORMAT_TIMESTAMP_MAX ((4*4+1)+11+9+4+1) /* weekdays can be unicode
*/ | |
| #define FORMAT_TIMESTAMP_WIDTH 28 /* when outputting, assume this width */ | | #define FORMAT_TIMESTAMP_WIDTH 28 /* when outputting, assume this width */ | |
| #define FORMAT_TIMESTAMP_RELATIVE_MAX 256 | | #define FORMAT_TIMESTAMP_RELATIVE_MAX 256 | |
| #define FORMAT_TIMESPAN_MAX 64 | | #define FORMAT_TIMESPAN_MAX 64 | |
| | | | |
| #define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0, 0 }) | | #define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0, 0 }) | |
| | | | |
| usec_t now(clockid_t clock); | | usec_t now(clockid_t clock); | |
| | | | |
| dual_timestamp* dual_timestamp_get(dual_timestamp *ts); | | dual_timestamp* dual_timestamp_get(dual_timestamp *ts); | |
| dual_timestamp* dual_timestamp_from_realtime(dual_timestamp *ts, usec_t u); | | dual_timestamp* dual_timestamp_from_realtime(dual_timestamp *ts, usec_t u); | |
| dual_timestamp* dual_timestamp_from_monotonic(dual_timestamp *ts, usec_t u)
; | | dual_timestamp* dual_timestamp_from_monotonic(dual_timestamp *ts, usec_t u)
; | |
| | | | |
| static inline bool dual_timestamp_is_set(dual_timestamp *ts) { | | static inline bool dual_timestamp_is_set(dual_timestamp *ts) { | |
|
| return ((ts->realtime > 0 && ts->realtime != (usec_t) -1) || | | return ((ts->realtime > 0 && ts->realtime != USEC_INFINITY) || | |
| (ts->monotonic > 0 && ts->monotonic != (usec_t) -1)); | | (ts->monotonic > 0 && ts->monotonic != USEC_INFINITY)); | |
| } | | } | |
| | | | |
| usec_t timespec_load(const struct timespec *ts) _pure_; | | usec_t timespec_load(const struct timespec *ts) _pure_; | |
| struct timespec *timespec_store(struct timespec *ts, usec_t u); | | struct timespec *timespec_store(struct timespec *ts, usec_t u); | |
| | | | |
| usec_t timeval_load(const struct timeval *tv) _pure_; | | usec_t timeval_load(const struct timeval *tv) _pure_; | |
| struct timeval *timeval_store(struct timeval *tv, usec_t u); | | struct timeval *timeval_store(struct timeval *tv, usec_t u); | |
| | | | |
| char *format_timestamp(char *buf, size_t l, usec_t t); | | char *format_timestamp(char *buf, size_t l, usec_t t); | |
| char *format_timestamp_us(char *buf, size_t l, usec_t t); | | char *format_timestamp_us(char *buf, size_t l, usec_t t); | |
| | | | |
| skipping to change at line 98 | | skipping to change at line 101 | |
| | | | |
| void dual_timestamp_serialize(FILE *f, const char *name, dual_timestamp *t)
; | | void dual_timestamp_serialize(FILE *f, const char *name, dual_timestamp *t)
; | |
| void dual_timestamp_deserialize(const char *value, dual_timestamp *t); | | void dual_timestamp_deserialize(const char *value, dual_timestamp *t); | |
| | | | |
| int parse_timestamp(const char *t, usec_t *usec); | | int parse_timestamp(const char *t, usec_t *usec); | |
| | | | |
| int parse_sec(const char *t, usec_t *usec); | | int parse_sec(const char *t, usec_t *usec); | |
| int parse_nsec(const char *t, nsec_t *nsec); | | int parse_nsec(const char *t, nsec_t *nsec); | |
| | | | |
| bool ntp_synced(void); | | bool ntp_synced(void); | |
|
| | | | |
| | | int get_timezones(char ***l); | |
| | | bool timezone_is_valid(const char *name); | |
| | | | |
| | | clockid_t clock_boottime_or_monotonic(void); | |
| | | | |
End of changes. 10 change blocks. |
| 12 lines changed or deleted | | 15 lines changed or added | |
|
| util.h | | util.h | |
| | | | |
| skipping to change at line 72 | | skipping to change at line 72 | |
| #if SIZEOF_GID_T == 4 | | #if SIZEOF_GID_T == 4 | |
| # define GID_FMT "%" PRIu32 | | # define GID_FMT "%" PRIu32 | |
| #elif SIZEOF_GID_T == 2 | | #elif SIZEOF_GID_T == 2 | |
| # define GID_FMT "%" PRIu16 | | # define GID_FMT "%" PRIu16 | |
| #else | | #else | |
| # error Unknown gid_t size | | # error Unknown gid_t size | |
| #endif | | #endif | |
| | | | |
| #if SIZEOF_TIME_T == 8 | | #if SIZEOF_TIME_T == 8 | |
| # define PRI_TIME PRIu64 | | # define PRI_TIME PRIu64 | |
|
| #elif SIZEOF_GID_T == 4 | | #elif SIZEOF_TIME_T == 4 | |
| # define PRI_TIME PRIu32 | | # define PRI_TIME PRIu32 | |
| #else | | #else | |
| # error Unknown time_t size | | # error Unknown time_t size | |
| #endif | | #endif | |
| | | | |
| #if SIZEOF_RLIM_T == 8 | | #if SIZEOF_RLIM_T == 8 | |
| # define RLIM_FMT "%" PRIu64 | | # define RLIM_FMT "%" PRIu64 | |
| #elif SIZEOF_RLIM_T == 4 | | #elif SIZEOF_RLIM_T == 4 | |
| # define RLIM_FMT "%" PRIu32 | | # define RLIM_FMT "%" PRIu32 | |
| #else | | #else | |
| | | | |
| skipping to change at line 97 | | skipping to change at line 97 | |
| #include "missing.h" | | #include "missing.h" | |
| #include "time-util.h" | | #include "time-util.h" | |
| | | | |
| /* What is interpreted as whitespace? */ | | /* What is interpreted as whitespace? */ | |
| #define WHITESPACE " \t\n\r" | | #define WHITESPACE " \t\n\r" | |
| #define NEWLINE "\n\r" | | #define NEWLINE "\n\r" | |
| #define QUOTES "\"\'" | | #define QUOTES "\"\'" | |
| #define COMMENTS "#;" | | #define COMMENTS "#;" | |
| #define GLOB_CHARS "*?[" | | #define GLOB_CHARS "*?[" | |
| | | | |
|
| | | /* What characters are special in the shell? */ | |
| | | /* must be escaped outside and inside double-quotes */ | |
| | | #define SHELL_NEED_ESCAPE "\"\\`$" | |
| | | /* can be escaped or double-quoted */ | |
| | | #define SHELL_NEED_QUOTES SHELL_NEED_ESCAPE GLOB_CHARS "'()<>|&;" | |
| | | | |
| #define FORMAT_BYTES_MAX 8 | | #define FORMAT_BYTES_MAX 8 | |
| | | | |
| #define ANSI_HIGHLIGHT_ON "\x1B[1;39m" | | #define ANSI_HIGHLIGHT_ON "\x1B[1;39m" | |
| #define ANSI_RED_ON "\x1B[31m" | | #define ANSI_RED_ON "\x1B[31m" | |
| #define ANSI_HIGHLIGHT_RED_ON "\x1B[1;31m" | | #define ANSI_HIGHLIGHT_RED_ON "\x1B[1;31m" | |
| #define ANSI_GREEN_ON "\x1B[32m" | | #define ANSI_GREEN_ON "\x1B[32m" | |
| #define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m" | | #define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m" | |
| #define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m" | | #define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m" | |
| #define ANSI_HIGHLIGHT_BLUE_ON "\x1B[1;34m" | | #define ANSI_HIGHLIGHT_BLUE_ON "\x1B[1;34m" | |
| #define ANSI_HIGHLIGHT_OFF "\x1B[0m" | | #define ANSI_HIGHLIGHT_OFF "\x1B[0m" | |
| | | | |
| skipping to change at line 125 | | skipping to change at line 131 | |
| #define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0) | | #define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0) | |
| | | | |
| bool streq_ptr(const char *a, const char *b) _pure_; | | bool streq_ptr(const char *a, const char *b) _pure_; | |
| | | | |
| #define new(t, n) ((t*) malloc_multiply(sizeof(t), (n))) | | #define new(t, n) ((t*) malloc_multiply(sizeof(t), (n))) | |
| | | | |
| #define new0(t, n) ((t*) calloc((n), sizeof(t))) | | #define new0(t, n) ((t*) calloc((n), sizeof(t))) | |
| | | | |
| #define newa(t, n) ((t*) alloca(sizeof(t)*(n))) | | #define newa(t, n) ((t*) alloca(sizeof(t)*(n))) | |
| | | | |
|
| | | #define newa0(t, n) ((t*) alloca0(sizeof(t)*(n))) | |
| | | | |
| #define newdup(t, p, n) ((t*) memdup_multiply(p, sizeof(t), (n))) | | #define newdup(t, p, n) ((t*) memdup_multiply(p, sizeof(t), (n))) | |
| | | | |
| #define malloc0(n) (calloc((n), 1)) | | #define malloc0(n) (calloc((n), 1)) | |
| | | | |
| static inline const char* yes_no(bool b) { | | static inline const char* yes_no(bool b) { | |
| return b ? "yes" : "no"; | | return b ? "yes" : "no"; | |
| } | | } | |
| | | | |
| static inline const char* true_false(bool b) { | | static inline const char* true_false(bool b) { | |
| return b ? "true" : "false"; | | return b ? "true" : "false"; | |
| | | | |
| skipping to change at line 167 | | skipping to change at line 175 | |
| } | | } | |
| | | | |
| static inline const char *startswith_no_case(const char *s, const char *pre
fix) { | | static inline const char *startswith_no_case(const char *s, const char *pre
fix) { | |
| if (strncasecmp(s, prefix, strlen(prefix)) == 0) | | if (strncasecmp(s, prefix, strlen(prefix)) == 0) | |
| return s + strlen(prefix); | | return s + strlen(prefix); | |
| return NULL; | | return NULL; | |
| } | | } | |
| | | | |
| char *endswith(const char *s, const char *postfix) _pure_; | | char *endswith(const char *s, const char *postfix) _pure_; | |
| | | | |
|
| bool first_word(const char *s, const char *word) _pure_; | | char *first_word(const char *s, const char *word) _pure_; | |
| | | | |
| int close_nointr(int fd); | | int close_nointr(int fd); | |
| int safe_close(int fd); | | int safe_close(int fd); | |
| void safe_close_pair(int p[]); | | void safe_close_pair(int p[]); | |
| | | | |
| void close_many(const int fds[], unsigned n_fd); | | void close_many(const int fds[], unsigned n_fd); | |
| | | | |
| int parse_size(const char *t, off_t base, off_t *size); | | int parse_size(const char *t, off_t base, off_t *size); | |
| | | | |
| int parse_boolean(const char *v) _pure_; | | int parse_boolean(const char *v) _pure_; | |
| | | | |
| skipping to change at line 190 | | skipping to change at line 198 | |
| #define parse_gid(s, ret_uid) parse_uid(s, ret_uid) | | #define parse_gid(s, ret_uid) parse_uid(s, ret_uid) | |
| | | | |
| int safe_atou(const char *s, unsigned *ret_u); | | int safe_atou(const char *s, unsigned *ret_u); | |
| int safe_atoi(const char *s, int *ret_i); | | int safe_atoi(const char *s, int *ret_i); | |
| | | | |
| int safe_atollu(const char *s, unsigned long long *ret_u); | | int safe_atollu(const char *s, unsigned long long *ret_u); | |
| int safe_atolli(const char *s, long long int *ret_i); | | int safe_atolli(const char *s, long long int *ret_i); | |
| | | | |
| int safe_atod(const char *s, double *ret_d); | | int safe_atod(const char *s, double *ret_d); | |
| | | | |
|
| | | int safe_atou8(const char *s, uint8_t *ret); | |
| | | | |
| #if __WORDSIZE == 32 | | #if __WORDSIZE == 32 | |
| static inline int safe_atolu(const char *s, unsigned long *ret_u) { | | static inline int safe_atolu(const char *s, unsigned long *ret_u) { | |
| assert_cc(sizeof(unsigned long) == sizeof(unsigned)); | | assert_cc(sizeof(unsigned long) == sizeof(unsigned)); | |
| return safe_atou(s, (unsigned*) ret_u); | | return safe_atou(s, (unsigned*) ret_u); | |
| } | | } | |
| static inline int safe_atoli(const char *s, long int *ret_u) { | | static inline int safe_atoli(const char *s, long int *ret_u) { | |
| assert_cc(sizeof(long int) == sizeof(int)); | | assert_cc(sizeof(long int) == sizeof(int)); | |
| return safe_atoi(s, (int*) ret_u); | | return safe_atoi(s, (int*) ret_u); | |
| } | | } | |
| #else | | #else | |
| | | | |
| skipping to change at line 230 | | skipping to change at line 240 | |
| static inline int safe_atou64(const char *s, uint64_t *ret_u) { | | static inline int safe_atou64(const char *s, uint64_t *ret_u) { | |
| assert_cc(sizeof(uint64_t) == sizeof(unsigned long long)); | | assert_cc(sizeof(uint64_t) == sizeof(unsigned long long)); | |
| return safe_atollu(s, (unsigned long long*) ret_u); | | return safe_atollu(s, (unsigned long long*) ret_u); | |
| } | | } | |
| | | | |
| static inline int safe_atoi64(const char *s, int64_t *ret_i) { | | static inline int safe_atoi64(const char *s, int64_t *ret_i) { | |
| assert_cc(sizeof(int64_t) == sizeof(long long int)); | | assert_cc(sizeof(int64_t) == sizeof(long long int)); | |
| return safe_atolli(s, (long long int*) ret_i); | | return safe_atolli(s, (long long int*) ret_i); | |
| } | | } | |
| | | | |
|
| char *split(const char *c, size_t *l, const char *separator, bool quoted, c
har **state); | | const char* split(const char **state, size_t *l, const char *separator, boo
l quoted); | |
| | | | |
| #define FOREACH_WORD(word, length, s, state) \ | | #define FOREACH_WORD(word, length, s, state) \ | |
| _FOREACH_WORD(word, length, s, WHITESPACE, false, state) | | _FOREACH_WORD(word, length, s, WHITESPACE, false, state) | |
| | | | |
| #define FOREACH_WORD_SEPARATOR(word, length, s, separator, state) \ | | #define FOREACH_WORD_SEPARATOR(word, length, s, separator, state) \ | |
| _FOREACH_WORD(word, length, s, separator, false, state) | | _FOREACH_WORD(word, length, s, separator, false, state) | |
| | | | |
| #define FOREACH_WORD_QUOTED(word, length, s, state) \ | | #define FOREACH_WORD_QUOTED(word, length, s, state) \ | |
| _FOREACH_WORD(word, length, s, WHITESPACE, true, state) | | _FOREACH_WORD(word, length, s, WHITESPACE, true, state) | |
| | | | |
|
| #define FOREACH_WORD_SEPARATOR_QUOTED(word, length, s, separator, state) | | | |
| \ | | | |
| _FOREACH_WORD(word, length, s, separator, true, state) | | | |
| | | | |
| #define _FOREACH_WORD(word, length, s, separator, quoted, state) \ | | #define _FOREACH_WORD(word, length, s, separator, quoted, state) \ | |
|
| for ((state) = NULL, (word) = split((s), &(length), (separator), (q
uoted), &(state)); (word); (word) = split((s), &(length), (separator), (quo
ted), &(state))) | | for ((state) = (s), (word) = split(&(state), &(length), (separator)
, (quoted)); (word); (word) = split(&(state), &(length), (separator), (quot
ed))) | |
| | | | |
| pid_t get_parent_of_pid(pid_t pid, pid_t *ppid); | | pid_t get_parent_of_pid(pid_t pid, pid_t *ppid); | |
| int get_starttime_of_pid(pid_t pid, unsigned long long *st); | | int get_starttime_of_pid(pid_t pid, unsigned long long *st); | |
| | | | |
| char *strappend(const char *s, const char *suffix); | | char *strappend(const char *s, const char *suffix); | |
| char *strnappend(const char *s, const char *suffix, size_t length); | | char *strnappend(const char *s, const char *suffix, size_t length); | |
| | | | |
| char *replace_env(const char *format, char **env); | | char *replace_env(const char *format, char **env); | |
| char **replace_env_argv(char **argv, char **env); | | char **replace_env_argv(char **argv, char **env); | |
| | | | |
| | | | |
| skipping to change at line 386 | | skipping to change at line 393 | |
| int fd_nonblock(int fd, bool nonblock); | | int fd_nonblock(int fd, bool nonblock); | |
| int fd_cloexec(int fd, bool cloexec); | | int fd_cloexec(int fd, bool cloexec); | |
| | | | |
| int close_all_fds(const int except[], unsigned n_except); | | int close_all_fds(const int except[], unsigned n_except); | |
| | | | |
| bool fstype_is_network(const char *fstype); | | bool fstype_is_network(const char *fstype); | |
| | | | |
| int chvt(int vt); | | int chvt(int vt); | |
| | | | |
| int read_one_char(FILE *f, char *ret, usec_t timeout, bool *need_nl); | | int read_one_char(FILE *f, char *ret, usec_t timeout, bool *need_nl); | |
|
| int ask(char *ret, const char *replies, const char *text, ...) _printf_(3, | | int ask_char(char *ret, const char *replies, const char *text, ...) _printf | |
| 4); | | _(3, 4); | |
| | | int ask_string(char **ret, const char *text, ...) _printf_(2, 3); | |
| | | | |
| int reset_terminal_fd(int fd, bool switch_to_text); | | int reset_terminal_fd(int fd, bool switch_to_text); | |
| int reset_terminal(const char *name); | | int reset_terminal(const char *name); | |
| | | | |
| int open_terminal(const char *name, int mode); | | int open_terminal(const char *name, int mode); | |
| int acquire_terminal(const char *name, bool fail, bool force, bool ignore_t
iocstty_eperm, usec_t timeout); | | int acquire_terminal(const char *name, bool fail, bool force, bool ignore_t
iocstty_eperm, usec_t timeout); | |
| int release_terminal(void); | | int release_terminal(void); | |
| | | | |
| int flush_fd(int fd); | | int flush_fd(int fd); | |
| | | | |
| | | | |
| skipping to change at line 496 | | skipping to change at line 504 | |
| char *unquote(const char *s, const char *quotes); | | char *unquote(const char *s, const char *quotes); | |
| char *normalize_env_assignment(const char *s); | | char *normalize_env_assignment(const char *s); | |
| | | | |
| int wait_for_terminate(pid_t pid, siginfo_t *status); | | int wait_for_terminate(pid_t pid, siginfo_t *status); | |
| int wait_for_terminate_and_warn(const char *name, pid_t pid); | | int wait_for_terminate_and_warn(const char *name, pid_t pid); | |
| | | | |
| noreturn void freeze(void); | | noreturn void freeze(void); | |
| | | | |
| bool null_or_empty(struct stat *st) _pure_; | | bool null_or_empty(struct stat *st) _pure_; | |
| int null_or_empty_path(const char *fn); | | int null_or_empty_path(const char *fn); | |
|
| | | int null_or_empty_fd(int fd); | |
| | | | |
| DIR *xopendirat(int dirfd, const char *name, int flags); | | DIR *xopendirat(int dirfd, const char *name, int flags); | |
| | | | |
| char *fstab_node_to_udev_node(const char *p); | | char *fstab_node_to_udev_node(const char *p); | |
| | | | |
| char *resolve_dev_console(char **active); | | char *resolve_dev_console(char **active); | |
| bool tty_is_vc(const char *tty); | | bool tty_is_vc(const char *tty); | |
| bool tty_is_vc_resolve(const char *tty); | | bool tty_is_vc_resolve(const char *tty); | |
| bool tty_is_console(const char *tty) _pure_; | | bool tty_is_console(const char *tty) _pure_; | |
| int vtnr_from_tty(const char *tty); | | int vtnr_from_tty(const char *tty); | |
| | | | |
| skipping to change at line 696 | | skipping to change at line 705 | |
| _alloc_(2, 3) static inline void *memdup_multiply(const void *p, size_t a,
size_t b) { | | _alloc_(2, 3) static inline void *memdup_multiply(const void *p, size_t a,
size_t b) { | |
| if (_unlikely_(b != 0 && a > ((size_t) -1) / b)) | | if (_unlikely_(b != 0 && a > ((size_t) -1) / b)) | |
| return NULL; | | return NULL; | |
| | | | |
| return memdup(p, a * b); | | return memdup(p, a * b); | |
| } | | } | |
| | | | |
| bool filename_is_safe(const char *p) _pure_; | | bool filename_is_safe(const char *p) _pure_; | |
| bool path_is_safe(const char *p) _pure_; | | bool path_is_safe(const char *p) _pure_; | |
| bool string_is_safe(const char *p) _pure_; | | bool string_is_safe(const char *p) _pure_; | |
|
| bool string_has_cc(const char *p) _pure_; | | bool string_has_cc(const char *p, const char *ok) _pure_; | |
| | | | |
| /** | | /** | |
| * Check if a string contains any glob patterns. | | * Check if a string contains any glob patterns. | |
| */ | | */ | |
| _pure_ static inline bool string_is_glob(const char *p) { | | _pure_ static inline bool string_is_glob(const char *p) { | |
| return !!strpbrk(p, GLOB_CHARS); | | return !!strpbrk(p, GLOB_CHARS); | |
| } | | } | |
| | | | |
| void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t si
ze, | | void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t si
ze, | |
| int (*compar) (const void *, const void *, void *), | | int (*compar) (const void *, const void *, void *), | |
| | | | |
| skipping to change at line 838 | | skipping to change at line 847 | |
| int unlink_noerrno(const char *path); | | int unlink_noerrno(const char *path); | |
| | | | |
| #define alloca0(n) \ | | #define alloca0(n) \ | |
| ({ \ | | ({ \ | |
| char *_new_; \ | | char *_new_; \ | |
| size_t _len_ = n; \ | | size_t _len_ = n; \ | |
| _new_ = alloca(_len_); \ | | _new_ = alloca(_len_); \ | |
| (void *) memset(_new_, 0, _len_); \ | | (void *) memset(_new_, 0, _len_); \ | |
| }) | | }) | |
| | | | |
|
| #define strappenda(a, b) \ | | #define strappenda(a, ...) \ | |
| ({ \ | | ({ \ | |
| const char *_a_ = (a), *_b_ = (b); \ | | int _len = strlen(a); \ | |
| char *_c_; \ | | unsigned _i; \ | |
| size_t _x_, _y_; \ | | char *_d_, *_p_; \ | |
| _x_ = strlen(_a_); \ | | const char *_appendees_[] = { __VA_ARGS__ }; \ | |
| _y_ = strlen(_b_); \ | | for (_i = 0; _i < ELEMENTSOF(_appendees_); _i++) \ | |
| _c_ = alloca(_x_ + _y_ + 1); \ | | _len += strlen(_appendees_[_i]); \ | |
| strcpy(stpcpy(_c_, _a_), _b_); \ | | _d_ = alloca(_len + 1); \ | |
| _c_; \ | | _p_ = stpcpy(_d_, a); \ | |
| }) | | for (_i = 0; _i < ELEMENTSOF(_appendees_); _i++) \ | |
| | | _p_ = stpcpy(_p_, _appendees_[_i]); \ | |
| #define strappenda3(a, b, c) \ | | _d_; \ | |
| ({ \ | | | |
| const char *_a_ = (a), *_b_ = (b), *_c_ = (c); \ | | | |
| char *_d_; \ | | | |
| size_t _x_, _y_, _z_; \ | | | |
| _x_ = strlen(_a_); \ | | | |
| _y_ = strlen(_b_); \ | | | |
| _z_ = strlen(_c_); \ | | | |
| _d_ = alloca(_x_ + _y_ + _z_ + 1); \ | | | |
| strcpy(stpcpy(stpcpy(_d_, _a_), _b_), _c_); \ | | | |
| _d_; \ | | | |
| }) | | }) | |
| | | | |
| #define procfs_file_alloca(pid, field) \ | | #define procfs_file_alloca(pid, field) \ | |
| ({ \ | | ({ \ | |
| pid_t _pid_ = (pid); \ | | pid_t _pid_ = (pid); \ | |
| const char *_r_; \ | | const char *_r_; \ | |
| if (_pid_ == 0) { \ | | if (_pid_ == 0) { \ | |
| _r_ = ("/proc/self/" field); \ | | _r_ = ("/proc/self/" field); \ | |
| } else { \ | | } else { \ | |
| _r_ = alloca(strlen("/proc/") + DECIMAL_STR_MAX(pid
_t) + 1 + sizeof(field)); \ | | _r_ = alloca(strlen("/proc/") + DECIMAL_STR_MAX(pid
_t) + 1 + sizeof(field)); \ | |
| | | | |
| skipping to change at line 967 | | skipping to change at line 966 | |
| int umount_recursive(const char *target, int flags); | | int umount_recursive(const char *target, int flags); | |
| | | | |
| int bind_remount_recursive(const char *prefix, bool ro); | | int bind_remount_recursive(const char *prefix, bool ro); | |
| | | | |
| int fflush_and_check(FILE *f); | | int fflush_and_check(FILE *f); | |
| | | | |
| char *tempfn_xxxxxx(const char *p); | | char *tempfn_xxxxxx(const char *p); | |
| char *tempfn_random(const char *p); | | char *tempfn_random(const char *p); | |
| | | | |
| bool is_localhost(const char *hostname); | | bool is_localhost(const char *hostname); | |
|
| | | | |
| | | int take_password_lock(const char *root); | |
| | | | |
| | | int is_symlink(const char *path); | |
| | | | |
| | | int unquote_first_word(const char **p, char **ret); | |
| | | int unquote_many_words(const char **p, ...) _sentinel_; | |
| | | | |
End of changes. 13 change blocks. |
| 34 lines changed or deleted | | 32 lines changed or added | |
|