bus-internal.h   bus-internal.h 
skipping to change at line 35 skipping to change at line 35
#include <sys/un.h> #include <sys/un.h>
#include <netinet/in.h> #include <netinet/in.h>
#include "hashmap.h" #include "hashmap.h"
#include "prioq.h" #include "prioq.h"
#include "list.h" #include "list.h"
#include "util.h" #include "util.h"
#include "sd-bus.h" #include "sd-bus.h"
#include "bus-error.h" #include "bus-error.h"
#include "bus-match.h"
struct reply_callback { struct reply_callback {
sd_message_handler_t callback; sd_bus_message_handler_t callback;
void *userdata; void *userdata;
usec_t timeout; usec_t timeout;
uint64_t serial; uint64_t serial;
unsigned prioq_idx; unsigned prioq_idx;
}; };
struct filter_callback { struct filter_callback {
sd_message_handler_t callback; sd_bus_message_handler_t callback;
void *userdata; void *userdata;
unsigned last_iteration;
LIST_FIELDS(struct filter_callback, callbacks); LIST_FIELDS(struct filter_callback, callbacks);
}; };
struct object_callback { struct object_callback {
sd_message_handler_t callback; sd_bus_message_handler_t callback;
void *userdata; void *userdata;
char *path; char *path;
bool is_fallback; bool is_fallback;
unsigned last_iteration;
}; };
enum bus_state { enum bus_state {
BUS_UNSET, BUS_UNSET,
BUS_OPENING, BUS_OPENING,
BUS_AUTHENTICATING, BUS_AUTHENTICATING,
BUS_HELLO, BUS_HELLO,
BUS_RUNNING BUS_RUNNING
}; };
enum bus_auth {
_BUS_AUTH_INVALID,
BUS_AUTH_EXTERNAL,
BUS_AUTH_ANONYMOUS
};
struct sd_bus { struct sd_bus {
unsigned n_ref; unsigned n_ref;
enum bus_state state; enum bus_state state;
int fd; int input_fd, output_fd;
int message_version; int message_version;
bool negotiate_fds:1; bool negotiate_fds:1;
bool can_fds:1; bool can_fds:1;
bool bus_client:1; bool bus_client:1;
bool ucred_valid:1; bool ucred_valid:1;
bool is_server:1;
bool anonymous_auth:1;
bool prefer_readv:1;
bool prefer_writev:1;
bool processing:1;
bool match_callbacks_modified:1;
bool filter_callbacks_modified:1;
bool object_callbacks_modified:1;
void *rbuffer; void *rbuffer;
size_t rbuffer_size; size_t rbuffer_size;
sd_bus_message **rqueue; sd_bus_message **rqueue;
unsigned rqueue_size; unsigned rqueue_size;
sd_bus_message **wqueue; sd_bus_message **wqueue;
unsigned wqueue_size; unsigned wqueue_size;
size_t windex; size_t windex;
uint64_t serial; uint64_t serial;
char *unique_name; char *unique_name;
struct bus_match_node match_callbacks;
Prioq *reply_callbacks_prioq; Prioq *reply_callbacks_prioq;
Hashmap *reply_callbacks; Hashmap *reply_callbacks;
LIST_HEAD(struct filter_callback, filter_callbacks); LIST_HEAD(struct filter_callback, filter_callbacks);
Hashmap *object_callbacks; Hashmap *object_callbacks;
union { union {
struct sockaddr sa; struct sockaddr sa;
struct sockaddr_un un; struct sockaddr_un un;
struct sockaddr_in in; struct sockaddr_in in;
struct sockaddr_in6 in6; struct sockaddr_in6 in6;
} sockaddr; } sockaddr;
socklen_t sockaddr_size; socklen_t sockaddr_size;
sd_id128_t peer; sd_id128_t server_id;
char *address; char *address;
unsigned address_index; unsigned address_index;
int last_connect_error; int last_connect_error;
enum bus_auth auth;
size_t auth_rbegin;
struct iovec auth_iovec[3]; struct iovec auth_iovec[3];
unsigned auth_index; unsigned auth_index;
size_t auth_size; char *auth_buffer;
char *auth_uid;
usec_t auth_timeout; usec_t auth_timeout;
struct ucred ucred; struct ucred ucred;
char label[NAME_MAX]; char label[NAME_MAX];
int *fds; int *fds;
unsigned n_fds; unsigned n_fds;
char *exec_path; char *exec_path;
char **exec_argv; char **exec_argv;
uint64_t hello_serial;
unsigned iteration_counter;
}; };
static inline void bus_unrefp(sd_bus **b) { static inline void bus_unrefp(sd_bus **b) {
sd_bus_unref(*b); sd_bus_unref(*b);
} }
#define _cleanup_bus_unref_ __attribute__((cleanup(bus_unrefp))) #define _cleanup_bus_unref_ __attribute__((cleanup(bus_unrefp)))
#define _cleanup_bus_error_free_ __attribute__((cleanup(sd_bus_error_free)) ) #define _cleanup_bus_error_free_ __attribute__((cleanup(sd_bus_error_free)) )
#define BUS_DEFAULT_TIMEOUT ((usec_t) (25 * USEC_PER_SEC)) #define BUS_DEFAULT_TIMEOUT ((usec_t) (25 * USEC_PER_SEC))
skipping to change at line 158 skipping to change at line 182
#define BUS_FDS_MAX 1024 #define BUS_FDS_MAX 1024
#define BUS_EXEC_ARGV_MAX 256 #define BUS_EXEC_ARGV_MAX 256
bool object_path_is_valid(const char *p); bool object_path_is_valid(const char *p);
bool interface_name_is_valid(const char *p); bool interface_name_is_valid(const char *p);
bool service_name_is_valid(const char *p); bool service_name_is_valid(const char *p);
bool member_name_is_valid(const char *p); bool member_name_is_valid(const char *p);
bool namespace_complex_pattern(const char *pattern, const char *value);
bool path_complex_pattern(const char *pattern, const char *value);
bool namespace_simple_pattern(const char *pattern, const char *value);
bool path_simple_pattern(const char *pattern, const char *value);
int bus_message_type_from_string(const char *s, uint8_t *u);
#define error_name_is_valid interface_name_is_valid #define error_name_is_valid interface_name_is_valid
int bus_ensure_running(sd_bus *bus); int bus_ensure_running(sd_bus *bus);
int bus_start_running(sd_bus *bus); int bus_start_running(sd_bus *bus);
int bus_next_address(sd_bus *bus); int bus_next_address(sd_bus *bus);
 End of changes. 15 change blocks. 
7 lines changed or deleted 39 lines changed or added


 bus-message.h   bus-message.h 
skipping to change at line 145 skipping to change at line 145
int bus_message_read_strv_extend(sd_bus_message *m, char ***l); int bus_message_read_strv_extend(sd_bus_message *m, char ***l);
int bus_message_from_malloc( int bus_message_from_malloc(
void *buffer, void *buffer,
size_t length, size_t length,
int *fds, int *fds,
unsigned n_fds, unsigned n_fds,
const struct ucred *ucred, const struct ucred *ucred,
const char *label, const char *label,
sd_bus_message **ret); sd_bus_message **ret);
const char* bus_message_get_arg(sd_bus_message *m, unsigned i);
int bus_message_append_ap(sd_bus_message *m, const char *types, va_list ap)
;
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 bus-socket.h   bus-socket.h 
skipping to change at line 35 skipping to change at line 35
int bus_socket_connect(sd_bus *b); int bus_socket_connect(sd_bus *b);
int bus_socket_exec(sd_bus *b); int bus_socket_exec(sd_bus *b);
int bus_socket_take_fd(sd_bus *b); int bus_socket_take_fd(sd_bus *b);
int bus_socket_write_message(sd_bus *bus, sd_bus_message *m, size_t *idx); int bus_socket_write_message(sd_bus *bus, sd_bus_message *m, size_t *idx);
int bus_socket_read_message(sd_bus *bus, sd_bus_message **m); int bus_socket_read_message(sd_bus *bus, sd_bus_message **m);
int bus_socket_process_opening(sd_bus *b); int bus_socket_process_opening(sd_bus *b);
int bus_socket_process_authenticating(sd_bus *b); int bus_socket_process_authenticating(sd_bus *b);
bool bus_socket_auth_needs_write(sd_bus *b);
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 catalog.h   catalog.h 
skipping to change at line 27 skipping to change at line 27
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 <stdbool.h> #include <stdbool.h>
#include "sd-id128.h" #include "sd-id128.h"
#include "hashmap.h"
#include "strbuf.h"
int catalog_update(void); int catalog_import_file(Hashmap *h, struct strbuf *sb, const char *path);
int catalog_get(sd_id128_t id, char **data); unsigned catalog_hash_func(const void *p);
int catalog_list(FILE *f, bool oneline); int catalog_compare_func(const void *a, const void *b);
int catalog_list_items(FILE *f, bool oneline, char **items); int catalog_update(const char* database, const char* root, const char* cons
t* dirs);
int catalog_get(const char* database, sd_id128_t id, char **data);
int catalog_list(FILE *f, const char* database, bool oneline);
int catalog_list_items(FILE *f, const char* database, bool oneline, char **
items);
extern const char * const catalog_file_dirs[];
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 conf-files.h   conf-files.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 "macro.h" #include "macro.h"
int conf_files_list(char ***strv, const char *suffix, const char *root, con st char *dir, ...); int conf_files_list(char ***strv, const char *suffix, const char *root, con st char *dir, ...);
int conf_files_list_strv(char ***strv, const char *suffix, const char *root , const char **dirs); int conf_files_list_strv(char ***strv, const char *suffix, const char *root , const char* const* dirs);
int conf_files_list_nulstr(char ***strv, const char *suffix, const char *ro ot, const char *dirs); int conf_files_list_nulstr(char ***strv, const char *suffix, const char *ro ot, const char *dirs);
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 conf-parser.h   conf-parser.h 
skipping to change at line 104 skipping to change at line 104
int config_parse_uint64(const char *filename, unsigned line, const char *se ction, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_uint64(const char *filename, unsigned line, const char *se ction, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_double(const char *filename, unsigned line, const char *se ction, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_double(const char *filename, unsigned line, const char *se ction, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_bytes_size(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, v oid *userdata); int config_parse_bytes_size(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, v oid *userdata);
int config_parse_bytes_off(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, vo id *userdata); int config_parse_bytes_off(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, vo id *userdata);
int config_parse_bool(const char *filename, unsigned line, const char *sect ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u serdata); int config_parse_bool(const char *filename, unsigned line, const char *sect ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u serdata);
int config_parse_tristate(const char *filename, unsigned line, const char * section, const char *lvalue, int ltype, const char *rvalue, void *data, voi d *userdata); int config_parse_tristate(const char *filename, unsigned line, const char * section, const char *lvalue, int ltype, const char *rvalue, void *data, voi d *userdata);
int config_parse_string(const char *filename, unsigned line, const char *se ction, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_string(const char *filename, unsigned line, const char *se ction, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_path(const char *filename, unsigned line, const char *sect ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u serdata); int config_parse_path(const char *filename, unsigned line, const char *sect ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u serdata);
int config_parse_strv(const char *filename, unsigned line, const char *sect ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u serdata); int config_parse_strv(const char *filename, unsigned line, const char *sect ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u serdata);
int config_parse_path_strv(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, vo id *userdata); int config_parse_path_strv(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, vo id *userdata);
int config_parse_usec(const char *filename, unsigned line, const char *sect ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u serdata); int config_parse_sec(const char *filename, unsigned line, const char *secti on, const char *lvalue, int ltype, const char *rvalue, void *data, void *us erdata);
int config_parse_nsec(const char *filename, unsigned line, const char *sect ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u serdata); int config_parse_nsec(const char *filename, unsigned line, const char *sect ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u serdata);
int config_parse_mode(const char *filename, unsigned line, const char *sect ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u serdata); int config_parse_mode(const char *filename, unsigned line, const char *sect ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u serdata);
int config_parse_facility(const char *filename, unsigned line, const char * section, const char *lvalue, int ltype, const char *rvalue, void *data, voi d *userdata); int config_parse_facility(const char *filename, unsigned line, const char * section, const char *lvalue, int ltype, const char *rvalue, void *data, voi d *userdata);
int config_parse_level(const char *filename, unsigned line, const char *sec tion, const char *lvalue, int ltype, const char *rvalue, void *data, void * userdata); int config_parse_level(const char *filename, unsigned line, const char *sec tion, const char *lvalue, int ltype, const char *rvalue, void *data, void * userdata);
int config_parse_set_status(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, v oid *userdata); int config_parse_set_status(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, v oid *userdata);
#define DEFINE_CONFIG_PARSE_ENUM(function,name,type,msg) \ #define DEFINE_CONFIG_PARSE_ENUM(function,name,type,msg) \
int function( \ int function( \
const char *filename, \ const char *filename, \
unsigned line, \ unsigned line, \
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 config.h   config.h 
skipping to change at line 247 skipping to change at line 247
/* 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 200" #define PACKAGE_STRING "systemd 201"
/* 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 "200" #define PACKAGE_VERSION "201"
/* 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
skipping to change at line 307 skipping to change at line 307
/* 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 "200" #define VERSION "201"
/* 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. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dbus-unit.h   dbus-unit.h 
skipping to change at line 91 skipping to change at line 91
" <property name=\"Before\" type=\"as\" access=\"read\"/>\n" \ " <property name=\"Before\" type=\"as\" access=\"read\"/>\n" \
" <property name=\"After\" type=\"as\" access=\"read\"/>\n" \ " <property name=\"After\" type=\"as\" access=\"read\"/>\n" \
" <property name=\"OnFailure\" type=\"as\" access=\"read\"/>\n" \ " <property name=\"OnFailure\" type=\"as\" access=\"read\"/>\n" \
" <property name=\"Triggers\" type=\"as\" access=\"read\"/>\n" \ " <property name=\"Triggers\" type=\"as\" access=\"read\"/>\n" \
" <property name=\"TriggeredBy\" type=\"as\" access=\"read\"/>\n" \ " <property name=\"TriggeredBy\" type=\"as\" access=\"read\"/>\n" \
" <property name=\"PropagatesReloadTo\" type=\"as\" access=\"read\ "/>\n" \ " <property name=\"PropagatesReloadTo\" type=\"as\" access=\"read\ "/>\n" \
" <property name=\"ReloadPropagatedFrom\" type=\"as\" access=\"rea d\"/>\n" \ " <property name=\"ReloadPropagatedFrom\" type=\"as\" access=\"rea d\"/>\n" \
" <property name=\"RequiresMountsFor\" type=\"as\" access=\"read\" />\n" \ " <property name=\"RequiresMountsFor\" type=\"as\" access=\"read\" />\n" \
" <property name=\"Description\" type=\"s\" access=\"read\"/>\n" \ " <property name=\"Description\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"SourcePath\" type=\"s\" access=\"read\"/>\n" \ " <property name=\"SourcePath\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"DropInPaths\" type=\"as\" access=\"read\"/>\n" \
" <property name=\"Documentation\" type=\"as\" access=\"read\"/>\n " \ " <property name=\"Documentation\" type=\"as\" access=\"read\"/>\n " \
" <property name=\"LoadState\" type=\"s\" access=\"read\"/>\n" \ " <property name=\"LoadState\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"ActiveState\" type=\"s\" access=\"read\"/>\n" \ " <property name=\"ActiveState\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"SubState\" type=\"s\" access=\"read\"/>\n" \ " <property name=\"SubState\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"FragmentPath\" type=\"s\" access=\"read\"/>\n" \ " <property name=\"FragmentPath\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"UnitFileState\" type=\"s\" access=\"read\"/>\n" \ " <property name=\"UnitFileState\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"InactiveExitTimestamp\" type=\"t\" access=\"rea d\"/>\n" \ " <property name=\"InactiveExitTimestamp\" type=\"t\" access=\"rea d\"/>\n" \
" <property name=\"InactiveExitTimestampMonotonic\" type=\"t\" acc ess=\"read\"/>\n" \ " <property name=\"InactiveExitTimestampMonotonic\" type=\"t\" acc ess=\"read\"/>\n" \
" <property name=\"ActiveEnterTimestamp\" type=\"t\" access=\"read \"/>\n" \ " <property name=\"ActiveEnterTimestamp\" type=\"t\" access=\"read \"/>\n" \
" <property name=\"ActiveEnterTimestampMonotonic\" type=\"t\" acce ss=\"read\"/>\n" \ " <property name=\"ActiveEnterTimestampMonotonic\" type=\"t\" acce ss=\"read\"/>\n" \
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 fileio-label.h   fileio-label.h 
skipping to change at line 28 skipping to change at line 28
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 <stdio.h> #include <stdio.h>
#include "fileio.h" #include "fileio.h"
int write_one_line_file_atomic_label(const char *fn, const char *line); int write_string_file_atomic_label(const char *fn, const char *line);
int write_env_file_label(const char *fname, char **l); int write_env_file_label(const char *fname, char **l);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 fileio.h   fileio.h 
skipping to change at line 26 skipping to change at line 26
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 <stddef.h> #include <stddef.h>
#include "macro.h" #include "macro.h"
int write_one_line_file(const char *fn, const char *line); int write_string_file(const char *fn, const char *line);
int write_one_line_file_atomic(const char *fn, const char *line); int write_string_file_atomic(const char *fn, const char *line);
int read_one_line_file(const char *fn, char **line); int read_one_line_file(const char *fn, char **line);
int read_full_file(const char *fn, char **contents, size_t *size); int read_full_file(const char *fn, char **contents, size_t *size);
int parse_env_file(const char *fname, const char *separator, ...) _sentinel _; int parse_env_file(const char *fname, const char *separator, ...) _sentinel _;
int load_env_file(const char *fname, char ***l); int load_env_file(const char *fname, const char *separator, char ***l);
int write_env_file(const char *fname, char **l); int write_env_file(const char *fname, char **l);
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 journal-internal.h   journal-internal.h 
skipping to change at line 129 skipping to change at line 129
char *unique_field; char *unique_field;
JournalFile *unique_file; JournalFile *unique_file;
uint64_t unique_offset; uint64_t unique_offset;
bool on_network; bool on_network;
size_t data_threshold; size_t data_threshold;
Set *errors; Set *errors;
usec_t last_process_usec;
}; };
char *journal_make_match_string(sd_journal *j); char *journal_make_match_string(sd_journal *j);
void journal_print_header(sd_journal *j); void journal_print_header(sd_journal *j);
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 load-dropin.h   load-dropin.h 
skipping to change at line 28 skipping to change at line 28
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 "unit.h" #include "unit.h"
/* Read service data supplementary drop-in directories */ /* Read service data supplementary drop-in directories */
char **unit_find_dropin_paths(Unit *u);
int unit_load_dropin(Unit *u); int unit_load_dropin(Unit *u);
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 macro.h   macro.h 
skipping to change at line 70 skipping to change at line 70
#define ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0])) #define ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0]))
/* /*
* container_of - cast a member of a structure out to the containing struct ure * container_of - cast a member of a structure out to the containing struct ure
* @ptr: the pointer to the member. * @ptr: the pointer to the member.
* @type: the type of the container struct this is embedded in. * @type: the type of the container struct this is embedded in.
* @member: the name of the member within the struct. * @member: the name of the member within the struct.
* *
*/ */
#define container_of(ptr, type, member) ({ \ #define container_of(ptr, type, member) \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \ __extension__ ({ \
(type *)( (char *)__mptr - offsetof(type,member) );}) const typeof( ((type *)0)->member ) *__mptr = (ptr)
; \
(type *)( (char *)__mptr - offsetof(type,member) );
\
})
#ifndef MAX #undef MAX
#define MAX(a,b) \ #define MAX(a,b) \
__extension__ ({ \ __extension__ ({ \
typeof(a) _a = (a); \ typeof(a) _a = (a); \
typeof(b) _b = (b); \ typeof(b) _b = (b); \
_a > _b ? _a : _b; \ _a > _b ? _a : _b; \
}) })
#endif
#define MAX3(a,b,c) \ #define MAX3(x,y,z) \
MAX(MAX(a,b),c) __extension__ ({ \
typeof(x) _c = MAX(x,y); \
MAX(_c, z); \
})
#ifndef MIN #undef MIN
#define MIN(a,b) \ #define MIN(a,b) \
__extension__ ({ \ __extension__ ({ \
typeof(a) _a = (a); \ typeof(a) _a = (a); \
typeof(b) _b = (b); \ typeof(b) _b = (b); \
_a < _b ? _a : _b; \ _a < _b ? _a : _b; \
}) })
#endif
#define MIN3(a,b,c) \
MIN(MIN(a,b),c)
#ifndef CLAMP #ifndef CLAMP
#define CLAMP(x, low, high) \ #define CLAMP(x, low, high) \
__extension__ ({ \ __extension__ ({ \
typeof(x) _x = (x); \ typeof(x) _x = (x); \
typeof(low) _low = (low); \ typeof(low) _low = (low); \
typeof(high) _high = (high); \ typeof(high) _high = (high); \
((_x > _high) ? _high : ((_x < _low) ? _low : _x)); \ ((_x > _high) ? _high : ((_x < _low) ? _low : _x)); \
}) })
#endif #endif
skipping to change at line 260 skipping to change at line 260
break; \ break; \
case PA_DOUBLE|PA_FLAG_LONG_DOUBLE: \ case PA_DOUBLE|PA_FLAG_LONG_DOUBLE: \
(void) va_arg(ap, long double); \ (void) va_arg(ap, long double); \
break; \ break; \
default: \ default: \
assert_not_reached("Unknown format string argument. "); \ assert_not_reached("Unknown format string argument. "); \
} \ } \
} \ } \
} while(false) } while(false)
/* Returns the number of chars needed to format variables of the
* specified type as a decimal string. Adds in extra space for a
* negative '-' prefix. */
#define DECIMAL_STR_MAX(type) \
(1+(sizeof(type) <= 1 ? 3 : \
sizeof(type) <= 2 ? 5 : \
sizeof(type) <= 4 ? 10 : \
sizeof(type) <= 8 ? 20 : sizeof(int[-2*(sizeof(type) > 8)])))
#include "log.h" #include "log.h"
 End of changes. 7 change blocks. 
17 lines changed or deleted 29 lines changed or added


 manager.h   manager.h 
skipping to change at line 281 skipping to change at line 281
int manager_set_default_controllers(Manager *m, char **controllers); int manager_set_default_controllers(Manager *m, char **controllers);
int manager_set_default_rlimits(Manager *m, struct rlimit **default_rlimit) ; int manager_set_default_rlimits(Manager *m, struct rlimit **default_rlimit) ;
int manager_loop(Manager *m); int manager_loop(Manager *m);
void manager_dispatch_bus_name_owner_changed(Manager *m, const char *name, const char* old_owner, const char *new_owner); void manager_dispatch_bus_name_owner_changed(Manager *m, const char *name, const char* old_owner, const char *new_owner);
void manager_dispatch_bus_query_pid_done(Manager *m, const char *name, pid_ t pid); void manager_dispatch_bus_query_pid_done(Manager *m, const char *name, pid_ t pid);
int manager_open_serialization(Manager *m, FILE **_f); int manager_open_serialization(Manager *m, FILE **_f);
int manager_serialize(Manager *m, FILE *f, FDSet *fds, bool serialize_jobs) ; int manager_serialize(Manager *m, FILE *f, FDSet *fds, bool switching_root) ;
int manager_deserialize(Manager *m, FILE *f, FDSet *fds); int manager_deserialize(Manager *m, FILE *f, FDSet *fds);
int manager_distribute_fds(Manager *m, FDSet *fds); int manager_distribute_fds(Manager *m, FDSet *fds);
int manager_reload(Manager *m); int manager_reload(Manager *m);
bool manager_is_reloading_or_reexecuting(Manager *m); bool manager_is_reloading_or_reexecuting(Manager *m);
void manager_reset_failed(Manager *m); void manager_reset_failed(Manager *m);
void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success); void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 path-util.h   path-util.h 
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
#ifndef foopathutilhfoo #pragma once
#define foopathutilhfoo
/*** /***
This file is part of systemd. This file is part of systemd.
Copyright 2010-2012 Lennart Poettering Copyright 2010-2012 Lennart Poettering
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.
skipping to change at line 44 skipping to change at line 43
char *path_kill_slashes(char *path); char *path_kill_slashes(char *path);
char *path_startswith(const char *path, const char *prefix); char *path_startswith(const char *path, const char *prefix);
bool path_equal(const char *a, const char *b); bool path_equal(const char *a, const char *b);
char **path_strv_make_absolute_cwd(char **l); char **path_strv_make_absolute_cwd(char **l);
char **path_strv_canonicalize(char **l); char **path_strv_canonicalize(char **l);
char **path_strv_canonicalize_uniq(char **l); char **path_strv_canonicalize_uniq(char **l);
int path_is_mount_point(const char *path, bool allow_symlink); int path_is_mount_point(const char *path, bool allow_symlink);
int path_is_read_only_fs(const char *path); int path_is_read_only_fs(const char *path);
#endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added


 scsi_id.h   scsi_id.h 
skipping to change at line 18 skipping to change at line 18
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#define MAX_PATH_LEN 512 #define MAX_PATH_LEN 512
/* /*
* MAX_ATTR_LEN: maximum length of the result of reading a sysfs * MAX_ATTR_LEN: maximum length of the result of reading a sysfs
* attribute. * attribute.
*/ */
#define MAX_ATTR_LEN 256 #define MAX_ATTR_LEN 256
/* /*
* MAX_SERIAL_LEN: the maximum length of the serial number, including * MAX_SERIAL_LEN: the maximum length of the serial number, including
* added prefixes such as vendor and product (model) strings. * added prefixes such as vendor and product (model) strings.
*/ */
#define MAX_SERIAL_LEN 256 #define MAX_SERIAL_LEN 256
/* /*
* MAX_BUFFER_LEN: maximum buffer size and line length used while reading * MAX_BUFFER_LEN: maximum buffer size and line length used while reading
* the config file. * the config file.
*/ */
#define MAX_BUFFER_LEN 256 #define MAX_BUFFER_LEN 256
struct scsi_id_device { struct scsi_id_device {
char vendor[9]; char vendor[9];
char model[17]; char model[17];
char revision[5]; char revision[5];
char type[33]; char type[33];
char kernel[64]; char kernel[64];
char serial[MAX_SERIAL_LEN]; char serial[MAX_SERIAL_LEN];
char serial_short[MAX_SERIAL_LEN]; char serial_short[MAX_SERIAL_LEN];
int use_sg; int use_sg;
skipping to change at line 61 skipping to change at line 61
/* NULs if not set - otherwise hex encoding using lower-case e.g. ' 50014ee0016eb572' */ /* NULs if not set - otherwise hex encoding using lower-case e.g. ' 50014ee0016eb572' */
char wwn[17]; char wwn[17];
/* NULs if not set - otherwise hex encoding using lower-case e.g. ' 0xe00000d80000' */ /* NULs if not set - otherwise hex encoding using lower-case e.g. ' 0xe00000d80000' */
char wwn_vendor_extension[17]; char wwn_vendor_extension[17];
/* NULs if not set - otherwise decimal number */ /* NULs if not set - otherwise decimal number */
char tgpt_group[8]; char tgpt_group[8];
}; };
extern int scsi_std_inquiry(struct udev *udev, struct scsi_id_device *dev_s int scsi_std_inquiry(struct udev *udev, struct scsi_id_device *dev_scsi, co
csi, const char *devname); nst char *devname);
extern int scsi_get_serial (struct udev *udev, struct scsi_id_device *dev_s int scsi_get_serial(struct udev *udev, struct scsi_id_device *dev_scsi, con
csi, const char *devname, st char *devname,
int page_code, int len); int page_code, int len);
/* /*
* Page code values. * Page code values.
*/ */
enum page_code { enum page_code {
PAGE_83_PRE_SPC3 = -0x83, PAGE_83_PRE_SPC3 = -0x83,
PAGE_UNSPECIFIED = 0x00, PAGE_UNSPECIFIED = 0x00,
PAGE_80 = 0x80, PAGE_80 = 0x80,
PAGE_83 = 0x83, PAGE_83 = 0x83,
}; };
 End of changes. 6 change blocks. 
11 lines changed or deleted 11 lines changed or added


 sd-bus-protocol.h   sd-bus-protocol.h 
skipping to change at line 27 skipping to change at line 27
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 <endian.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Types of message */ /* Types of message */
enum { enum {
_SD_BUS_MESSAGE_TYPE_INVALID = 0, _SD_BUS_MESSAGE_TYPE_INVALID = 0,
SD_BUS_MESSAGE_TYPE_METHOD_CALL, SD_BUS_MESSAGE_TYPE_METHOD_CALL,
SD_BUS_MESSAGE_TYPE_METHOD_RETURN, SD_BUS_MESSAGE_TYPE_METHOD_RETURN,
SD_BUS_MESSAGE_TYPE_METHOD_ERROR, SD_BUS_MESSAGE_TYPE_METHOD_ERROR,
SD_BUS_MESSAGE_TYPE_SIGNAL, SD_BUS_MESSAGE_TYPE_SIGNAL,
_SD_BUS_MESSAGE_TYPE_MAX _SD_BUS_MESSAGE_TYPE_MAX
}; };
skipping to change at line 145 skipping to change at line 149
" </interface>\n" " </interface>\n"
#define SD_BUS_INTROSPECT_INTERFACE_PEER \ #define SD_BUS_INTROSPECT_INTERFACE_PEER \
"<interface name=\"org.freedesktop.DBus.Peer\">\n" \ "<interface name=\"org.freedesktop.DBus.Peer\">\n" \
" <method name=\"Ping\"/>\n" \ " <method name=\"Ping\"/>\n" \
" <method name=\"GetMachineId\">\n" \ " <method name=\"GetMachineId\">\n" \
" <arg type=\"s\" name=\"machine_uuid\" direction=\"out\"/>\n" \ " <arg type=\"s\" name=\"machine_uuid\" direction=\"out\"/>\n" \
" </method>\n" \ " </method>\n" \
"</interface>\n" "</interface>\n"
#ifdef __cplusplus
}
#endif
#endif #endif
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 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 <sd-id128.h> #include <sd-id128.h>
#include "sd-bus-protocol.h" #include "sd-bus-protocol.h"
#ifdef __cplusplus
extern "C" {
#endif
/* TODO: /* TODO:
* - server side * - rewrite message_read_ap() and message_append_ap() to be non-recursive.
* - allow installing match callbacks
* - anonymous auth
* - default policy
* *
* Later:
* - add page donation logic * - add page donation logic
* - api for appending/reading fixed arrays * - api for appending/reading fixed arrays
* - merge busctl into systemctl or so? * - merge busctl into systemctl or so?
* - default policy (allow uid == 0 and our own uid)
*/ */
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 { typedef struct {
const char *name; const char *name;
const char *message; const char *message;
int need_free; int need_free;
} sd_bus_error; } sd_bus_error;
typedef int (*sd_message_handler_t)(sd_bus *bus, int ret, sd_bus_message *m , void *userdata); typedef int (*sd_bus_message_handler_t)(sd_bus *bus, int ret, sd_bus_messag e *m, void *userdata);
/* Connections */ /* Connections */
int sd_bus_open_system(sd_bus **ret); int sd_bus_open_system(sd_bus **ret);
int sd_bus_open_user(sd_bus **ret); int sd_bus_open_user(sd_bus **ret);
int sd_bus_new(sd_bus **ret); int sd_bus_new(sd_bus **ret);
int sd_bus_set_address(sd_bus *bus, const char *address); int sd_bus_set_address(sd_bus *bus, const char *address);
int sd_bus_set_fd(sd_bus *bus, int fd); int sd_bus_set_fd(sd_bus *bus, int input_fd, int output_fd);
int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]); int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]);
int sd_bus_set_bus_client(sd_bus *bus, int b); int sd_bus_set_bus_client(sd_bus *bus, int b);
int sd_bus_set_server(sd_bus *bus, int b, sd_id128_t server_id);
int sd_bus_set_anonymous(sd_bus *bus, int b);
int sd_bus_set_negotiate_fds(sd_bus *bus, int b); int sd_bus_set_negotiate_fds(sd_bus *bus, int b);
int sd_bus_start(sd_bus *ret); int sd_bus_start(sd_bus *ret);
void sd_bus_close(sd_bus *bus); void sd_bus_close(sd_bus *bus);
sd_bus *sd_bus_ref(sd_bus *bus); sd_bus *sd_bus_ref(sd_bus *bus);
sd_bus *sd_bus_unref(sd_bus *bus); sd_bus *sd_bus_unref(sd_bus *bus);
int sd_bus_is_open(sd_bus *bus); int sd_bus_is_open(sd_bus *bus);
int sd_bus_can_send(sd_bus *bus, char type); int sd_bus_can_send(sd_bus *bus, char type);
int sd_bus_get_peer(sd_bus *bus, sd_id128_t *peer); int sd_bus_get_server_id(sd_bus *bus, sd_id128_t *peer);
int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *serial); int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *serial);
int sd_bus_send_with_reply(sd_bus *bus, sd_bus_message *m, sd_message_handl er_t callback, void *userdata, uint64_t usec, uint64_t *serial); int sd_bus_send_with_reply(sd_bus *bus, sd_bus_message *m, sd_bus_message_h andler_t callback, void *userdata, uint64_t usec, uint64_t *serial);
int sd_bus_send_with_reply_cancel(sd_bus *bus, uint64_t serial); int sd_bus_send_with_reply_cancel(sd_bus *bus, uint64_t serial);
int sd_bus_send_with_reply_and_block(sd_bus *bus, sd_bus_message *m, uint64 _t usec, sd_bus_error *error, sd_bus_message **r); int sd_bus_send_with_reply_and_block(sd_bus *bus, sd_bus_message *m, uint64 _t usec, sd_bus_error *error, sd_bus_message **r);
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_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);
int sd_bus_add_filter(sd_bus *bus, sd_message_handler_t callback, void *use int sd_bus_add_filter(sd_bus *bus, sd_bus_message_handler_t callback, void
rdata); *userdata);
int sd_bus_remove_filter(sd_bus *bus, sd_message_handler_t callback, void * int sd_bus_remove_filter(sd_bus *bus, sd_bus_message_handler_t callback, vo
userdata); id *userdata);
int sd_bus_add_object(sd_bus *bus, const char *path, sd_message_handler_t c int sd_bus_add_object(sd_bus *bus, const char *path, sd_bus_message_handler
allback, void *userdata); _t callback, void *userdata);
int sd_bus_remove_object(sd_bus *bus, const char *path, sd_message_handler_ int sd_bus_remove_object(sd_bus *bus, const char *path, sd_bus_message_hand
t callback, void *userdata); ler_t callback, void *userdata);
int sd_bus_add_fallback(sd_bus *bus, const char *prefix, sd_message_handler int sd_bus_add_fallback(sd_bus *bus, const char *prefix, sd_bus_message_han
_t callback, void *userdata); dler_t callback, void *userdata);
int sd_bus_remove_fallback(sd_bus *bus, const char *prefix, sd_message_hand int sd_bus_remove_fallback(sd_bus *bus, const char *prefix, sd_bus_message_
ler_t callback, void *userdata); handler_t callback, void *userdata);
int sd_bus_add_match(sd_bus *bus, const char *match, sd_bus_message_handler
_t callback, void *userdata);
int sd_bus_remove_match(sd_bus *bus, const char *match, sd_bus_message_hand
ler_t callback, void *userdata);
/* Message object */ /* Message object */
int sd_bus_message_new_signal(sd_bus *bus, const char *path, const char *in terface, const char *member, sd_bus_message **m); int sd_bus_message_new_signal(sd_bus *bus, const char *path, const char *in terface, const char *member, sd_bus_message **m);
int sd_bus_message_new_method_call(sd_bus *bus, const char *destination, co nst char *path, const char *interface, const char *member, sd_bus_message * *m); int sd_bus_message_new_method_call(sd_bus *bus, const char *destination, co nst char *path, const char *interface, const char *member, sd_bus_message * *m);
int sd_bus_message_new_method_return(sd_bus *bus, sd_bus_message *call, sd_ bus_message **m); int sd_bus_message_new_method_return(sd_bus *bus, sd_bus_message *call, sd_ bus_message **m);
int sd_bus_message_new_method_error(sd_bus *bus, sd_bus_message *call, cons t sd_bus_error *e, sd_bus_message **m); int sd_bus_message_new_method_error(sd_bus *bus, sd_bus_message *call, cons t sd_bus_error *e, sd_bus_message **m);
sd_bus_message* sd_bus_message_ref(sd_bus_message *m); sd_bus_message* sd_bus_message_ref(sd_bus_message *m);
sd_bus_message* sd_bus_message_unref(sd_bus_message *m); sd_bus_message* sd_bus_message_unref(sd_bus_message *m);
skipping to change at line 144 skipping to change at line 150
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_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_enter_container(sd_bus_message *m, char type, const char *contents); int sd_bus_message_enter_container(sd_bus_message *m, char type, const char *contents);
int sd_bus_message_exit_container(sd_bus_message *m); int sd_bus_message_exit_container(sd_bus_message *m);
int sd_bus_message_peek_type(sd_bus_message *m, char *type, const char **co ntents); int sd_bus_message_peek_type(sd_bus_message *m, char *type, const char **co ntents);
int sd_bus_message_rewind(sd_bus_message *m, int complete); int sd_bus_message_rewind(sd_bus_message *m, int complete);
/* Convenience calls */
int sd_bus_emit_signal(sd_bus *bus, const char *path, const char *interface
, const char *member, const char *types, ...);
int sd_bus_call_method(sd_bus *bus, const char *destination, const char *pa
th, const char *interface, const char *member, sd_bus_error *error, sd_bus_
message **reply, const char *types, ...);
int sd_bus_reply_method_return(sd_bus *bus, sd_bus_message *call, const cha
r *types, ...);
int sd_bus_reply_method_error(sd_bus *bus, sd_bus_message *call, const sd_b
us_error *e);
/* Bus management */ /* Bus management */
int sd_bus_get_unique_name(sd_bus *bus, const char **unique); int sd_bus_get_unique_name(sd_bus *bus, const char **unique);
int sd_bus_request_name(sd_bus *bus, const char *name, int flags); int sd_bus_request_name(sd_bus *bus, const char *name, int flags);
int sd_bus_release_name(sd_bus *bus, const char *name); int sd_bus_release_name(sd_bus *bus, const char *name);
int sd_bus_list_names(sd_bus *bus, char ***l); int sd_bus_list_names(sd_bus *bus, char ***l);
int sd_bus_get_owner(sd_bus *bus, const char *name, char **owner); int sd_bus_get_owner(sd_bus *bus, const char *name, char **owner);
int sd_bus_get_owner_uid(sd_bus *bus, const char *name, uid_t *uid); int sd_bus_get_owner_uid(sd_bus *bus, const char *name, uid_t *uid);
int sd_bus_get_owner_pid(sd_bus *bus, const char *name, pid_t *pid); int sd_bus_get_owner_pid(sd_bus *bus, const char *name, pid_t *pid);
int sd_bus_add_match(sd_bus *bus, const char *match);
int sd_bus_remove_match(sd_bus *bus, const char *match);
/* Error structures */ /* Error structures */
#define SD_BUS_ERROR_INIT {NULL, NULL, 0} #define SD_BUS_ERROR_NULL ((sd_bus_error) {NULL, NULL, 0})
#define SD_BUS_ERROR_INIT_CONST(name, message) {(name), (message), 0} #define SD_BUS_ERROR_MAKE(name, message) ((sd_bus_error) {(name), (message)
, 0})
void sd_bus_error_free(sd_bus_error *e); void sd_bus_error_free(sd_bus_error *e);
int sd_bus_error_set(sd_bus_error *e, const char *name, const char *format, ...); int sd_bus_error_set(sd_bus_error *e, const char *name, const char *format, ...);
void sd_bus_error_set_const(sd_bus_error *e, const char *name, const char * message); void sd_bus_error_set_const(sd_bus_error *e, const char *name, const char * message);
int sd_bus_error_copy(sd_bus_error *dest, const sd_bus_error *e); int sd_bus_error_copy(sd_bus_error *dest, const sd_bus_error *e);
int sd_bus_error_is_set(const sd_bus_error *e); int sd_bus_error_is_set(const sd_bus_error *e);
int sd_bus_error_has_name(const sd_bus_error *e, const char *name); int sd_bus_error_has_name(const sd_bus_error *e, const char *name);
#ifdef __cplusplus
}
#endif
#endif #endif
 End of changes. 16 change blocks. 
25 lines changed or deleted 48 lines changed or added


 sd-journal.h   sd-journal.h 
skipping to change at line 130 skipping to change at line 130
int sd_journal_get_cutoff_realtime_usec(sd_journal *j, uint64_t *from, uint 64_t *to); int sd_journal_get_cutoff_realtime_usec(sd_journal *j, uint64_t *from, uint 64_t *to);
int sd_journal_get_cutoff_monotonic_usec(sd_journal *j, const sd_id128_t bo ot_id, uint64_t *from, uint64_t *to); int sd_journal_get_cutoff_monotonic_usec(sd_journal *j, const sd_id128_t bo ot_id, uint64_t *from, uint64_t *to);
int sd_journal_get_usage(sd_journal *j, uint64_t *bytes); int sd_journal_get_usage(sd_journal *j, uint64_t *bytes);
int sd_journal_query_unique(sd_journal *j, const char *field); int sd_journal_query_unique(sd_journal *j, const char *field);
int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_t *l ); int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_t *l );
void sd_journal_restart_unique(sd_journal *j); void sd_journal_restart_unique(sd_journal *j);
int sd_journal_get_fd(sd_journal *j); int sd_journal_get_fd(sd_journal *j);
int sd_journal_reliable_fd(sd_journal *j); int sd_journal_get_events(sd_journal *j);
int sd_journal_get_timeout(sd_journal *j, uint64_t *timeout_usec);
int sd_journal_process(sd_journal *j); int sd_journal_process(sd_journal *j);
int sd_journal_wait(sd_journal *j, uint64_t timeout_usec); int sd_journal_wait(sd_journal *j, uint64_t timeout_usec);
int sd_journal_reliable_fd(sd_journal *j);
int sd_journal_get_catalog(sd_journal *j, char **text); int sd_journal_get_catalog(sd_journal *j, char **text);
int sd_journal_get_catalog_for_message_id(sd_id128_t id, char **ret); int sd_journal_get_catalog_for_message_id(sd_id128_t id, char **ret);
#define SD_JOURNAL_FOREACH(j) \ #define SD_JOURNAL_FOREACH(j) \
if (sd_journal_seek_head(j) >= 0) \ if (sd_journal_seek_head(j) >= 0) \
while (sd_journal_next(j) > 0) while (sd_journal_next(j) > 0)
#define SD_JOURNAL_FOREACH_BACKWARDS(j) \ #define SD_JOURNAL_FOREACH_BACKWARDS(j) \
if (sd_journal_seek_tail(j) >= 0) \ if (sd_journal_seek_tail(j) >= 0) \
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 sd-login.h   sd-login.h 
skipping to change at line 26 skipping to change at line 26
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 <sys/types.h> #include <sys/types.h>
#include <inttypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /*
* A few points: * A few points:
* *
* Instead of returning an empty string array or empty uid array, we * Instead of returning an empty string array or empty uid array, we
* may return NULL. * may return NULL.
skipping to change at line 159 skipping to change at line 160
/* Destroys the passed monitor. Returns NULL. */ /* Destroys the passed monitor. Returns NULL. */
sd_login_monitor* sd_login_monitor_unref(sd_login_monitor *m); sd_login_monitor* sd_login_monitor_unref(sd_login_monitor *m);
/* Flushes the monitor */ /* Flushes the monitor */
int sd_login_monitor_flush(sd_login_monitor *m); int sd_login_monitor_flush(sd_login_monitor *m);
/* Get FD from monitor */ /* Get FD from monitor */
int sd_login_monitor_get_fd(sd_login_monitor *m); int sd_login_monitor_get_fd(sd_login_monitor *m);
/* Get poll() mask to monitor */
int sd_login_monitor_get_events(sd_login_monitor *m);
/* Get timeout for poll(), as usec value relative to CLOCK_MONOTONIC's epoc
h */
int sd_login_monitor_get_timeout(sd_login_monitor *m, uint64_t *timeout_use
c);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 2 change blocks. 
0 lines changed or deleted 9 lines changed or added


 socket.h   socket.h 
skipping to change at line 178 skipping to change at line 178
extern const UnitVTable socket_vtable; extern const UnitVTable socket_vtable;
const char* socket_state_to_string(SocketState i); const char* socket_state_to_string(SocketState i);
SocketState socket_state_from_string(const char *s); SocketState socket_state_from_string(const char *s);
const char* socket_exec_command_to_string(SocketExecCommand i); const char* socket_exec_command_to_string(SocketExecCommand i);
SocketExecCommand socket_exec_command_from_string(const char *s); SocketExecCommand socket_exec_command_from_string(const char *s);
const char* socket_result_to_string(SocketResult i); const char* socket_result_to_string(SocketResult i);
SocketResult socket_result_from_string(const char *s); SocketResult socket_result_from_string(const char *s);
const char* socket_port_type_to_string(SocketPort *p);
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 time-util.h   time-util.h 
skipping to change at line 25 skipping to change at line 25
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 <stdio.h> #include <stdio.h>
#include <inttypes.h>
typedef uint64_t usec_t; typedef uint64_t usec_t;
typedef uint64_t nsec_t; typedef uint64_t nsec_t;
#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;
skipping to change at line 76 skipping to change at line 77
#define dual_timestamp_is_set(ts) ((ts)->realtime > 0) #define dual_timestamp_is_set(ts) ((ts)->realtime > 0)
usec_t timespec_load(const struct timespec *ts); usec_t timespec_load(const struct timespec *ts);
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); usec_t timeval_load(const struct timeval *tv);
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_relative(char *buf, size_t l, usec_t t); char *format_timestamp_relative(char *buf, size_t l, usec_t t);
char *format_timespan(char *buf, size_t l, usec_t t); char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy);
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_usec(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);
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added


 unit-name.h   unit-name.h 
skipping to change at line 56 skipping to change at line 56
enum UnitLoadState { enum UnitLoadState {
UNIT_STUB = 0, UNIT_STUB = 0,
UNIT_LOADED, UNIT_LOADED,
UNIT_ERROR, UNIT_ERROR,
UNIT_MERGED, UNIT_MERGED,
UNIT_MASKED, UNIT_MASKED,
_UNIT_LOAD_STATE_MAX, _UNIT_LOAD_STATE_MAX,
_UNIT_LOAD_STATE_INVALID = -1 _UNIT_LOAD_STATE_INVALID = -1
}; };
extern const char* const unit_type_table[];
const char *unit_type_to_string(UnitType i); const char *unit_type_to_string(UnitType i);
UnitType unit_type_from_string(const char *s); UnitType unit_type_from_string(const char *s);
extern const char* const unit_load_state_table[];
const char *unit_load_state_to_string(UnitLoadState i); const char *unit_load_state_to_string(UnitLoadState i);
UnitLoadState unit_load_state_from_string(const char *s); UnitLoadState unit_load_state_from_string(const char *s);
int unit_name_to_instance(const char *n, char **instance); int unit_name_to_instance(const char *n, char **instance);
char* unit_name_to_prefix(const char *n); char* unit_name_to_prefix(const char *n);
char* unit_name_to_prefix_and_instance(const char *n); char* unit_name_to_prefix_and_instance(const char *n);
bool unit_name_is_valid(const char *n, bool template_ok); bool unit_name_is_valid(const char *n, bool template_ok);
bool unit_prefix_is_valid(const char *p); bool unit_prefix_is_valid(const char *p);
bool unit_instance_is_valid(const char *i); bool unit_instance_is_valid(const char *i);
 End of changes. 2 change blocks. 
2 lines changed or deleted 0 lines changed or added


 unit.h   unit.h 
skipping to change at line 141 skipping to change at line 141
Set *names; Set *names;
Set *dependencies[_UNIT_DEPENDENCY_MAX]; Set *dependencies[_UNIT_DEPENDENCY_MAX];
char **requires_mounts_for; char **requires_mounts_for;
char *description; char *description;
char **documentation; char **documentation;
char *fragment_path; /* if loaded from a config file this is the pr imary path to it */ char *fragment_path; /* if loaded from a config file this is the pr imary path to it */
char *source_path; /* if converted, the source file */ char *source_path; /* if converted, the source file */
char **dropin_paths;
usec_t fragment_mtime; usec_t fragment_mtime;
usec_t source_mtime; usec_t source_mtime;
usec_t dropin_mtime;
/* If there is something to do with this unit, then this is the ins talled job for it */ /* If there is something to do with this unit, then this is the ins talled job for it */
Job *job; Job *job;
/* JOB_NOP jobs are special and can be installed without disturbing the real job. */ /* JOB_NOP jobs are special and can be installed without disturbing the real job. */
Job *nop_job; Job *nop_job;
usec_t job_timeout; usec_t job_timeout;
/* References to this */ /* References to this */
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 util.h   util.h 
skipping to change at line 39 skipping to change at line 39
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <signal.h> #include <signal.h>
#include <sched.h> #include <sched.h>
#include <limits.h> #include <limits.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <dirent.h> #include <dirent.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <stddef.h> #include <stddef.h>
#include <systemd/sd-journal.h> #include <unistd.h>
#include <systemd/sd-journal.h>
#include "macro.h" #include "macro.h"
#include "time-util.h" #include "time-util.h"
union dirent_storage { union dirent_storage {
struct dirent de; struct dirent de;
uint8_t storage[offsetof(struct dirent, d_name) + uint8_t storage[offsetof(struct dirent, d_name) +
((NAME_MAX + 1 + sizeof(long)) & ~(sizeof(long) - 1 ))]; ((NAME_MAX + 1 + sizeof(long)) & ~(sizeof(long) - 1 ))];
}; };
/* What is interpreted as whitespace? */ /* What is interpreted as whitespace? */
skipping to change at line 332 skipping to change at line 333
int close_pipe(int p[]); int close_pipe(int p[]);
int fopen_temporary(const char *path, FILE **_f, char **_temp_path); int fopen_temporary(const char *path, FILE **_f, char **_temp_path);
ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll); ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll);
ssize_t loop_write(int fd, const void *buf, size_t nbytes, bool do_poll); ssize_t loop_write(int fd, const void *buf, size_t nbytes, bool do_poll);
bool is_device_path(const char *path); bool is_device_path(const char *path);
int dir_is_empty(const char *path); int dir_is_empty(const char *path);
char* dirname_malloc(const char *path);
void rename_process(const char name[8]); void rename_process(const char name[8]);
void sigset_add_many(sigset_t *ss, ...); void sigset_add_many(sigset_t *ss, ...);
bool hostname_is_set(void); bool hostname_is_set(void);
char* gethostname_malloc(void); char* gethostname_malloc(void);
char* getlogname_malloc(void); char* getlogname_malloc(void);
char* getusername_malloc(void); char* getusername_malloc(void);
skipping to change at line 540 skipping to change at line 542
void closep(int *fd); void closep(int *fd);
void closedirp(DIR **d); void closedirp(DIR **d);
static inline void umaskp(mode_t *u) { static inline void umaskp(mode_t *u) {
umask(*u); umask(*u);
} }
static inline void journal_closep(sd_journal **j) { static inline void journal_closep(sd_journal **j) {
sd_journal_close(*j); sd_journal_close(*j);
} }
#define _cleanup_globfree_ __attribute__((cleanup(globfree)))
_malloc_ static inline void *malloc_multiply(size_t a, size_t b) { _malloc_ static inline void *malloc_multiply(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 malloc(a * b); return malloc(a * b);
} }
_malloc_ static inline void *memdup_multiply(const void *p, size_t a, size_ t b) { _malloc_ 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;
skipping to change at line 597 skipping to change at line 601
if (!fgets(line, sizeof(line), f)) { \ if (!fgets(line, sizeof(line), f)) { \
if (ferror(f)) { \ if (ferror(f)) { \
on_error; \ on_error; \
} \ } \
break; \ break; \
} else } else
#define FOREACH_DIRENT(de, d, on_error) \ #define FOREACH_DIRENT(de, d, on_error) \
for (errno = 0, de = readdir(d);; errno = 0, de = readdir(d)) \ for (errno = 0, de = readdir(d);; errno = 0, de = readdir(d)) \
if (!de) { \ if (!de) { \
if (errno != 0) { \ if (errno > 0) { \
on_error; \ on_error; \
} \ } \
break; \ break; \
} else if (ignore_file((de)->d_name)) \ } else if (ignore_file((de)->d_name)) \
continue; \ continue; \
else else
static inline void *mempset(void *s, int c, size_t n) { static inline void *mempset(void *s, int c, size_t n) {
memset(s, c, n); memset(s, c, n);
return (char*)s + n; return (char*)s + n;
} }
char *hexmem(const void *p, size_t l); char *hexmem(const void *p, size_t l);
void *unhexmem(const char *p, size_t l);
char *strextend(char **x, ...); char *strextend(char **x, ...);
char *strrep(const char *s, unsigned n); char *strrep(const char *s, unsigned n);
void* greedy_realloc(void **p, size_t *allocated, size_t need);
static inline void _reset_errno_(int *saved_errno) {
errno = *saved_errno;
}
#define PROTECT_ERRNO __attribute__((cleanup(_reset_errno_))) int _saved_er
rno_ = errno
struct umask_struct {
mode_t mask;
bool quit;
};
static inline void _reset_umask_(struct umask_struct *s) {
umask(s->mask);
};
#define RUN_WITH_UMASK(mask) \
for (__attribute__((cleanup(_reset_umask_))) struct umask_struct _s
aved_umask_ = { umask(mask), false }; \
!_saved_umask_.quit ; \
_saved_umask_.quit = true)
static inline unsigned u64log2(uint64_t n) {
return (n > 1) ? __builtin_clzll(n) ^ 63U : 0;
}
static inline bool logind_running(void) {
return access("/run/systemd/seats/", F_OK) >= 0;
}
int unlink_noerrno(const char *path);
 End of changes. 7 change blocks. 
2 lines changed or deleted 8 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/