bus-errors.h | bus-errors.h | |||
---|---|---|---|---|
skipping to change at line 46 | skipping to change at line 46 | |||
#define BUS_ERROR_ONLY_BY_DEPENDENCY "org.freedesktop.systemd1.OnlyByDepend ency" | #define BUS_ERROR_ONLY_BY_DEPENDENCY "org.freedesktop.systemd1.OnlyByDepend ency" | |||
#define BUS_ERROR_NO_ISOLATION "org.freedesktop.systemd1.NoIsolation" | #define BUS_ERROR_NO_ISOLATION "org.freedesktop.systemd1.NoIsolation" | |||
#define BUS_ERROR_LOAD_FAILED "org.freedesktop.systemd1.LoadFailed" | #define BUS_ERROR_LOAD_FAILED "org.freedesktop.systemd1.LoadFailed" | |||
#define BUS_ERROR_MASKED "org.freedesktop.systemd1.Masked" | #define BUS_ERROR_MASKED "org.freedesktop.systemd1.Masked" | |||
#define BUS_ERROR_JOB_TYPE_NOT_APPLICABLE "org.freedesktop.systemd1.JobType NotApplicable" | #define BUS_ERROR_JOB_TYPE_NOT_APPLICABLE "org.freedesktop.systemd1.JobType NotApplicable" | |||
#define BUS_ERROR_TRANSACTION_IS_DESTRUCTIVE "org.freedesktop.systemd1.Tran sactionIsDestructive" | #define BUS_ERROR_TRANSACTION_IS_DESTRUCTIVE "org.freedesktop.systemd1.Tran sactionIsDestructive" | |||
#define BUS_ERROR_TRANSACTION_JOBS_CONFLICTING "org.freedesktop.systemd1.Tr ansactionJobsConflicting" | #define BUS_ERROR_TRANSACTION_JOBS_CONFLICTING "org.freedesktop.systemd1.Tr ansactionJobsConflicting" | |||
#define BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC "org.freedesktop.systemd1.Tra nsactionOrderIsCyclic" | #define BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC "org.freedesktop.systemd1.Tra nsactionOrderIsCyclic" | |||
#define BUS_ERROR_SHUTTING_DOWN "org.freedesktop.systemd1.ShuttingDown" | #define BUS_ERROR_SHUTTING_DOWN "org.freedesktop.systemd1.ShuttingDown" | |||
#define BUS_ERROR_NO_SUCH_PROCESS "org.freedesktop.systemd1.NoSuchProcess" | #define BUS_ERROR_NO_SUCH_PROCESS "org.freedesktop.systemd1.NoSuchProcess" | |||
#define BUS_ERROR_ACCESS_DENIED "org.freedesktop.systemd1.AccessDenied" | ||||
static inline const char *bus_error(const DBusError *e, int r) { | static inline const char *bus_error(const DBusError *e, int r) { | |||
if (e && e->message) | if (e && e->message) | |||
return e->message; | return e->message; | |||
if (r >= 0) | if (r >= 0) | |||
return strerror(r); | return strerror(r); | |||
return strerror(-r); | return strerror(-r); | |||
} | } | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
condition.h | condition.h | |||
---|---|---|---|---|
skipping to change at line 36 | skipping to change at line 36 | |||
#include "list.h" | #include "list.h" | |||
typedef enum ConditionType { | typedef enum ConditionType { | |||
CONDITION_PATH_EXISTS, | CONDITION_PATH_EXISTS, | |||
CONDITION_PATH_EXISTS_GLOB, | CONDITION_PATH_EXISTS_GLOB, | |||
CONDITION_PATH_IS_DIRECTORY, | CONDITION_PATH_IS_DIRECTORY, | |||
CONDITION_PATH_IS_SYMBOLIC_LINK, | CONDITION_PATH_IS_SYMBOLIC_LINK, | |||
CONDITION_PATH_IS_MOUNT_POINT, | CONDITION_PATH_IS_MOUNT_POINT, | |||
CONDITION_PATH_IS_READ_WRITE, | CONDITION_PATH_IS_READ_WRITE, | |||
CONDITION_DIRECTORY_NOT_EMPTY, | CONDITION_DIRECTORY_NOT_EMPTY, | |||
CONDITION_FILE_NOT_EMPTY, | ||||
CONDITION_FILE_IS_EXECUTABLE, | CONDITION_FILE_IS_EXECUTABLE, | |||
CONDITION_KERNEL_COMMAND_LINE, | CONDITION_KERNEL_COMMAND_LINE, | |||
CONDITION_VIRTUALIZATION, | CONDITION_VIRTUALIZATION, | |||
CONDITION_SECURITY, | CONDITION_SECURITY, | |||
CONDITION_CAPABILITY, | CONDITION_CAPABILITY, | |||
CONDITION_HOST, | CONDITION_HOST, | |||
CONDITION_NULL, | CONDITION_NULL, | |||
_CONDITION_TYPE_MAX, | _CONDITION_TYPE_MAX, | |||
_CONDITION_TYPE_INVALID = -1 | _CONDITION_TYPE_INVALID = -1 | |||
} ConditionType; | } ConditionType; | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
config.h | config.h | |||
---|---|---|---|---|
skipping to change at line 22 | skipping to change at line 22 | |||
/* 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 | |||
/* AUDIT available */ | /* AUDIT available */ | |||
#define HAVE_AUDIT 1 | #define HAVE_AUDIT 1 | |||
/* Define to 1 if you have the declaration of `gettid', and to 0 if you don | ||||
't. | ||||
*/ | ||||
#define HAVE_DECL_GETTID 0 | ||||
/* Define to 1 if you have the declaration of `pivot_root', and to 0 if you | ||||
don't. */ | ||||
#define HAVE_DECL_PIVOT_ROOT 0 | ||||
/* Define to 1 if you have the <dlfcn.h> header file. */ | /* Define to 1 if you have the <dlfcn.h> header file. */ | |||
#define HAVE_DLFCN_H 1 | #define HAVE_DLFCN_H 1 | |||
/* Define to 1 if you have the `fanotify_init' function. */ | ||||
#define HAVE_FANOTIFY_INIT 1 | ||||
/* Define to 1 if you have the `fanotify_mark' function. */ | ||||
#define HAVE_FANOTIFY_MARK 1 | ||||
/* GCRYPT available */ | /* GCRYPT available */ | |||
#define HAVE_GCRYPT 1 | #define HAVE_GCRYPT 1 | |||
/* Define if IMA is available */ | /* Define if IMA is available */ | |||
#define HAVE_IMA 1 | #define HAVE_IMA 1 | |||
/* Define to 1 if you have the <inttypes.h> header file. */ | /* Define to 1 if you have the <inttypes.h> header file. */ | |||
#define HAVE_INTTYPES_H 1 | #define HAVE_INTTYPES_H 1 | |||
/* Define to 1 if you have the <libaudit.h> header file. */ | /* Define to 1 if you have the <libaudit.h> header file. */ | |||
skipping to change at line 49 | skipping to change at line 63 | |||
/* Have tcpwrap? */ | /* Have tcpwrap? */ | |||
#define HAVE_LIBWRAP /**/ | #define HAVE_LIBWRAP /**/ | |||
/* Logind support available */ | /* Logind support available */ | |||
#define HAVE_LOGIND 1 | #define HAVE_LOGIND 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 | |||
/* Define to 1 if you have the `name_to_handle_at' function. */ | ||||
/* #undef HAVE_NAME_TO_HANDLE_AT */ | ||||
/* PAM available */ | /* PAM available */ | |||
#define HAVE_PAM 1 | #define HAVE_PAM 1 | |||
/* Define if qrencode is available */ | /* Define if qrencode is available */ | |||
#define HAVE_QRENCODE 1 | #define HAVE_QRENCODE 1 | |||
/* Define to 1 if you have the `secure_getenv' function. */ | ||||
/* #undef HAVE_SECURE_GETENV */ | ||||
/* Define to 1 if you have the <security/pam_ext.h> header file. */ | /* Define to 1 if you have the <security/pam_ext.h> header file. */ | |||
#define HAVE_SECURITY_PAM_EXT_H 1 | #define HAVE_SECURITY_PAM_EXT_H 1 | |||
/* Define to 1 if you have the <security/pam_modules.h> header file. */ | /* Define to 1 if you have the <security/pam_modules.h> header file. */ | |||
#define HAVE_SECURITY_PAM_MODULES_H 1 | #define HAVE_SECURITY_PAM_MODULES_H 1 | |||
/* Define to 1 if you have the <security/pam_modutil.h> header file. */ | /* Define to 1 if you have the <security/pam_modutil.h> header file. */ | |||
#define HAVE_SECURITY_PAM_MODUTIL_H 1 | #define HAVE_SECURITY_PAM_MODUTIL_H 1 | |||
/* Define if SELinux is available */ | /* Define if SELinux is available */ | |||
skipping to change at line 103 | skipping to change at line 123 | |||
/* Define to 1 if you have the <sys/types.h> header file. */ | /* Define to 1 if you have the <sys/types.h> header file. */ | |||
#define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_TYPES_H 1 | |||
/* Define to 1 if you have the <unistd.h> header file. */ | /* Define to 1 if you have the <unistd.h> header file. */ | |||
#define HAVE_UNISTD_H 1 | #define HAVE_UNISTD_H 1 | |||
/* Define if XZ is available */ | /* Define if XZ is available */ | |||
#define HAVE_XZ 1 | #define HAVE_XZ 1 | |||
/* Define to 1 if you have the `__secure_getenv' function. */ | ||||
#define HAVE___SECURE_GETENV 1 | ||||
/* Define to the sub-directory in which libtool stores uninstalled librarie s. | /* Define to the sub-directory in which libtool stores uninstalled librarie s. | |||
*/ | */ | |||
#define LT_OBJDIR ".libs/" | #define LT_OBJDIR ".libs/" | |||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */ | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ | |||
/* #undef NO_MINUS_C_MINUS_O */ | /* #undef NO_MINUS_C_MINUS_O */ | |||
/* 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 189" | #define PACKAGE_STRING "systemd 190" | |||
/* 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 "189" | #define PACKAGE_VERSION "190" | |||
/* Define to 1 if you have the ANSI C header files. */ | /* Define to 1 if you have the ANSI C header files. */ | |||
#define STDC_HEADERS 1 | #define STDC_HEADERS 1 | |||
/* Target is ALTLinux */ | /* Target is ALTLinux */ | |||
/* #undef TARGET_ALTLINUX */ | /* #undef TARGET_ALTLINUX */ | |||
/* Target is Ångström */ | /* Target is Ångström */ | |||
/* #undef TARGET_ANGSTROM */ | /* #undef TARGET_ANGSTROM */ | |||
skipping to change at line 195 | skipping to change at line 218 | |||
/* 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 "189" | #define VERSION "190" | |||
/* 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. 8 change blocks. | ||||
3 lines changed or deleted | 27 lines changed or added | |||
dbus-common.h | dbus-common.h | |||
---|---|---|---|---|
skipping to change at line 216 | skipping to change at line 216 | |||
bool bus_error_is_no_service(const DBusError *error); | bool bus_error_is_no_service(const DBusError *error); | |||
int bus_method_call_with_reply(DBusConnection *bus, | int bus_method_call_with_reply(DBusConnection *bus, | |||
const char *destination, | const char *destination, | |||
const char *path, | const char *path, | |||
const char *interface, | const char *interface, | |||
const char *method, | const char *method, | |||
DBusMessage **return_reply, | DBusMessage **return_reply, | |||
DBusError *return_error, | DBusError *return_error, | |||
int first_arg_type, ...); | int first_arg_type, ...); | |||
void dbus_message_unref_p(DBusMessage **reply); | ||||
#define _cleanup_dbus_msg_unref_ __attribute__((cleanup(dbus_message_unref_ | ||||
p))) | ||||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 0 lines changed or added | |||
dbus.h | dbus.h | |||
---|---|---|---|---|
skipping to change at line 45 | skipping to change at line 45 | |||
int bus_query_pid(Manager *m, const char *name); | int bus_query_pid(Manager *m, const char *name); | |||
int bus_broadcast(Manager *m, DBusMessage *message); | int bus_broadcast(Manager *m, DBusMessage *message); | |||
bool bus_has_subscriber(Manager *m); | bool bus_has_subscriber(Manager *m); | |||
bool bus_connection_has_subscriber(Manager *m, DBusConnection *c); | bool bus_connection_has_subscriber(Manager *m, DBusConnection *c); | |||
int bus_fdset_add_all(Manager *m, FDSet *fds); | int bus_fdset_add_all(Manager *m, FDSet *fds); | |||
void bus_broadcast_finished(Manager *m, usec_t kernel_usec, usec_t initrd_u sec, usec_t userspace_usec, usec_t total_usec); | void bus_broadcast_finished(Manager *m, usec_t firmware_usec, usec_t loader _usec, usec_t kernel_usec, usec_t initrd_usec, usec_t userspace_usec, usec_ t total_usec); | |||
#define BUS_CONNECTION_SUBSCRIBED(m, c) dbus_connection_get_data((c), (m)-> subscribed_data_slot) | #define BUS_CONNECTION_SUBSCRIBED(m, c) dbus_connection_get_data((c), (m)-> subscribed_data_slot) | |||
#define BUS_PENDING_CALL_NAME(m, p) dbus_pending_call_get_data((p), (m)->na me_data_slot) | #define BUS_PENDING_CALL_NAME(m, p) dbus_pending_call_get_data((p), (m)->na me_data_slot) | |||
extern const char * const bus_interface_table[]; | extern const char * const bus_interface_table[]; | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
hwclock.h | hwclock.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/>. | |||
***/ | ***/ | |||
int hwclock_is_localtime(void); | int hwclock_is_localtime(void); | |||
int hwclock_apply_localtime_delta(int *min); | int hwclock_set_timezone(int *min); | |||
int hwclock_reset_localtime_delta(void); | int hwclock_reset_timezone(void); | |||
int hwclock_get_time(struct tm *tm); | int hwclock_get_time(struct tm *tm); | |||
int hwclock_set_time(const struct tm *tm); | int hwclock_set_time(const struct tm *tm); | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
install.h | install.h | |||
---|---|---|---|---|
skipping to change at line 43 | skipping to change at line 43 | |||
typedef enum UnitFileState { | typedef enum UnitFileState { | |||
UNIT_FILE_ENABLED, | UNIT_FILE_ENABLED, | |||
UNIT_FILE_ENABLED_RUNTIME, | UNIT_FILE_ENABLED_RUNTIME, | |||
UNIT_FILE_LINKED, | UNIT_FILE_LINKED, | |||
UNIT_FILE_LINKED_RUNTIME, | UNIT_FILE_LINKED_RUNTIME, | |||
UNIT_FILE_MASKED, | UNIT_FILE_MASKED, | |||
UNIT_FILE_MASKED_RUNTIME, | UNIT_FILE_MASKED_RUNTIME, | |||
UNIT_FILE_STATIC, | UNIT_FILE_STATIC, | |||
UNIT_FILE_DISABLED, | UNIT_FILE_DISABLED, | |||
UNIT_FILE_INVALID, | ||||
_UNIT_FILE_STATE_MAX, | _UNIT_FILE_STATE_MAX, | |||
_UNIT_FILE_STATE_INVALID = -1 | _UNIT_FILE_STATE_INVALID = -1 | |||
} UnitFileState; | } UnitFileState; | |||
typedef enum UnitFileChangeType { | typedef enum UnitFileChangeType { | |||
UNIT_FILE_SYMLINK, | UNIT_FILE_SYMLINK, | |||
UNIT_FILE_UNLINK, | UNIT_FILE_UNLINK, | |||
_UNIT_FILE_CHANGE_TYPE_MAX, | _UNIT_FILE_CHANGE_TYPE_MAX, | |||
_UNIT_FILE_CHANGE_TYPE_INVALID = -1 | _UNIT_FILE_CHANGE_TYPE_INVALID = -1 | |||
} UnitFileChangeType; | } UnitFileChangeType; | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
journal-authenticate.h | journal-authenticate.h | |||
---|---|---|---|---|
skipping to change at line 36 | skipping to change at line 36 | |||
#include "journal-file.h" | #include "journal-file.h" | |||
int journal_file_append_tag(JournalFile *f); | int journal_file_append_tag(JournalFile *f); | |||
int journal_file_maybe_append_tag(JournalFile *f, uint64_t realtime); | int journal_file_maybe_append_tag(JournalFile *f, uint64_t realtime); | |||
int journal_file_append_first_tag(JournalFile *f); | int journal_file_append_first_tag(JournalFile *f); | |||
int journal_file_hmac_setup(JournalFile *f); | int journal_file_hmac_setup(JournalFile *f); | |||
int journal_file_hmac_start(JournalFile *f); | int journal_file_hmac_start(JournalFile *f); | |||
int journal_file_hmac_put_header(JournalFile *f); | int journal_file_hmac_put_header(JournalFile *f); | |||
int journal_file_hmac_put_object(JournalFile *f, int type, uint64_t p); | int journal_file_hmac_put_object(JournalFile *f, int type, Object *o, uint6 4_t p); | |||
int journal_file_fss_load(JournalFile *f); | int journal_file_fss_load(JournalFile *f); | |||
int journal_file_parse_verification_key(JournalFile *f, const char *key); | int journal_file_parse_verification_key(JournalFile *f, const char *key); | |||
int journal_file_fsprg_evolve(JournalFile *f, uint64_t realtime); | int journal_file_fsprg_evolve(JournalFile *f, uint64_t realtime); | |||
int journal_file_fsprg_seek(JournalFile *f, uint64_t epoch); | int journal_file_fsprg_seek(JournalFile *f, uint64_t epoch); | |||
bool journal_file_next_evolve_usec(JournalFile *f, usec_t *u); | bool journal_file_next_evolve_usec(JournalFile *f, usec_t *u); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
journald-syslog.h | journald-syslog.h | |||
---|---|---|---|---|
skipping to change at line 35 | skipping to change at line 35 | |||
int syslog_fixup_facility(int priority); | int syslog_fixup_facility(int priority); | |||
void syslog_parse_priority(char **p, int *priority); | void syslog_parse_priority(char **p, int *priority); | |||
void syslog_parse_identifier(const char **buf, char **identifier, char **pi d); | void syslog_parse_identifier(const char **buf, char **identifier, char **pi d); | |||
void server_forward_syslog(Server *s, int priority, const char *identifier, const char *message, struct ucred *ucred, struct timeval *tv); | void server_forward_syslog(Server *s, int priority, const char *identifier, const char *message, struct ucred *ucred, struct timeval *tv); | |||
void server_process_syslog_message(Server *s, const char *buf, struct ucred *ucred, struct timeval *tv, const char *label, size_t label_len); | void server_process_syslog_message(Server *s, const char *buf, struct ucred *ucred, struct timeval *tv, const char *label, size_t label_len); | |||
int server_open_syslog_socket(Server *s); | int server_open_syslog_socket(Server *s); | |||
void server_maybe_warn_forward_syslog_missed(Server *s); | ||||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 0 lines changed or added | |||
journald.h | journald.h | |||
---|---|---|---|---|
skipping to change at line 44 | skipping to change at line 44 | |||
typedef enum Storage { | typedef enum Storage { | |||
STORAGE_AUTO, | STORAGE_AUTO, | |||
STORAGE_VOLATILE, | STORAGE_VOLATILE, | |||
STORAGE_PERSISTENT, | STORAGE_PERSISTENT, | |||
STORAGE_NONE, | STORAGE_NONE, | |||
_STORAGE_MAX, | _STORAGE_MAX, | |||
_STORAGE_INVALID = -1 | _STORAGE_INVALID = -1 | |||
} Storage; | } Storage; | |||
typedef enum SplitMode { | ||||
SPLIT_LOGIN, | ||||
SPLIT_UID, | ||||
SPLIT_NONE, | ||||
_SPLIT_MAX, | ||||
_SPLIT_INVALID = -1 | ||||
} SplitMode; | ||||
typedef struct StdoutStream StdoutStream; | typedef struct StdoutStream StdoutStream; | |||
typedef struct Server { | typedef struct Server { | |||
int epoll_fd; | int epoll_fd; | |||
int signal_fd; | int signal_fd; | |||
int syslog_fd; | int syslog_fd; | |||
int native_fd; | int native_fd; | |||
int stdout_fd; | int stdout_fd; | |||
int dev_kmsg_fd; | int dev_kmsg_fd; | |||
skipping to change at line 77 | skipping to change at line 85 | |||
JournalMetrics runtime_metrics; | JournalMetrics runtime_metrics; | |||
JournalMetrics system_metrics; | JournalMetrics system_metrics; | |||
bool compress; | bool compress; | |||
bool seal; | bool seal; | |||
bool forward_to_kmsg; | bool forward_to_kmsg; | |||
bool forward_to_syslog; | bool forward_to_syslog; | |||
bool forward_to_console; | bool forward_to_console; | |||
unsigned n_forward_syslog_missed; | ||||
usec_t last_warn_forward_syslog_missed; | ||||
uint64_t cached_available_space; | uint64_t cached_available_space; | |||
usec_t cached_available_space_timestamp; | usec_t cached_available_space_timestamp; | |||
uint64_t var_available_timestamp; | uint64_t var_available_timestamp; | |||
gid_t file_gid; | gid_t file_gid; | |||
bool file_gid_valid; | bool file_gid_valid; | |||
LIST_HEAD(StdoutStream, stdout_streams); | LIST_HEAD(StdoutStream, stdout_streams); | |||
unsigned n_stdout_streams; | unsigned n_stdout_streams; | |||
char *tty_path; | char *tty_path; | |||
int max_level_store; | int max_level_store; | |||
int max_level_syslog; | int max_level_syslog; | |||
int max_level_kmsg; | int max_level_kmsg; | |||
int max_level_console; | int max_level_console; | |||
Storage storage; | Storage storage; | |||
SplitMode split_mode; | ||||
MMapCache *mmap; | MMapCache *mmap; | |||
bool dev_kmsg_readable; | bool dev_kmsg_readable; | |||
uint64_t *kernel_seqnum; | uint64_t *kernel_seqnum; | |||
struct udev *udev; | struct udev *udev; | |||
} Server; | } Server; | |||
skipping to change at line 120 | skipping to change at line 132 | |||
void server_dispatch_message(Server *s, struct iovec *iovec, unsigned n, un signed m, struct ucred *ucred, struct timeval *tv, const char *label, size_ t label_len, const char *unit_id, int priority); | void server_dispatch_message(Server *s, struct iovec *iovec, unsigned n, un signed m, struct ucred *ucred, struct timeval *tv, const char *label, size_ t label_len, const char *unit_id, int priority); | |||
void server_driver_message(Server *s, sd_id128_t message_id, const char *fo rmat, ...); | void server_driver_message(Server *s, sd_id128_t message_id, const char *fo rmat, ...); | |||
/* gperf lookup function */ | /* gperf lookup function */ | |||
const struct ConfigPerfItem* journald_gperf_lookup(const char *key, unsigne d length); | const struct ConfigPerfItem* journald_gperf_lookup(const char *key, unsigne d length); | |||
int config_parse_storage(const char *filename, unsigned line, const char *s ection, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); | int config_parse_storage(const char *filename, unsigned line, const char *s ection, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); | |||
const char *storage_to_string(Storage s); | const char *storage_to_string(Storage s); | |||
Storage storage_from_string(const char *s); | Storage storage_from_string(const char *s); | |||
int config_parse_split_mode(const char *filename, unsigned line, const char | ||||
*section, const char *lvalue, int ltype, const char *rvalue, void *data, v | ||||
oid *userdata); | ||||
const char *split_mode_to_string(SplitMode s); | ||||
SplitMode split_mode_from_string(const char *s); | ||||
End of changes. 4 change blocks. | ||||
0 lines changed or deleted | 12 lines changed or added | |||
libudev-private.h | libudev-private.h | |||
---|---|---|---|---|
skipping to change at line 152 | skipping to change at line 152 | |||
/* libudev-util.c */ | /* libudev-util.c */ | |||
#define UTIL_PATH_SIZE 1024 | #define UTIL_PATH_SIZE 1024 | |||
#define UTIL_NAME_SIZE 512 | #define UTIL_NAME_SIZE 512 | |||
#define UTIL_LINE_SIZE 16384 | #define UTIL_LINE_SIZE 16384 | |||
#define UDEV_ALLOWED_CHARS_INPUT "/ $%?," | #define UDEV_ALLOWED_CHARS_INPUT "/ $%?," | |||
ssize_t util_get_sys_core_link_value(struct udev *udev, const char *slink, const char *syspath, char *value, size_t size); | ssize_t util_get_sys_core_link_value(struct udev *udev, const char *slink, const char *syspath, char *value, size_t size); | |||
int util_resolve_sys_link(struct udev *udev, char *syspath, size_t size); | int util_resolve_sys_link(struct udev *udev, char *syspath, size_t size); | |||
int util_log_priority(const char *priority); | int util_log_priority(const char *priority); | |||
size_t util_path_encode(const char *src, char *dest, size_t size); | size_t util_path_encode(const char *src, char *dest, size_t size); | |||
size_t util_path_decode(char *s); | ||||
void util_remove_trailing_chars(char *path, char c); | void util_remove_trailing_chars(char *path, char c); | |||
size_t util_strpcpy(char **dest, size_t size, const char *src); | size_t util_strpcpy(char **dest, size_t size, const char *src); | |||
size_t util_strpcpyl(char **dest, size_t size, const char *src, ...) __attr ibute__((sentinel)); | size_t util_strpcpyl(char **dest, size_t size, const char *src, ...) __attr ibute__((sentinel)); | |||
size_t util_strscpy(char *dest, size_t size, const char *src); | size_t util_strscpy(char *dest, size_t size, const char *src); | |||
size_t util_strscpyl(char *dest, size_t size, const char *src, ...) __attri bute__((sentinel)); | size_t util_strscpyl(char *dest, size_t size, const char *src, ...) __attri bute__((sentinel)); | |||
int util_replace_whitespace(const char *str, char *to, size_t len); | int util_replace_whitespace(const char *str, char *to, size_t len); | |||
int util_replace_chars(char *str, const char *white); | int util_replace_chars(char *str, const char *white); | |||
unsigned int util_string_hash32(const char *key); | unsigned int util_string_hash32(const char *key); | |||
uint64_t util_string_bloom64(const char *str); | uint64_t util_string_bloom64(const char *str); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 0 lines changed or added | |||
log.h | log.h | |||
---|---|---|---|---|
skipping to change at line 73 | skipping to change at line 73 | |||
void log_forget_fds(void); | void log_forget_fds(void); | |||
void log_close_syslog(void); | void log_close_syslog(void); | |||
void log_close_journal(void); | void log_close_journal(void); | |||
void log_close_kmsg(void); | void log_close_kmsg(void); | |||
void log_close_console(void); | void log_close_console(void); | |||
void log_parse_environment(void); | void log_parse_environment(void); | |||
int log_meta( | int log_meta( | |||
int level, | int level, | |||
const char*file, | const char*file, | |||
int line, | int line, | |||
const char *func, | const char *func, | |||
const char *format, ...) _printf_attr_(5,6); | const char *format, ...) _printf_attr_(5,6); | |||
int log_metav( | int log_metav( | |||
int level, | int level, | |||
const char*file, | const char*file, | |||
int line, | int line, | |||
const char *func, | const char *func, | |||
const char *format, | const char *format, | |||
va_list ap); | va_list ap); | |||
_noreturn_ void log_assert_failed(const char *text, const char *file, int l | int log_struct_internal( | |||
ine, const char *func); | int level, | |||
_noreturn_ void log_assert_failed_unreachable(const char *text, const char | const char *file, | |||
*file, int line, const char *func); | int line, | |||
const char *func, | ||||
const char *format, ...) _sentinel_; | ||||
int log_oom_internal( | ||||
const char *file, | ||||
int line, | ||||
const char *func); | ||||
/* This modifies the buffer passed! */ | /* This modifies the buffer passed! */ | |||
int log_dump_internal( | int log_dump_internal( | |||
int level, | int level, | |||
const char*file, | const char*file, | |||
int line, | int line, | |||
const char *func, | const char *func, | |||
char *buffer); | char *buffer); | |||
_noreturn_ void log_assert_failed( | ||||
const char *text, | ||||
const char *file, | ||||
int line, | ||||
const char *func); | ||||
_noreturn_ void log_assert_failed_unreachable( | ||||
const char *text, | ||||
const char *file, | ||||
int line, | ||||
const char *func); | ||||
#define log_full(level, ...) log_meta(level, __FILE__, __LINE__, __func__ , __VA_ARGS__) | #define log_full(level, ...) log_meta(level, __FILE__, __LINE__, __func__ , __VA_ARGS__) | |||
#define log_debug(...) log_meta(LOG_DEBUG, __FILE__, __LINE__, __func__ , __VA_ARGS__) | #define log_debug(...) log_meta(LOG_DEBUG, __FILE__, __LINE__, __func__ , __VA_ARGS__) | |||
#define log_info(...) log_meta(LOG_INFO, __FILE__, __LINE__, __func__ , __VA_ARGS__) | #define log_info(...) log_meta(LOG_INFO, __FILE__, __LINE__, __func__ , __VA_ARGS__) | |||
#define log_notice(...) log_meta(LOG_NOTICE, __FILE__, __LINE__, __func__ , __VA_ARGS__) | #define log_notice(...) log_meta(LOG_NOTICE, __FILE__, __LINE__, __func__ , __VA_ARGS__) | |||
#define log_warning(...) log_meta(LOG_WARNING, __FILE__, __LINE__, __func__ , __VA_ARGS__) | #define log_warning(...) log_meta(LOG_WARNING, __FILE__, __LINE__, __func__ , __VA_ARGS__) | |||
#define log_error(...) log_meta(LOG_ERR, __FILE__, __LINE__, __func__ , __VA_ARGS__) | #define log_error(...) log_meta(LOG_ERR, __FILE__, __LINE__, __func__ , __VA_ARGS__) | |||
int __log_oom(const char *file, int line, const char *func); | #define log_struct(level, ...) log_struct_internal(level, __FILE__, __LINE_ | |||
#define log_oom() __log_oom(__FILE__, __LINE__, __func__) | _, __func__, __VA_ARGS__) | |||
#define log_oom() log_oom_internal(__FILE__, __LINE__, __func__) | ||||
/* This modifies the buffer passed! */ | /* This modifies the buffer passed! */ | |||
#define log_dump(level, buffer) log_dump_internal(level, __FILE__, __LINE__ , __func__, buffer) | #define log_dump(level, buffer) log_dump_internal(level, __FILE__, __LINE__ , __func__, buffer) | |||
bool log_on_console(void); | ||||
const char *log_target_to_string(LogTarget target); | const char *log_target_to_string(LogTarget target); | |||
LogTarget log_target_from_string(const char *s); | LogTarget log_target_from_string(const char *s); | |||
End of changes. 5 change blocks. | ||||
23 lines changed or deleted | 46 lines changed or added | |||
logind-button.h | logind-button.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/>. | |||
***/ | ***/ | |||
typedef struct Button Button; | typedef struct Button Button; | |||
typedef enum HandleButton { | typedef enum HandleButton { | |||
HANDLE_OFF, | HANDLE_IGNORE, | |||
HANDLE_NO_SESSION, /* Only handle key when nobody is logged in; h | HANDLE_POWEROFF, | |||
onour inhibitors */ | HANDLE_REBOOT, | |||
HANDLE_TTY_SESSION, /* Only handle key when nobody is logged in, o | HANDLE_HALT, | |||
r the fg session is the only one and non-graphical; honour inhibitors */ | HANDLE_KEXEC, | |||
HANDLE_ANY_SESSION, /* Only handle key when nobody is logged in, o | HANDLE_SUSPEND, | |||
r the fg session is the only one; honour inhibtors */ | HANDLE_HIBERNATE, | |||
HANDLE_ALWAYS, /* Always handle, ignore sessions; ignore inhi | ||||
bitors */ | ||||
_HANDLE_BUTTON_MAX, | _HANDLE_BUTTON_MAX, | |||
_HANDLE_BUTTON_INVALID = -1 | _HANDLE_BUTTON_INVALID = -1 | |||
} HandleButton; | } HandleButton; | |||
#include "list.h" | #include "list.h" | |||
#include "util.h" | #include "util.h" | |||
#include "logind.h" | #include "logind.h" | |||
struct Button { | struct Button { | |||
Manager *manager; | Manager *manager; | |||
char *name; | char *name; | |||
char *seat; | char *seat; | |||
int fd; | int fd; | |||
bool lid_close_queued; | ||||
}; | }; | |||
Button* button_new(Manager *m, const char *name); | Button* button_new(Manager *m, const char *name); | |||
void button_free(Button*b); | void button_free(Button*b); | |||
int button_open(Button *b); | int button_open(Button *b); | |||
int button_process(Button *b); | int button_process(Button *b); | |||
int button_recheck(Button *b); | ||||
int button_set_seat(Button *b, const char *sn); | int button_set_seat(Button *b, const char *sn); | |||
const char* handle_button_to_string(HandleButton h); | const char* handle_button_to_string(HandleButton h); | |||
HandleButton handle_button_from_string(const char *s); | HandleButton handle_button_from_string(const char *s); | |||
int config_parse_handle_button(const char *filename, unsigned line, const c har *section, const char *lvalue, int ltype, const char *rvalue, void *data , void *userdata); | int config_parse_handle_button(const char *filename, unsigned line, const c har *section, const char *lvalue, int ltype, const char *rvalue, void *data , void *userdata); | |||
#endif | #endif | |||
End of changes. 3 change blocks. | ||||
9 lines changed or deleted | 10 lines changed or added | |||
logind-inhibit.h | logind-inhibit.h | |||
---|---|---|---|---|
skipping to change at line 34 | skipping to change at line 34 | |||
typedef struct Inhibitor Inhibitor; | typedef struct Inhibitor Inhibitor; | |||
#include "list.h" | #include "list.h" | |||
#include "util.h" | #include "util.h" | |||
typedef enum InhibitWhat { | typedef enum InhibitWhat { | |||
INHIBIT_SHUTDOWN = 1, | INHIBIT_SHUTDOWN = 1, | |||
INHIBIT_SLEEP = 2, | INHIBIT_SLEEP = 2, | |||
INHIBIT_IDLE = 4, | INHIBIT_IDLE = 4, | |||
_INHIBIT_WHAT_MAX = 8, | INHIBIT_HANDLE_POWER_KEY = 8, | |||
INHIBIT_HANDLE_SLEEP_KEY = 16, | ||||
INHIBIT_HANDLE_LID_SWITCH = 32, | ||||
_INHIBIT_WHAT_MAX = 64, | ||||
_INHIBIT_WHAT_INVALID = -1 | _INHIBIT_WHAT_INVALID = -1 | |||
} InhibitWhat; | } InhibitWhat; | |||
typedef enum InhibitMode { | typedef enum InhibitMode { | |||
INHIBIT_BLOCK, | INHIBIT_BLOCK, | |||
INHIBIT_DELAY, | INHIBIT_DELAY, | |||
_INHIBIT_MODE_MAX, | _INHIBIT_MODE_MAX, | |||
_INHIBIT_MODE_INVALID = -1 | _INHIBIT_MODE_INVALID = -1 | |||
} InhibitMode; | } InhibitMode; | |||
skipping to change at line 83 | skipping to change at line 86 | |||
int inhibitor_save(Inhibitor *i); | int inhibitor_save(Inhibitor *i); | |||
int inhibitor_load(Inhibitor *i); | int inhibitor_load(Inhibitor *i); | |||
int inhibitor_start(Inhibitor *i); | int inhibitor_start(Inhibitor *i); | |||
int inhibitor_stop(Inhibitor *i); | int inhibitor_stop(Inhibitor *i); | |||
int inhibitor_create_fifo(Inhibitor *i); | int inhibitor_create_fifo(Inhibitor *i); | |||
void inhibitor_remove_fifo(Inhibitor *i); | void inhibitor_remove_fifo(Inhibitor *i); | |||
InhibitWhat manager_inhibit_what(Manager *m, InhibitMode mm); | InhibitWhat manager_inhibit_what(Manager *m, InhibitMode mm); | |||
bool manager_is_inhibited(Manager *m, InhibitWhat w, InhibitMode mm, dual_t imestamp *since); | bool manager_is_inhibited(Manager *m, InhibitWhat w, InhibitMode mm, dual_t imestamp *since, bool only_active); | |||
const char *inhibit_what_to_string(InhibitWhat k); | const char *inhibit_what_to_string(InhibitWhat k); | |||
InhibitWhat inhibit_what_from_string(const char *s); | InhibitWhat inhibit_what_from_string(const char *s); | |||
const char *inhibit_mode_to_string(InhibitMode k); | const char *inhibit_mode_to_string(InhibitMode k); | |||
InhibitMode inhibit_mode_from_string(const char *s); | InhibitMode inhibit_mode_from_string(const char *s); | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 5 lines changed or added | |||
logind.h | logind.h | |||
---|---|---|---|---|
skipping to change at line 71 | skipping to change at line 71 | |||
int udev_seat_fd; | int udev_seat_fd; | |||
int udev_vcsa_fd; | int udev_vcsa_fd; | |||
int udev_button_fd; | int udev_button_fd; | |||
int console_active_fd; | int console_active_fd; | |||
int bus_fd; | int bus_fd; | |||
int epoll_fd; | int epoll_fd; | |||
unsigned n_autovts; | unsigned n_autovts; | |||
unsigned reserve_vt; | ||||
int reserve_vt_fd; | ||||
Seat *vtconsole; | Seat *vtconsole; | |||
char *cgroup_path; | char *cgroup_path; | |||
char **controllers, **reset_controllers; | char **controllers, **reset_controllers; | |||
char **kill_only_users, **kill_exclude_users; | char **kill_only_users, **kill_exclude_users; | |||
bool kill_user_processes; | bool kill_user_processes; | |||
unsigned long session_counter; | unsigned long session_counter; | |||
skipping to change at line 102 | skipping to change at line 105 | |||
over */ | over */ | |||
const char *delayed_unit; | const char *delayed_unit; | |||
InhibitWhat delayed_what; | InhibitWhat delayed_what; | |||
usec_t delayed_timestamp; | usec_t delayed_timestamp; | |||
usec_t inhibit_delay_max; | usec_t inhibit_delay_max; | |||
HandleButton handle_power_key; | HandleButton handle_power_key; | |||
HandleButton handle_sleep_key; | HandleButton handle_sleep_key; | |||
HandleButton handle_lid_switch; | HandleButton handle_lid_switch; | |||
bool power_key_ignore_inhibited; | ||||
bool sleep_key_ignore_inhibited; | ||||
bool lid_switch_ignore_inhibited; | ||||
}; | }; | |||
enum { | enum { | |||
FD_SEAT_UDEV, | FD_SEAT_UDEV, | |||
FD_VCSA_UDEV, | FD_VCSA_UDEV, | |||
FD_BUTTON_UDEV, | FD_BUTTON_UDEV, | |||
FD_CONSOLE, | FD_CONSOLE, | |||
FD_BUS, | FD_BUS, | |||
FD_OTHER_BASE | FD_OTHER_BASE | |||
}; | }; | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 7 lines changed or added | |||
logs-show.h | logs-show.h | |||
---|---|---|---|---|
skipping to change at line 36 | skipping to change at line 36 | |||
#include <systemd/sd-journal.h> | #include <systemd/sd-journal.h> | |||
#include "util.h" | #include "util.h" | |||
typedef enum OutputMode { | typedef enum OutputMode { | |||
OUTPUT_SHORT, | OUTPUT_SHORT, | |||
OUTPUT_SHORT_MONOTONIC, | OUTPUT_SHORT_MONOTONIC, | |||
OUTPUT_VERBOSE, | OUTPUT_VERBOSE, | |||
OUTPUT_EXPORT, | OUTPUT_EXPORT, | |||
OUTPUT_JSON, | OUTPUT_JSON, | |||
OUTPUT_JSON_PRETTY, | ||||
OUTPUT_CAT, | OUTPUT_CAT, | |||
_OUTPUT_MODE_MAX, | _OUTPUT_MODE_MAX, | |||
_OUTPUT_MODE_INVALID = -1 | _OUTPUT_MODE_INVALID = -1 | |||
} OutputMode; | } OutputMode; | |||
typedef enum OutputFlags { | typedef enum OutputFlags { | |||
OUTPUT_SHOW_ALL = 1 << 0, | OUTPUT_SHOW_ALL = 1 << 0, | |||
OUTPUT_MONOTONIC_MODE = 1 << 1, | OUTPUT_FOLLOW = 1 << 1, | |||
OUTPUT_FOLLOW = 1 << 2, | OUTPUT_WARN_CUTOFF = 1 << 2, | |||
OUTPUT_WARN_CUTOFF = 1 << 3, | OUTPUT_FULL_WIDTH = 1 << 3, | |||
OUTPUT_FULL_WIDTH = 1 << 4, | OUTPUT_COLOR = 1 << 4 | |||
OUTPUT_COLOR = 1 << 5 | ||||
} OutputFlags; | } OutputFlags; | |||
int output_journal(sd_journal *j, OutputMode mode, unsigned line, | int output_journal(sd_journal *j, OutputMode mode, unsigned line, | |||
unsigned n_columns, OutputFlags flags); | unsigned n_columns, OutputFlags flags); | |||
int show_journal_by_unit( | int show_journal_by_unit( | |||
const char *unit, | const char *unit, | |||
OutputMode mode, | OutputMode mode, | |||
unsigned n_columns, | unsigned n_columns, | |||
usec_t not_before, | usec_t not_before, | |||
End of changes. 2 change blocks. | ||||
5 lines changed or deleted | 5 lines changed or added | |||
macro.h | macro.h | |||
---|---|---|---|---|
skipping to change at line 190 | skipping to change at line 190 | |||
sub = MIN(i[j].iov_len, k); | sub = MIN(i[j].iov_len, k); | |||
i[j].iov_len -= sub; | i[j].iov_len -= sub; | |||
i[j].iov_base = (uint8_t*) i[j].iov_base + sub; | i[j].iov_base = (uint8_t*) i[j].iov_base + sub; | |||
k -= sub; | k -= sub; | |||
} | } | |||
return k; | return k; | |||
} | } | |||
#define _cleanup_free_ __attribute__((cleanup(freep))) | ||||
#define _cleanup_fclose_ __attribute__((cleanup(fclosep))) | ||||
#define _cleanup_close_ __attribute__((cleanup(closep))) | ||||
#define _cleanup_closedir_ __attribute__((cleanup(closedirp))) | ||||
#define _cleanup_umask_ __attribute__((cleanup(umaskp))) | ||||
#include "log.h" | #include "log.h" | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 6 lines changed or added | |||
manager.h | manager.h | |||
---|---|---|---|---|
skipping to change at line 52 | skipping to change at line 52 | |||
MANAGER_REEXECUTE, | MANAGER_REEXECUTE, | |||
MANAGER_REBOOT, | MANAGER_REBOOT, | |||
MANAGER_POWEROFF, | MANAGER_POWEROFF, | |||
MANAGER_HALT, | MANAGER_HALT, | |||
MANAGER_KEXEC, | MANAGER_KEXEC, | |||
MANAGER_SWITCH_ROOT, | MANAGER_SWITCH_ROOT, | |||
_MANAGER_EXIT_CODE_MAX, | _MANAGER_EXIT_CODE_MAX, | |||
_MANAGER_EXIT_CODE_INVALID = -1 | _MANAGER_EXIT_CODE_INVALID = -1 | |||
} ManagerExitCode; | } ManagerExitCode; | |||
typedef enum ManagerRunningAs { | ||||
MANAGER_SYSTEM, | ||||
MANAGER_USER, | ||||
_MANAGER_RUNNING_AS_MAX, | ||||
_MANAGER_RUNNING_AS_INVALID = -1 | ||||
} ManagerRunningAs; | ||||
enum WatchType { | enum WatchType { | |||
WATCH_INVALID, | WATCH_INVALID, | |||
WATCH_SIGNAL, | WATCH_SIGNAL, | |||
WATCH_NOTIFY, | WATCH_NOTIFY, | |||
WATCH_FD, | WATCH_FD, | |||
WATCH_UNIT_TIMER, | WATCH_UNIT_TIMER, | |||
WATCH_JOB_TIMER, | WATCH_JOB_TIMER, | |||
WATCH_MOUNT, | WATCH_MOUNT, | |||
WATCH_SWAP, | WATCH_SWAP, | |||
WATCH_UDEV, | WATCH_UDEV, | |||
skipping to change at line 149 | skipping to change at line 142 | |||
LookupPaths lookup_paths; | LookupPaths lookup_paths; | |||
Set *unit_path_cache; | Set *unit_path_cache; | |||
char **environment; | char **environment; | |||
char **default_controllers; | char **default_controllers; | |||
usec_t runtime_watchdog; | usec_t runtime_watchdog; | |||
usec_t shutdown_watchdog; | usec_t shutdown_watchdog; | |||
dual_timestamp firmware_timestamp; | ||||
dual_timestamp loader_timestamp; | ||||
dual_timestamp kernel_timestamp; | ||||
dual_timestamp initrd_timestamp; | dual_timestamp initrd_timestamp; | |||
dual_timestamp startup_timestamp; | dual_timestamp userspace_timestamp; | |||
dual_timestamp finish_timestamp; | dual_timestamp finish_timestamp; | |||
char *generator_unit_path; | char *generator_unit_path; | |||
char *generator_unit_path_early; | char *generator_unit_path_early; | |||
char *generator_unit_path_late; | char *generator_unit_path_late; | |||
/* Data specific to the device subsystem */ | /* Data specific to the device subsystem */ | |||
struct udev* udev; | struct udev* udev; | |||
struct udev_monitor* udev_monitor; | struct udev_monitor* udev_monitor; | |||
Watch udev_watch; | Watch udev_watch; | |||
skipping to change at line 213 | skipping to change at line 209 | |||
/* Make sure the user cannot accidentally unmount our cgroup | /* Make sure the user cannot accidentally unmount our cgroup | |||
* file system */ | * file system */ | |||
int pin_cgroupfs_fd; | int pin_cgroupfs_fd; | |||
/* Audit fd */ | /* Audit fd */ | |||
#ifdef HAVE_AUDIT | #ifdef HAVE_AUDIT | |||
int audit_fd; | int audit_fd; | |||
#endif | #endif | |||
/* Flags */ | /* Flags */ | |||
ManagerRunningAs running_as; | SystemdRunningAs running_as; | |||
ManagerExitCode exit_code:5; | ManagerExitCode exit_code:5; | |||
bool dispatching_load_queue:1; | bool dispatching_load_queue:1; | |||
bool dispatching_run_queue:1; | bool dispatching_run_queue:1; | |||
bool dispatching_dbus_queue:1; | bool dispatching_dbus_queue:1; | |||
bool taint_usr:1; | bool taint_usr:1; | |||
bool show_status; | bool show_status; | |||
bool confirm_spawn; | bool confirm_spawn; | |||
skipping to change at line 242 | skipping to change at line 238 | |||
unsigned n_installed_jobs; | unsigned n_installed_jobs; | |||
unsigned n_failed_jobs; | unsigned n_failed_jobs; | |||
/* Type=idle pipes */ | /* Type=idle pipes */ | |||
int idle_pipe[2]; | int idle_pipe[2]; | |||
char *switch_root; | char *switch_root; | |||
char *switch_root_init; | char *switch_root_init; | |||
}; | }; | |||
int manager_new(ManagerRunningAs running_as, Manager **m); | int manager_new(SystemdRunningAs running_as, Manager **m); | |||
void manager_free(Manager *m); | void manager_free(Manager *m); | |||
int manager_enumerate(Manager *m); | int manager_enumerate(Manager *m); | |||
int manager_coldplug(Manager *m); | int manager_coldplug(Manager *m); | |||
int manager_startup(Manager *m, FILE *serialization, FDSet *fds); | int manager_startup(Manager *m, FILE *serialization, FDSet *fds); | |||
Job *manager_get_job(Manager *m, uint32_t id); | Job *manager_get_job(Manager *m, uint32_t id); | |||
Unit *manager_get_unit(Manager *m, const char *name); | Unit *manager_get_unit(Manager *m, const char *name); | |||
int manager_get_job_from_dbus_path(Manager *m, const char *s, Job **_j); | int manager_get_job_from_dbus_path(Manager *m, const char *s, Job **_j); | |||
skipping to change at line 303 | skipping to change at line 299 | |||
void manager_check_finished(Manager *m); | void manager_check_finished(Manager *m); | |||
void manager_run_generators(Manager *m); | void manager_run_generators(Manager *m); | |||
void manager_undo_generators(Manager *m); | void manager_undo_generators(Manager *m); | |||
void manager_recheck_journal(Manager *m); | void manager_recheck_journal(Manager *m); | |||
void manager_set_show_status(Manager *m, bool b); | void manager_set_show_status(Manager *m, bool b); | |||
bool manager_get_show_status(Manager *m); | bool manager_get_show_status(Manager *m); | |||
const char *manager_running_as_to_string(ManagerRunningAs i); | ||||
ManagerRunningAs manager_running_as_from_string(const char *s); | ||||
End of changes. 6 change blocks. | ||||
10 lines changed or deleted | 6 lines changed or added | |||
missing.h | missing.h | |||
---|---|---|---|---|
skipping to change at line 29 | skipping to change at line 29 | |||
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/>. | |||
***/ | ***/ | |||
/* Missing glibc definitions to access certain kernel APIs */ | /* Missing glibc definitions to access certain kernel APIs */ | |||
#include <sys/resource.h> | #include <sys/resource.h> | |||
#include <sys/syscall.h> | #include <sys/syscall.h> | |||
#include <fcntl.h> | #include <fcntl.h> | |||
#include <stdlib.h> | ||||
#include <unistd.h> | #include <unistd.h> | |||
#include <linux/oom.h> | #include <linux/oom.h> | |||
#ifdef HAVE_AUDIT | #ifdef HAVE_AUDIT | |||
#include <libaudit.h> | #include <libaudit.h> | |||
#endif | #endif | |||
#include "macro.h" | #include "macro.h" | |||
#ifdef ARCH_MIPS | #ifdef ARCH_MIPS | |||
skipping to change at line 86 | skipping to change at line 87 | |||
#endif | #endif | |||
#ifndef TIOCVHANGUP | #ifndef TIOCVHANGUP | |||
#define TIOCVHANGUP 0x5437 | #define TIOCVHANGUP 0x5437 | |||
#endif | #endif | |||
#ifndef IP_TRANSPARENT | #ifndef IP_TRANSPARENT | |||
#define IP_TRANSPARENT 19 | #define IP_TRANSPARENT 19 | |||
#endif | #endif | |||
#if !HAVE_DECL_PIVOT_ROOT | ||||
static inline int pivot_root(const char *new_root, const char *put_old) { | static inline int pivot_root(const char *new_root, const char *put_old) { | |||
return syscall(SYS_pivot_root, new_root, put_old); | return syscall(SYS_pivot_root, new_root, put_old); | |||
} | } | |||
#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 | |||
#elif defined _MIPS_SIM | #elif defined _MIPS_SIM | |||
# if _MIPS_SIM == _MIPS_SIM_ABI32 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | |||
skipping to change at line 129 | skipping to change at line 132 | |||
# 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 | |||
#endif | #endif | |||
#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 | ||||
#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, | |||
int dfd, const char *pathname) { | int dfd, const char *pathname) { | |||
#if defined _MIPS_SIM && _MIPS_SIM == _MIPS_SIM_ABI32 || defined __powerpc_ _ && !defined __powerpc64__ | #if defined _MIPS_SIM && _MIPS_SIM == _MIPS_SIM_ABI32 || defined __powerpc_ _ && !defined __powerpc64__ | |||
union { | union { | |||
uint64_t _64; | uint64_t _64; | |||
uint32_t _32[2]; | uint32_t _32[2]; | |||
} _mask; | } _mask; | |||
_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 | ||||
#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 | |||
struct btrfs_ioctl_vol_args { | struct btrfs_ioctl_vol_args { | |||
skipping to change at line 178 | skipping to change at line 185 | |||
#endif | #endif | |||
#ifndef MS_MOVE | #ifndef MS_MOVE | |||
#define MS_MOVE 8192 | #define MS_MOVE 8192 | |||
#endif | #endif | |||
#ifndef MS_PRIVATE | #ifndef MS_PRIVATE | |||
#define MS_PRIVATE (1 << 18) | #define MS_PRIVATE (1 << 18) | |||
#endif | #endif | |||
#if !HAVE_DECL_GETTID | ||||
static inline pid_t gettid(void) { | static inline pid_t gettid(void) { | |||
return (pid_t) syscall(SYS_gettid); | return (pid_t) syscall(SYS_gettid); | |||
} | } | |||
#endif | ||||
#ifndef SCM_SECURITY | #ifndef SCM_SECURITY | |||
#define SCM_SECURITY 0x03 | #define SCM_SECURITY 0x03 | |||
#endif | #endif | |||
#ifndef MS_STRICTATIME | #ifndef MS_STRICTATIME | |||
#define MS_STRICTATIME (1<<24) | #define MS_STRICTATIME (1<<24) | |||
#endif | #endif | |||
#ifndef PR_SET_NO_NEW_PRIVS | #ifndef PR_SET_NO_NEW_PRIVS | |||
#define PR_SET_NO_NEW_PRIVS 38 | #define PR_SET_NO_NEW_PRIVS 38 | |||
#endif | #endif | |||
#ifndef PR_SET_CHILD_SUBREAPER | #ifndef PR_SET_CHILD_SUBREAPER | |||
#define PR_SET_CHILD_SUBREAPER 36 | #define PR_SET_CHILD_SUBREAPER 36 | |||
#endif | #endif | |||
#ifndef MAX_HANDLE_SZ | ||||
#define MAX_HANDLE_SZ 128 | ||||
#endif | ||||
#ifdef __x86_64__ | ||||
# ifndef __NR_name_to_handle | ||||
# define __NR_name_to_handle 303 | ||||
# endif | ||||
#else | ||||
# ifndef __NR_name_to_handle | ||||
# define __NR_name_to_handle 341 | ||||
# endif | ||||
#endif | ||||
#ifndef HAVE_NAME_TO_HANDLE_AT | ||||
struct file_handle { | ||||
unsigned int handle_bytes; | ||||
int handle_type; | ||||
unsigned char f_handle[0]; | ||||
}; | ||||
static inline int name_to_handle_at(int fd, const char *name, struct file_h | ||||
andle *handle, int *mnt_id, int flags) { | ||||
return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, fl | ||||
ags); | ||||
} | ||||
#endif | ||||
#ifndef HAVE_SECURE_GETENV | ||||
# ifdef HAVE___SECURE_GETENV | ||||
# define secure_getenv __secure_getenv | ||||
# else | ||||
# error neither secure_getenv nor __secure_getenv are available | ||||
# endif | ||||
#endif | ||||
End of changes. 10 change blocks. | ||||
0 lines changed or deleted | 9 lines changed or added | |||
path-lookup.h | path-lookup.h | |||
---|---|---|---|---|
skipping to change at line 32 | skipping to change at line 32 | |||
***/ | ***/ | |||
typedef struct LookupPaths { | typedef struct LookupPaths { | |||
char **unit_path; | char **unit_path; | |||
#ifdef HAVE_SYSV_COMPAT | #ifdef HAVE_SYSV_COMPAT | |||
char **sysvinit_path; | char **sysvinit_path; | |||
char **sysvrcnd_path; | char **sysvrcnd_path; | |||
#endif | #endif | |||
} LookupPaths; | } LookupPaths; | |||
#include "manager.h" | typedef enum SystemdRunningAs { | |||
SYSTEMD_SYSTEM, | ||||
SYSTEMD_USER, | ||||
_SYSTEMD_RUNNING_AS_MAX, | ||||
_SYSTEMD_RUNNING_AS_INVALID = -1 | ||||
} SystemdRunningAs; | ||||
const char* systemd_running_as_to_string(SystemdRunningAs i); | ||||
SystemdRunningAs systemd_running_as_from_string(const char *s); | ||||
int user_config_home(char **config_home); | int user_config_home(char **config_home); | |||
int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool per sonal, const char *generator, const char *generator_early, const char *gene rator_late); | int lookup_paths_init(LookupPaths *p, SystemdRunningAs running_as, bool per sonal, const char *generator, const char *generator_early, const char *gene rator_late); | |||
void lookup_paths_free(LookupPaths *p); | void lookup_paths_free(LookupPaths *p); | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 10 lines changed or added | |||
path-util.h | path-util.h | |||
---|---|---|---|---|
skipping to change at line 35 | skipping to change at line 35 | |||
#include "stdbool.h" | #include "stdbool.h" | |||
bool is_path(const char *p); | bool is_path(const char *p); | |||
char **path_split_and_make_absolute(const char *p); | char **path_split_and_make_absolute(const char *p); | |||
char *path_get_file_name(const char *p); | char *path_get_file_name(const char *p); | |||
int path_get_parent(const char *path, char **parent); | int path_get_parent(const char *path, char **parent); | |||
bool path_is_absolute(const char *p); | bool path_is_absolute(const char *p); | |||
char *path_make_absolute(const char *p, const char *prefix); | char *path_make_absolute(const char *p, const char *prefix); | |||
char *path_make_absolute_cwd(const char *p); | char *path_make_absolute_cwd(const char *p); | |||
char *path_kill_slashes(char *path); | char *path_kill_slashes(char *path); | |||
bool 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_remove_empty(char **l); | char **path_strv_remove_empty(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 | #endif | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
sd-daemon.h | sd-daemon.h | |||
---|---|---|---|---|
skipping to change at line 62 | skipping to change at line 62 | |||
support. This makes all those calls NOPs that are directly related to | support. This makes all those calls NOPs that are directly related to | |||
systemd (i.e. only sd_is_xxx() will stay useful). | systemd (i.e. only sd_is_xxx() will stay useful). | |||
Since this is drop-in code we don't want any of our symbols to be | Since this is drop-in code we don't want any of our symbols to be | |||
exported in any case. Hence we declare hidden visibility for all of | exported in any case. Hence we declare hidden visibility for all of | |||
them. | them. | |||
You may find an up-to-date version of these source files online: | You may find an up-to-date version of these source files online: | |||
http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-daemon.h | http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-daemon.h | |||
http://cgit.freedesktop.org/systemd/systemd/plain/src/sd-daemon.c | http://cgit.freedesktop.org/systemd/systemd/plain/src/libsystemd-daemon/s d-daemon.c | |||
This should compile on non-Linux systems, too, but with the | This should compile on non-Linux systems, too, but with the | |||
exception of the sd_is_xxx() calls all functions will become NOPs. | exception of the sd_is_xxx() calls all functions will become NOPs. | |||
See sd-daemon(3) for more information. | See sd-daemon(3) for more information. | |||
*/ | */ | |||
#ifndef _sd_printf_attr_ | #ifndef _sd_printf_attr_ | |||
#if __GNUC__ >= 4 | #if __GNUC__ >= 4 | |||
#define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b))) | #define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b))) | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
sd-id128.h | sd-id128.h | |||
---|---|---|---|---|
skipping to change at line 59 | skipping to change at line 59 | |||
int sd_id128_get_boot(sd_id128_t *ret); | int sd_id128_get_boot(sd_id128_t *ret); | |||
#define SD_ID128_MAKE(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12 , v13, v14, v15) \ | #define SD_ID128_MAKE(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12 , v13, v14, v15) \ | |||
((sd_id128_t) { .bytes = { 0x##v0, 0x##v1, 0x##v2, 0x##v3, 0x##v4, 0x##v5, 0x##v6, 0x##v7, \ | ((sd_id128_t) { .bytes = { 0x##v0, 0x##v1, 0x##v2, 0x##v3, 0x##v4, 0x##v5, 0x##v6, 0x##v7, \ | |||
0x##v8, 0x##v9, 0x##v10, 0x##v11, 0x##v1 2, 0x##v13, 0x##v14, 0x##v15 }}) | 0x##v8, 0x##v9, 0x##v10, 0x##v11, 0x##v1 2, 0x##v13, 0x##v14, 0x##v15 }}) | |||
/* Note that SD_ID128_FORMAT_VAL will evaluate the passed argument 16 | /* Note that SD_ID128_FORMAT_VAL will evaluate the passed argument 16 | |||
* times. It is hence not a good idea to call this macro with an | * times. It is hence not a good idea to call this macro with an | |||
* expensive function as paramater or an expression with side | * expensive function as paramater or an expression with side | |||
* effects */ | * effects */ | |||
#define SD_ID128_FORMAT_STR "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%0 2x%02x%02x%02x%02x" | #define SD_ID128_FORMAT_STR "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%0 2x%02x%02x%02x%02x" | |||
#define SD_ID128_FORMAT_VAL(x) (x).bytes[0], (x).bytes[1], (x).bytes[2], (x ).bytes[3], (x).bytes[4], (x).bytes[5], (x).bytes[6], (x).bytes[7], (x).byt es[8], (x).bytes[9], (x).bytes[10], (x).bytes[11], (x).bytes[12], (x).bytes [13], (x).bytes[14], (x).bytes[15] | #define SD_ID128_FORMAT_VAL(x) (x).bytes[0], (x).bytes[1], (x).bytes[2], (x ).bytes[3], (x).bytes[4], (x).bytes[5], (x).bytes[6], (x).bytes[7], (x).byt es[8], (x).bytes[9], (x).bytes[10], (x).bytes[11], (x).bytes[12], (x).bytes [13], (x).bytes[14], (x).bytes[15] | |||
static inline int sd_id128_equal(sd_id128_t a, sd_id128_t b) { | static inline int sd_id128_equal(sd_id128_t a, sd_id128_t b) { | |||
return memcmp(&a, &b, 16) == 0; | return memcmp(&a, &b, 16) == 0; | |||
} | } | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
sd-journal.h | sd-journal.h | |||
---|---|---|---|---|
skipping to change at line 111 | skipping to change at line 111 | |||
int sd_journal_seek_tail(sd_journal *j); | int sd_journal_seek_tail(sd_journal *j); | |||
int sd_journal_seek_monotonic_usec(sd_journal *j, sd_id128_t boot_id, uint6 4_t usec); | int sd_journal_seek_monotonic_usec(sd_journal *j, sd_id128_t boot_id, uint6 4_t usec); | |||
int sd_journal_seek_realtime_usec(sd_journal *j, uint64_t usec); | int sd_journal_seek_realtime_usec(sd_journal *j, uint64_t usec); | |||
int sd_journal_seek_cursor(sd_journal *j, const char *cursor); | int sd_journal_seek_cursor(sd_journal *j, const char *cursor); | |||
int sd_journal_get_cursor(sd_journal *j, char **cursor); | int sd_journal_get_cursor(sd_journal *j, char **cursor); | |||
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_query_unique(sd_journal *j, const char *field); /\* missing *\/ */ | /* int sd_journal_query_unique(sd_journal *j, const char *field); /\* missing *\/ */ | |||
/* int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_t *l); /\* missing *\/ */ | /* int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_t *l); /\* missing *\/ */ | |||
/* void sd_journal_restart_unique(sd_journal *j); /\* missing *\/ */ | /* void sd_journal_restart_unique(sd_journal *j); /\* missing *\/ */ | |||
enum { | enum { | |||
SD_JOURNAL_NOP, | SD_JOURNAL_NOP, | |||
SD_JOURNAL_APPEND, | SD_JOURNAL_APPEND, | |||
SD_JOURNAL_INVALIDATE | SD_JOURNAL_INVALIDATE | |||
}; | }; | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added | |||
sd-messages.h | sd-messages.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 <systemd/sd-id128.h> | #include <systemd/sd-id128.h> | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
#define SD_MESSAGE_JOURNAL_START SD_ID128_MAKE(f7,73,79,a8,49,0b,40,8b,be | #define SD_MESSAGE_JOURNAL_START SD_ID128_MAKE(f7,73,79,a8,49,0b,40,8b,b | |||
,5f,69,40,50,5a,77,7b) | e,5f,69,40,50,5a,77,7b) | |||
#define SD_MESSAGE_JOURNAL_STOP SD_ID128_MAKE(d9,3f,b3,c9,c2,4d,45,1a,97 | #define SD_MESSAGE_JOURNAL_STOP SD_ID128_MAKE(d9,3f,b3,c9,c2,4d,45,1a,9 | |||
,ce,a6,15,ce,59,c0,0b) | 7,ce,a6,15,ce,59,c0,0b) | |||
#define SD_MESSAGE_JOURNAL_DROPPED SD_ID128_MAKE(a5,96,d6,fe,7b,fa,49,94,82 | #define SD_MESSAGE_JOURNAL_DROPPED SD_ID128_MAKE(a5,96,d6,fe,7b,fa,49,94,8 | |||
,8e,72,30,9e,95,d6,1e) | 2,8e,72,30,9e,95,d6,1e) | |||
#define SD_MESSAGE_JOURNAL_MISSED SD_ID128_MAKE(e9,bf,28,e6,e8,34,48,1b,b6 | #define SD_MESSAGE_JOURNAL_MISSED SD_ID128_MAKE(e9,bf,28,e6,e8,34,48,1b,b | |||
,f4,8f,54,8a,d1,36,06) | 6,f4,8f,54,8a,d1,36,06) | |||
#define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b9 | #define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b | |||
,07,29,ab,34,a2,50,b1) | 9,07,29,ab,34,a2,50,b1) | |||
#define SD_MESSAGE_SESSION_START SD_ID128_MAKE(8d,45,62,0c,1a,43,48,db,b | ||||
1,74,10,da,57,c6,0c,66) | ||||
#define SD_MESSAGE_SESSION_STOP SD_ID128_MAKE(33,54,93,94,24,b4,45,6d,9 | ||||
8,02,ca,83,33,ed,42,4a) | ||||
#define SD_MESSAGE_SEAT_START SD_ID128_MAKE(fc,be,fc,5d,a2,3d,42,80,9 | ||||
3,f9,7c,82,a9,29,0f,7b) | ||||
#define SD_MESSAGE_SEAT_STOP SD_ID128_MAKE(e7,85,2b,fe,46,78,4e,d0,a | ||||
c,cd,e0,4b,c8,64,c2,d5) | ||||
#define SD_MESSAGE_TIME_CHANGE SD_ID128_MAKE(c7,a7,87,07,9b,35,4e,aa,a | ||||
9,e7,7b,37,18,93,cd,27) | ||||
#define SD_MESSAGE_TIMEZONE_CHANGE SD_ID128_MAKE(45,f8,2f,4a,ef,7a,4b,bf,9 | ||||
4,2c,e8,61,d1,f2,09,90) | ||||
#define SD_MESSAGE_STARTUP_FINISHED SD_ID128_MAKE(b0,7a,24,9c,d0,24,41,4a,8 | ||||
2,dd,00,cd,18,13,78,ff) | ||||
#define SD_MESSAGE_SLEEP_START SD_ID128_MAKE(6b,bd,95,ee,97,79,41,e4,9 | ||||
7,c4,8b,e2,7c,25,41,28) | ||||
#define SD_MESSAGE_SLEEP_STOP SD_ID128_MAKE(88,11,e6,df,2a,8e,40,f5,8 | ||||
a,94,ce,a2,6f,8e,bf,14) | ||||
#define SD_MESSAGE_SHUTDOWN SD_ID128_MAKE(98,26,88,66,d1,d5,4a,49,9 | ||||
c,4e,98,92,1d,93,bc,40) | ||||
#define SD_MESSAGE_UNIT_STARTING SD_ID128_MAKE(7d,49,58,e8,42,da,4a,75,8 | ||||
f,6c,1c,dc,7b,36,dc,c5) | ||||
#define SD_MESSAGE_UNIT_STARTED SD_ID128_MAKE(39,f5,34,79,d3,a0,45,ac,8 | ||||
e,11,78,62,48,23,1f,bf) | ||||
#define SD_MESSAGE_UNIT_STOPPING SD_ID128_MAKE(de,5b,42,6a,63,be,47,a7,b | ||||
6,ac,3e,aa,c8,2e,2f,6f) | ||||
#define SD_MESSAGE_UNIT_STOPPED SD_ID128_MAKE(9d,1a,aa,27,d6,01,40,bd,9 | ||||
6,36,54,38,aa,d2,02,86) | ||||
#define SD_MESSAGE_UNIT_FAILED SD_ID128_MAKE(be,02,cf,68,55,d2,42,8b,a | ||||
4,0d,f7,e9,d0,22,f0,3d) | ||||
#define SD_MESSAGE_UNIT_RELOADING SD_ID128_MAKE(d3,4d,03,7f,ff,18,47,e6,a | ||||
e,66,9a,37,0e,69,47,25) | ||||
#define SD_MESSAGE_UNIT_RELOADED SD_ID128_MAKE(7b,05,eb,c6,68,38,42,22,b | ||||
a,a8,88,11,79,cf,da,54) | ||||
#define SD_MESSAGE_FORWARD_SYSLOG_MISSED SD_ID128_MAKE(00,27,22,9c,a0,64,41 | ||||
,81,a7,6c,4e,92,45,8a,fa,2e) | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
10 lines changed or deleted | 53 lines changed or added | |||
syscall-to-name.h | syscall-to-name.h | |||
---|---|---|---|---|
skipping to change at line 229 | skipping to change at line 229 | |||
[__NR_stty] = "stty", | [__NR_stty] = "stty", | |||
[__NR_set_mempolicy] = "set_mempolicy", | [__NR_set_mempolicy] = "set_mempolicy", | |||
[__NR_ioctl] = "ioctl", | [__NR_ioctl] = "ioctl", | |||
[__NR_clock_gettime] = "clock_gettime", | [__NR_clock_gettime] = "clock_gettime", | |||
[__NR_modify_ldt] = "modify_ldt", | [__NR_modify_ldt] = "modify_ldt", | |||
[__NR_idle] = "idle", | [__NR_idle] = "idle", | |||
[__NR_signal] = "signal", | [__NR_signal] = "signal", | |||
[__NR_linkat] = "linkat", | [__NR_linkat] = "linkat", | |||
[__NR_lstat64] = "lstat64", | [__NR_lstat64] = "lstat64", | |||
[__NR_keyctl] = "keyctl", | [__NR_keyctl] = "keyctl", | |||
[__NR_iopl] = "iopl", | ||||
[__NR_sched_setaffinity] = "sched_setaffinity", | [__NR_sched_setaffinity] = "sched_setaffinity", | |||
[__NR_exit] = "exit", | [__NR_exit] = "exit", | |||
[__NR_sched_setscheduler] = "sched_setscheduler", | [__NR_sched_setscheduler] = "sched_setscheduler", | |||
[__NR_io_submit] = "io_submit", | [__NR_io_submit] = "io_submit", | |||
[__NR_break] = "break", | [__NR_break] = "break", | |||
[__NR_socketcall] = "socketcall", | [__NR_socketcall] = "socketcall", | |||
[__NR_lock] = "lock", | [__NR_lock] = "lock", | |||
[__NR_oldlstat] = "oldlstat", | [__NR_oldlstat] = "oldlstat", | |||
[__NR_symlinkat] = "symlinkat", | [__NR_symlinkat] = "symlinkat", | |||
[__NR_setfsuid32] = "setfsuid32", | [__NR_setfsuid32] = "setfsuid32", | |||
skipping to change at line 300 | skipping to change at line 299 | |||
[__NR_adjtimex] = "adjtimex", | [__NR_adjtimex] = "adjtimex", | |||
[__NR_getpgid] = "getpgid", | [__NR_getpgid] = "getpgid", | |||
[__NR_fstat] = "fstat", | [__NR_fstat] = "fstat", | |||
[__NR_vm86old] = "vm86old", | [__NR_vm86old] = "vm86old", | |||
[__NR_getgroups] = "getgroups", | [__NR_getgroups] = "getgroups", | |||
[__NR_sigaltstack] = "sigaltstack", | [__NR_sigaltstack] = "sigaltstack", | |||
[__NR_chown] = "chown", | [__NR_chown] = "chown", | |||
[__NR_timer_getoverrun] = "timer_getoverrun", | [__NR_timer_getoverrun] = "timer_getoverrun", | |||
[__NR_fchownat] = "fchownat", | [__NR_fchownat] = "fchownat", | |||
[__NR_uselib] = "uselib", | [__NR_uselib] = "uselib", | |||
[__NR_iopl] = "iopl", | ||||
[__NR_gettimeofday] = "gettimeofday", | [__NR_gettimeofday] = "gettimeofday", | |||
[__NR_fallocate] = "fallocate", | [__NR_fallocate] = "fallocate", | |||
[__NR_getpgrp] = "getpgrp", | [__NR_getpgrp] = "getpgrp", | |||
[__NR_recvmmsg] = "recvmmsg", | [__NR_recvmmsg] = "recvmmsg", | |||
[__NR_eventfd2] = "eventfd2", | [__NR_eventfd2] = "eventfd2", | |||
[__NR_mknod] = "mknod", | [__NR_mknod] = "mknod", | |||
[__NR_statfs64] = "statfs64", | [__NR_statfs64] = "statfs64", | |||
[__NR_faccessat] = "faccessat", | [__NR_faccessat] = "faccessat", | |||
[__NR_fstatfs] = "fstatfs", | [__NR_fstatfs] = "fstatfs", | |||
[__NR_set_robust_list] = "set_robust_list", | [__NR_set_robust_list] = "set_robust_list", | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
udev.h | udev.h | |||
---|---|---|---|---|
skipping to change at line 138 | skipping to change at line 138 | |||
int udev_ctrl_get_start_exec_queue(struct udev_ctrl_msg *ctrl_msg); | int udev_ctrl_get_start_exec_queue(struct udev_ctrl_msg *ctrl_msg); | |||
int udev_ctrl_get_reload(struct udev_ctrl_msg *ctrl_msg); | int udev_ctrl_get_reload(struct udev_ctrl_msg *ctrl_msg); | |||
int udev_ctrl_get_ping(struct udev_ctrl_msg *ctrl_msg); | int udev_ctrl_get_ping(struct udev_ctrl_msg *ctrl_msg); | |||
int udev_ctrl_get_exit(struct udev_ctrl_msg *ctrl_msg); | int udev_ctrl_get_exit(struct udev_ctrl_msg *ctrl_msg); | |||
const char *udev_ctrl_get_set_env(struct udev_ctrl_msg *ctrl_msg); | const char *udev_ctrl_get_set_env(struct udev_ctrl_msg *ctrl_msg); | |||
int udev_ctrl_get_set_children_max(struct udev_ctrl_msg *ctrl_msg); | int udev_ctrl_get_set_children_max(struct udev_ctrl_msg *ctrl_msg); | |||
/* built-in commands */ | /* built-in commands */ | |||
enum udev_builtin_cmd { | enum udev_builtin_cmd { | |||
UDEV_BUILTIN_BLKID, | UDEV_BUILTIN_BLKID, | |||
UDEV_BUILTIN_BTRFS, | ||||
UDEV_BUILTIN_FIRMWARE, | UDEV_BUILTIN_FIRMWARE, | |||
UDEV_BUILTIN_INPUT_ID, | UDEV_BUILTIN_INPUT_ID, | |||
UDEV_BUILTIN_KMOD, | UDEV_BUILTIN_KMOD, | |||
UDEV_BUILTIN_PATH_ID, | UDEV_BUILTIN_PATH_ID, | |||
UDEV_BUILTIN_PCI_DB, | UDEV_BUILTIN_PCI_DB, | |||
UDEV_BUILTIN_USB_DB, | UDEV_BUILTIN_USB_DB, | |||
UDEV_BUILTIN_USB_ID, | UDEV_BUILTIN_USB_ID, | |||
#ifdef HAVE_ACL | #ifdef HAVE_ACL | |||
UDEV_BUILTIN_UACCESS, | UDEV_BUILTIN_UACCESS, | |||
#endif | #endif | |||
skipping to change at line 160 | skipping to change at line 161 | |||
struct udev_builtin { | struct udev_builtin { | |||
const char *name; | const char *name; | |||
int (*cmd)(struct udev_device *dev, int argc, char *argv[], bool te st); | int (*cmd)(struct udev_device *dev, int argc, char *argv[], bool te st); | |||
const char *help; | const char *help; | |||
int (*init)(struct udev *udev); | int (*init)(struct udev *udev); | |||
void (*exit)(struct udev *udev); | void (*exit)(struct udev *udev); | |||
bool (*validate)(struct udev *udev); | bool (*validate)(struct udev *udev); | |||
bool run_once; | bool run_once; | |||
}; | }; | |||
extern const struct udev_builtin udev_builtin_blkid; | extern const struct udev_builtin udev_builtin_blkid; | |||
extern const struct udev_builtin udev_builtin_btrfs; | ||||
extern const struct udev_builtin udev_builtin_firmware; | extern const struct udev_builtin udev_builtin_firmware; | |||
extern const struct udev_builtin udev_builtin_input_id; | extern const struct udev_builtin udev_builtin_input_id; | |||
extern const struct udev_builtin udev_builtin_kmod; | extern const struct udev_builtin udev_builtin_kmod; | |||
extern const struct udev_builtin udev_builtin_path_id; | extern const struct udev_builtin udev_builtin_path_id; | |||
extern const struct udev_builtin udev_builtin_pci_db; | extern const struct udev_builtin udev_builtin_pci_db; | |||
extern const struct udev_builtin udev_builtin_usb_db; | extern const struct udev_builtin udev_builtin_usb_db; | |||
extern const struct udev_builtin udev_builtin_usb_id; | extern const struct udev_builtin udev_builtin_usb_id; | |||
extern const struct udev_builtin udev_builtin_uaccess; | extern const struct udev_builtin udev_builtin_uaccess; | |||
int udev_builtin_init(struct udev *udev); | int udev_builtin_init(struct udev *udev); | |||
void udev_builtin_exit(struct udev *udev); | void udev_builtin_exit(struct udev *udev); | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added | |||
unit.h | unit.h | |||
---|---|---|---|---|
skipping to change at line 269 | skipping to change at line 269 | |||
#include "mount.h" | #include "mount.h" | |||
#include "automount.h" | #include "automount.h" | |||
#include "snapshot.h" | #include "snapshot.h" | |||
#include "swap.h" | #include "swap.h" | |||
#include "path.h" | #include "path.h" | |||
struct UnitVTable { | struct UnitVTable { | |||
/* How much memory does an object of this unit type need */ | /* How much memory does an object of this unit type need */ | |||
size_t object_size; | size_t object_size; | |||
/* If greater than 0, the offset into the object where | ||||
* ExecContext is found, if the unit type has that */ | ||||
size_t exec_context_offset; | ||||
/* Config file sections this unit type understands, separated | /* Config file sections this unit type understands, separated | |||
* by NUL chars */ | * by NUL chars */ | |||
const char *sections; | const char *sections; | |||
/* This should reset all type-specific variables. This should | /* This should reset all type-specific variables. This should | |||
* not allocate memory, and is called with zero-initialized | * not allocate memory, and is called with zero-initialized | |||
* data. It should hence only initialize variables that need | * data. It should hence only initialize variables that need | |||
* to be set != 0. */ | * to be set != 0. */ | |||
void (*init)(Unit *u); | void (*init)(Unit *u); | |||
/* This should free all type-specific variables. It should be | /* This should free all type-specific variables. It should be | |||
* idempotent. */ | * idempotent. */ | |||
void (*done)(Unit *u); | void (*done)(Unit *u); | |||
/* Actually load data from disk. This may fail, and should set | /* Actually load data from disk. This may fail, and should set | |||
* load_state to UNIT_LOADED, UNIT_MERGED or leave it at | * load_state to UNIT_LOADED, UNIT_MERGED or leave it at | |||
* UNIT_STUB if no configuration could be found. */ | * UNIT_STUB if no configuration could be found. */ | |||
int (*load)(Unit *u); | int (*load)(Unit *u); | |||
/* If a a lot of units got created via enumerate(), this is | /* If a lot of units got created via enumerate(), this is | |||
* where to actually set the state and call unit_notify(). */ | * where to actually set the state and call unit_notify(). */ | |||
int (*coldplug)(Unit *u); | int (*coldplug)(Unit *u); | |||
void (*dump)(Unit *u, FILE *f, const char *prefix); | void (*dump)(Unit *u, FILE *f, const char *prefix); | |||
int (*start)(Unit *u); | int (*start)(Unit *u); | |||
int (*stop)(Unit *u); | int (*stop)(Unit *u); | |||
int (*reload)(Unit *u); | int (*reload)(Unit *u); | |||
int (*kill)(Unit *u, KillWho w, int signo, DBusError *error); | int (*kill)(Unit *u, KillWho w, int signo, DBusError *error); | |||
skipping to change at line 498 | skipping to change at line 502 | |||
bool unit_job_is_applicable(Unit *u, JobType j); | bool unit_job_is_applicable(Unit *u, JobType j); | |||
int set_unit_path(const char *p); | int set_unit_path(const char *p); | |||
char *unit_dbus_path(Unit *u); | char *unit_dbus_path(Unit *u); | |||
int unit_load_related_unit(Unit *u, const char *type, Unit **_found); | int unit_load_related_unit(Unit *u, const char *type, Unit **_found); | |||
int unit_get_related_unit(Unit *u, const char *type, Unit **_found); | int unit_get_related_unit(Unit *u, const char *type, Unit **_found); | |||
char *unit_name_printf(Unit *u, const char* text); | ||||
char *unit_full_printf(Unit *u, const char *text); | ||||
char **unit_full_printf_strv(Unit *u, char **l); | ||||
bool unit_can_serialize(Unit *u); | bool unit_can_serialize(Unit *u); | |||
int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool serialize_jobs); | int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool serialize_jobs); | |||
void unit_serialize_item_format(Unit *u, FILE *f, const char *key, const ch ar *value, ...) _printf_attr_(4,5); | void unit_serialize_item_format(Unit *u, FILE *f, const char *key, const ch ar *value, ...) _printf_attr_(4,5); | |||
void unit_serialize_item(Unit *u, FILE *f, const char *key, const char *val ue); | void unit_serialize_item(Unit *u, FILE *f, const char *key, const char *val ue); | |||
int unit_deserialize(Unit *u, FILE *f, FDSet *fds); | int unit_deserialize(Unit *u, FILE *f, FDSet *fds); | |||
int unit_add_node_link(Unit *u, const char *what, bool wants); | int unit_add_node_link(Unit *u, const char *what, bool wants); | |||
int unit_coldplug(Unit *u); | int unit_coldplug(Unit *u); | |||
skipping to change at line 525 | skipping to change at line 525 | |||
void unit_reset_failed(Unit *u); | void unit_reset_failed(Unit *u); | |||
Unit *unit_following(Unit *u); | Unit *unit_following(Unit *u); | |||
bool unit_pending_inactive(Unit *u); | bool unit_pending_inactive(Unit *u); | |||
bool unit_pending_active(Unit *u); | bool unit_pending_active(Unit *u); | |||
int unit_add_default_target_dependency(Unit *u, Unit *target); | int unit_add_default_target_dependency(Unit *u, Unit *target); | |||
char *unit_default_cgroup_path(Unit *u); | ||||
int unit_following_set(Unit *u, Set **s); | int unit_following_set(Unit *u, Set **s); | |||
void unit_trigger_on_failure(Unit *u); | void unit_trigger_on_failure(Unit *u); | |||
bool unit_condition_test(Unit *u); | bool unit_condition_test(Unit *u); | |||
UnitFileState unit_get_unit_file_state(Unit *u); | UnitFileState unit_get_unit_file_state(Unit *u); | |||
Unit* unit_ref_set(UnitRef *ref, Unit *u); | Unit* unit_ref_set(UnitRef *ref, Unit *u); | |||
void unit_ref_unset(UnitRef *ref); | void unit_ref_unset(UnitRef *ref); | |||
#define UNIT_DEREF(ref) ((ref).unit) | #define UNIT_DEREF(ref) ((ref).unit) | |||
int unit_add_one_mount_link(Unit *u, Mount *m); | int unit_add_one_mount_link(Unit *u, Mount *m); | |||
int unit_add_mount_links(Unit *u); | int unit_add_mount_links(Unit *u); | |||
int unit_exec_context_defaults(Unit *u, ExecContext *c); | int unit_exec_context_defaults(Unit *u, ExecContext *c); | |||
ExecContext *unit_get_exec_context(Unit *u); | ||||
const char *unit_active_state_to_string(UnitActiveState i); | const char *unit_active_state_to_string(UnitActiveState i); | |||
UnitActiveState unit_active_state_from_string(const char *s); | UnitActiveState unit_active_state_from_string(const char *s); | |||
const char *unit_dependency_to_string(UnitDependency i); | const char *unit_dependency_to_string(UnitDependency i); | |||
UnitDependency unit_dependency_from_string(const char *s); | UnitDependency unit_dependency_from_string(const char *s); | |||
End of changes. 5 change blocks. | ||||
5 lines changed or deleted | 9 lines changed or added | |||
util.h | util.h | |||
---|---|---|---|---|
skipping to change at line 34 | skipping to change at line 34 | |||
#include <inttypes.h> | #include <inttypes.h> | |||
#include <time.h> | #include <time.h> | |||
#include <sys/time.h> | #include <sys/time.h> | |||
#include <stdarg.h> | #include <stdarg.h> | |||
#include <stdbool.h> | #include <stdbool.h> | |||
#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/stat.h> | #include <sys/stat.h> | |||
#include <dirent.h> | #include <dirent.h> | |||
#include <sys/resource.h> | #include <sys/resource.h> | |||
#include <stddef.h> | ||||
#include "macro.h" | #include "macro.h" | |||
typedef uint64_t usec_t; | typedef uint64_t usec_t; | |||
typedef uint64_t nsec_t; | typedef uint64_t nsec_t; | |||
typedef struct dual_timestamp { | typedef struct dual_timestamp { | |||
usec_t realtime; | usec_t realtime; | |||
usec_t monotonic; | usec_t monotonic; | |||
} dual_timestamp; | } dual_timestamp; | |||
union dirent_storage { | ||||
struct dirent de; | ||||
uint8_t storage[offsetof(struct dirent, d_name) + | ||||
((NAME_MAX + 1 + sizeof(long)) & ~(sizeof(long) - 1 | ||||
))]; | ||||
}; | ||||
#define MSEC_PER_SEC 1000ULL | #define MSEC_PER_SEC 1000ULL | |||
#define USEC_PER_SEC 1000000ULL | #define USEC_PER_SEC 1000000ULL | |||
#define USEC_PER_MSEC 1000ULL | #define USEC_PER_MSEC 1000ULL | |||
#define NSEC_PER_SEC 1000000000ULL | #define NSEC_PER_SEC 1000000000ULL | |||
#define NSEC_PER_MSEC 1000000ULL | #define NSEC_PER_MSEC 1000000ULL | |||
#define NSEC_PER_USEC 1000ULL | #define NSEC_PER_USEC 1000ULL | |||
#define USEC_PER_MINUTE (60ULL*USEC_PER_SEC) | #define USEC_PER_MINUTE (60ULL*USEC_PER_SEC) | |||
#define NSEC_PER_MINUTE (60ULL*NSEC_PER_SEC) | #define NSEC_PER_MINUTE (60ULL*NSEC_PER_SEC) | |||
#define USEC_PER_HOUR (60ULL*USEC_PER_MINUTE) | #define USEC_PER_HOUR (60ULL*USEC_PER_MINUTE) | |||
skipping to change at line 106 | skipping to change at line 114 | |||
struct timeval *timeval_store(struct timeval *tv, usec_t u); | struct timeval *timeval_store(struct timeval *tv, usec_t u); | |||
size_t page_size(void); | size_t page_size(void); | |||
#define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) | #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) | |||
#define streq(a,b) (strcmp((a),(b)) == 0) | #define streq(a,b) (strcmp((a),(b)) == 0) | |||
#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0) | #define strneq(a, b, n) (strncmp((a), (b), (n)) == 0) | |||
bool streq_ptr(const char *a, const char *b); | bool streq_ptr(const char *a, const char *b); | |||
#define new(t, n) ((t*) malloc(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 newdup(t, p, n) ((t*) memdup(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* strempty(const char *s) { | static inline const char* strempty(const char *s) { | |||
return s ? s : ""; | return s ? s : ""; | |||
} | } | |||
skipping to change at line 248 | skipping to change at line 256 | |||
char *truncate_nl(char *s); | char *truncate_nl(char *s); | |||
char *file_in_same_dir(const char *path, const char *filename); | char *file_in_same_dir(const char *path, const char *filename); | |||
int rmdir_parents(const char *path, const char *stop); | int rmdir_parents(const char *path, const char *stop); | |||
int get_process_comm(pid_t pid, char **name); | int get_process_comm(pid_t pid, char **name); | |||
int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, c har **line); | int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, c har **line); | |||
int get_process_exe(pid_t pid, char **name); | int get_process_exe(pid_t pid, char **name); | |||
int get_process_uid(pid_t pid, uid_t *uid); | int get_process_uid(pid_t pid, uid_t *uid); | |||
int get_process_gid(pid_t pid, gid_t *gid); | ||||
char hexchar(int x); | char hexchar(int x); | |||
int unhexchar(char c); | int unhexchar(char c); | |||
char octchar(int x); | char octchar(int x); | |||
int unoctchar(char c); | int unoctchar(char c); | |||
char decchar(int x); | char decchar(int x); | |||
int undecchar(char c); | int undecchar(char c); | |||
char *cescape(const char *s); | char *cescape(const char *s); | |||
char *cunescape(const char *s); | char *cunescape(const char *s); | |||
skipping to change at line 372 | skipping to change at line 381 | |||
int rm_rf_children(int fd, bool only_dirs, bool honour_sticky, struct stat *root_dev); | int rm_rf_children(int fd, bool only_dirs, bool honour_sticky, struct stat *root_dev); | |||
int rm_rf_children_dangerous(int fd, bool only_dirs, bool honour_sticky, st ruct stat *root_dev); | int rm_rf_children_dangerous(int fd, bool only_dirs, bool honour_sticky, st ruct stat *root_dev); | |||
int rm_rf(const char *path, bool only_dirs, bool delete_root, bool honour_s ticky); | int rm_rf(const char *path, bool only_dirs, bool delete_root, bool honour_s ticky); | |||
int rm_rf_dangerous(const char *path, bool only_dirs, bool delete_root, boo l honour_sticky); | int rm_rf_dangerous(const char *path, bool only_dirs, bool delete_root, boo l honour_sticky); | |||
int pipe_eof(int fd); | int pipe_eof(int fd); | |||
cpu_set_t* cpu_set_malloc(unsigned *ncpus); | cpu_set_t* cpu_set_malloc(unsigned *ncpus); | |||
void status_vprintf(const char *status, bool ellipse, const char *format, v | int status_vprintf(const char *status, bool ellipse, const char *format, va | |||
a_list ap); | _list ap); | |||
void status_printf(const char *status, bool ellipse, const char *format, .. | int status_printf(const char *status, bool ellipse, const char *format, ... | |||
.); | ); | |||
void status_welcome(void); | int status_welcome(void); | |||
int fd_columns(int fd); | int fd_columns(int fd); | |||
unsigned columns(void); | unsigned columns(void); | |||
unsigned columns_uncached(void); | unsigned columns_uncached(void); | |||
int fd_lines(int fd); | int fd_lines(int fd); | |||
unsigned lines(void); | unsigned lines(void); | |||
int running_in_chroot(void); | int running_in_chroot(void); | |||
skipping to change at line 433 | skipping to change at line 442 | |||
char* hostname_cleanup(char *s); | char* hostname_cleanup(char *s); | |||
char* strshorten(char *s, size_t l); | char* strshorten(char *s, size_t l); | |||
int terminal_vhangup_fd(int fd); | int terminal_vhangup_fd(int fd); | |||
int terminal_vhangup(const char *name); | int terminal_vhangup(const char *name); | |||
int vt_disallocate(const char *name); | int vt_disallocate(const char *name); | |||
int copy_file(const char *from, const char *to); | int copy_file(const char *from, const char *to); | |||
int symlink_or_copy(const char *from, const char *to); | ||||
int symlink_or_copy_atomic(const char *from, const char *to); | int symlink_atomic(const char *from, const char *to); | |||
int fchmod_umask(int fd, mode_t mode); | int fchmod_umask(int fd, mode_t mode); | |||
bool display_is_local(const char *display); | bool display_is_local(const char *display); | |||
int socket_from_display(const char *display, char **path); | int socket_from_display(const char *display, char **path); | |||
int get_user_creds(const char **username, uid_t *uid, gid_t *gid, const cha r **home, const char **shell); | int get_user_creds(const char **username, uid_t *uid, gid_t *gid, const cha r **home, const char **shell); | |||
int get_group_creds(const char **groupname, gid_t *gid); | int get_group_creds(const char **groupname, gid_t *gid); | |||
int in_group(const char *name); | int in_group(const char *name); | |||
skipping to change at line 508 | skipping to change at line 517 | |||
extern char **saved_argv; | extern char **saved_argv; | |||
bool kexec_loaded(void); | bool kexec_loaded(void); | |||
int prot_from_flags(int flags); | int prot_from_flags(int flags); | |||
char *format_bytes(char *buf, size_t l, off_t t); | char *format_bytes(char *buf, size_t l, off_t t); | |||
int fd_wait_for_event(int fd, int event, usec_t timeout); | int fd_wait_for_event(int fd, int event, usec_t timeout); | |||
void* memdup(const void *p, size_t l); | void* memdup(const void *p, size_t l) _malloc_; | |||
int is_kernel_thread(pid_t pid); | int is_kernel_thread(pid_t pid); | |||
int fd_inc_sndbuf(int fd, size_t n); | int fd_inc_sndbuf(int fd, size_t n); | |||
int fd_inc_rcvbuf(int fd, size_t n); | int fd_inc_rcvbuf(int fd, size_t n); | |||
int fork_agent(pid_t *pid, const int except[], unsigned n_except, const cha r *path, ...); | int fork_agent(pid_t *pid, const int except[], unsigned n_except, const cha r *path, ...); | |||
int setrlimit_closest(int resource, const struct rlimit *rlim); | int setrlimit_closest(int resource, const struct rlimit *rlim); | |||
skipping to change at line 531 | skipping to change at line 540 | |||
int can_sleep(const char *type); | int can_sleep(const char *type); | |||
bool is_valid_documentation_url(const char *url); | bool is_valid_documentation_url(const char *url); | |||
bool in_initrd(void); | bool in_initrd(void); | |||
void warn_melody(void); | void warn_melody(void); | |||
int get_shell(char **ret); | int get_shell(char **ret); | |||
int get_home_dir(char **ret); | int get_home_dir(char **ret); | |||
void freep(void *p); | ||||
void fclosep(FILE **f); | ||||
void closep(int *fd); | ||||
void closedirp(DIR **d); | ||||
void umaskp(mode_t *u); | ||||
_malloc_ static inline void *malloc_multiply(size_t a, size_t b) { | ||||
if (_unlikely_(b == 0 || a > ((size_t) -1) / b)) | ||||
return NULL; | ||||
return malloc(a * 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)) | ||||
return NULL; | ||||
return memdup(p, a * b); | ||||
} | ||||
End of changes. 10 change blocks. | ||||
10 lines changed or deleted | 20 lines changed or added | |||