| config.h | | config.h | |
| | | | |
| skipping to change at line 25 | | skipping to change at line 25 | |
| | | | |
| /* Define to 1 if you have the <acl/libacl.h> header file. */ | | /* Define to 1 if you have the <acl/libacl.h> header file. */ | |
| #define HAVE_ACL_LIBACL_H 1 | | #define HAVE_ACL_LIBACL_H 1 | |
| | | | |
| /* Define to 1 if you have the <attr/xattr.h> header file. */ | | /* Define to 1 if you have the <attr/xattr.h> header file. */ | |
| #define HAVE_ATTR_XATTR_H 1 | | #define HAVE_ATTR_XATTR_H 1 | |
| | | | |
| /* AUDIT available */ | | /* AUDIT available */ | |
| #define HAVE_AUDIT 1 | | #define HAVE_AUDIT 1 | |
| | | | |
|
| | | /* Define if blkid is available */ | |
| | | #define HAVE_BLKID 1 | |
| | | | |
| /* Define to 1 if you have the declaration of `gettid', and to 0 if you don
't. | | /* Define to 1 if you have the declaration of `gettid', and to 0 if you don
't. | |
| */ | | */ | |
| #define HAVE_DECL_GETTID 0 | | #define HAVE_DECL_GETTID 0 | |
| | | | |
| /* Define to 1 if you have the declaration of `name_to_handle_at', and to 0
if | | /* Define to 1 if you have the declaration of `name_to_handle_at', and to 0
if | |
| you don't. */ | | you don't. */ | |
| #define HAVE_DECL_NAME_TO_HANDLE_AT 0 | | #define HAVE_DECL_NAME_TO_HANDLE_AT 0 | |
| | | | |
| /* Define to 1 if you have the declaration of `pivot_root', and to 0 if you | | /* Define to 1 if you have the declaration of `pivot_root', and to 0 if you | |
| don't. */ | | don't. */ | |
| | | | |
| skipping to change at line 55 | | skipping to change at line 58 | |
| | | | |
| /* 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 if kmod is available */ | |
| | | #define HAVE_KMOD 1 | |
| | | | |
| /* Define to 1 if you have the <libaudit.h> header file. */ | | /* Define to 1 if you have the <libaudit.h> header file. */ | |
| #define HAVE_LIBAUDIT_H 1 | | #define HAVE_LIBAUDIT_H 1 | |
| | | | |
| /* Define if libcryptsetup is available */ | | /* Define if libcryptsetup is available */ | |
| /* #undef HAVE_LIBCRYPTSETUP */ | | /* #undef HAVE_LIBCRYPTSETUP */ | |
| | | | |
| /* Have tcpwrap? */ | | /* Have tcpwrap? */ | |
| #define HAVE_LIBWRAP /**/ | | #define HAVE_LIBWRAP /**/ | |
| | | | |
| /* Logind support available */ | | /* Logind support available */ | |
| | | | |
| skipping to change at line 153 | | skipping to change at line 159 | |
| /* 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 195" | | #define PACKAGE_STRING "systemd 196" | |
| | | | |
| /* 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 "195" | | #define PACKAGE_VERSION "196" | |
| | | | |
| /* 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 228 | | skipping to change at line 234 | |
| /* 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 "195" | | #define VERSION "196" | |
| | | | |
| /* 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. 5 change blocks. |
| 3 lines changed or deleted | | 9 lines changed or added | |
|
| hashmap.h | | hashmap.h | |
| | | | |
| skipping to change at line 47 | | skipping to change at line 47 | |
| | | | |
| typedef unsigned (*hash_func_t)(const void *p); | | typedef unsigned (*hash_func_t)(const void *p); | |
| typedef int (*compare_func_t)(const void *a, const void *b); | | typedef int (*compare_func_t)(const void *a, const void *b); | |
| | | | |
| unsigned string_hash_func(const void *p); | | unsigned string_hash_func(const void *p); | |
| int string_compare_func(const void *a, const void *b); | | int string_compare_func(const void *a, const void *b); | |
| | | | |
| unsigned trivial_hash_func(const void *p); | | unsigned trivial_hash_func(const void *p); | |
| int trivial_compare_func(const void *a, const void *b); | | int trivial_compare_func(const void *a, const void *b); | |
| | | | |
|
| | | unsigned uint64_hash_func(const void *p); | |
| | | int uint64_compare_func(const void *a, const void *b); | |
| | | | |
| Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func); | | Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func); | |
| void hashmap_free(Hashmap *h); | | void hashmap_free(Hashmap *h); | |
| void hashmap_free_free(Hashmap *h); | | void hashmap_free_free(Hashmap *h); | |
| Hashmap *hashmap_copy(Hashmap *h); | | Hashmap *hashmap_copy(Hashmap *h); | |
| int hashmap_ensure_allocated(Hashmap **h, hash_func_t hash_func, compare_fu
nc_t compare_func); | | int hashmap_ensure_allocated(Hashmap **h, hash_func_t hash_func, compare_fu
nc_t compare_func); | |
| | | | |
| int hashmap_put(Hashmap *h, const void *key, void *value); | | int hashmap_put(Hashmap *h, const void *key, void *value); | |
|
| | | int hashmap_update(Hashmap *h, const void *key, void *value); | |
| int hashmap_replace(Hashmap *h, const void *key, void *value); | | int hashmap_replace(Hashmap *h, const void *key, void *value); | |
| void* hashmap_get(Hashmap *h, const void *key); | | void* hashmap_get(Hashmap *h, const void *key); | |
|
| | | void* hashmap_get2(Hashmap *h, const void *key, void **rkey); | |
| bool hashmap_contains(Hashmap *h, const void *key); | | bool hashmap_contains(Hashmap *h, const void *key); | |
| void* hashmap_remove(Hashmap *h, const void *key); | | void* hashmap_remove(Hashmap *h, const void *key); | |
| void* hashmap_remove_value(Hashmap *h, const void *key, void *value); | | void* hashmap_remove_value(Hashmap *h, const void *key, void *value); | |
| int hashmap_remove_and_put(Hashmap *h, const void *old_key, const void *new
_key, void *value); | | int hashmap_remove_and_put(Hashmap *h, const void *old_key, const void *new
_key, void *value); | |
| int hashmap_remove_and_replace(Hashmap *h, const void *old_key, const void
*new_key, void *value); | | int hashmap_remove_and_replace(Hashmap *h, const void *old_key, const void
*new_key, void *value); | |
| | | | |
| int hashmap_merge(Hashmap *h, Hashmap *other); | | int hashmap_merge(Hashmap *h, Hashmap *other); | |
| void hashmap_move(Hashmap *h, Hashmap *other); | | void hashmap_move(Hashmap *h, Hashmap *other); | |
| int hashmap_move_one(Hashmap *h, Hashmap *other, const void *key); | | int hashmap_move_one(Hashmap *h, Hashmap *other, const void *key); | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 0 lines changed or deleted | | 5 lines changed or added | |
|
| libudev-private.h | | libudev-private.h | |
|
| /* | | /*** | |
| * libudev - interface to udev device information | | This file is part of systemd. | |
| * | | | |
| * Copyright (C) 2008-2012 Kay Sievers <kay.sievers@vrfy.org> | | Copyright 2008-2012 Kay Sievers <kay@vrfy.org> | |
| * | | | |
| * This library is free software; you can redistribute it and/or | | systemd is free software; you can redistribute it and/or modify it | |
| * modify it under the terms of the GNU Lesser General Public | | under the terms of the GNU Lesser General Public License as published by | |
| * License as published by the Free Software Foundation; either | | the Free Software Foundation; either version 2.1 of the License, or | |
| * version 2.1 of the License, or (at your option) any later version. | | (at your option) any later version. | |
| */ | | | |
| | | systemd is distributed in the hope that it will be useful, but | |
| | | WITHOUT ANY WARRANTY; without even the implied warranty of | |
| | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| | | Lesser General Public License for more details. | |
| | | | |
| | | You should have received a copy of the GNU Lesser General Public License | |
| | | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
| | | ***/ | |
| | | | |
| #ifndef _LIBUDEV_PRIVATE_H_ | | #ifndef _LIBUDEV_PRIVATE_H_ | |
| #define _LIBUDEV_PRIVATE_H_ | | #define _LIBUDEV_PRIVATE_H_ | |
| | | | |
| #include <syslog.h> | | #include <syslog.h> | |
| #include <signal.h> | | #include <signal.h> | |
| #include <stdint.h> | | #include <stdint.h> | |
| #include <stdbool.h> | | #include <stdbool.h> | |
| | | | |
| #include "libudev.h" | | #include "libudev.h" | |
| | | | |
| skipping to change at line 44 | | skipping to change at line 52 | |
| | | | |
| #define udev_dbg(udev, arg...) udev_log_cond(udev, LOG_DEBUG, ## arg) | | #define udev_dbg(udev, arg...) udev_log_cond(udev, LOG_DEBUG, ## arg) | |
| #define udev_info(udev, arg...) udev_log_cond(udev, LOG_INFO, ## arg) | | #define udev_info(udev, arg...) udev_log_cond(udev, LOG_INFO, ## arg) | |
| #define udev_err(udev, arg...) udev_log_cond(udev, LOG_ERR, ## arg) | | #define udev_err(udev, arg...) udev_log_cond(udev, LOG_ERR, ## arg) | |
| | | | |
| /* libudev.c */ | | /* libudev.c */ | |
| void udev_log(struct udev *udev, | | void udev_log(struct udev *udev, | |
| int priority, const char *file, int line, const char *fn, | | int priority, const char *file, int line, const char *fn, | |
| const char *format, ...) | | const char *format, ...) | |
| __attribute__((format(printf, 6, 7))); | | __attribute__((format(printf, 6, 7))); | |
|
| int udev_get_rules_path(struct udev *udev, char **path[], unsigned long lon
g *ts_usec[]); | | int udev_get_rules_path(struct udev *udev, char **path[], usec_t *ts_usec[]
); | |
| struct udev_list_entry *udev_add_property(struct udev *udev, const char *ke
y, const char *value); | | struct udev_list_entry *udev_add_property(struct udev *udev, const char *ke
y, const char *value); | |
| struct udev_list_entry *udev_get_properties_list_entry(struct udev *udev); | | struct udev_list_entry *udev_get_properties_list_entry(struct udev *udev); | |
| | | | |
| /* libudev-device.c */ | | /* libudev-device.c */ | |
| struct udev_device *udev_device_new(struct udev *udev); | | struct udev_device *udev_device_new(struct udev *udev); | |
| mode_t udev_device_get_devnode_mode(struct udev_device *udev_device); | | mode_t udev_device_get_devnode_mode(struct udev_device *udev_device); | |
|
| | | int udev_device_set_subsystem(struct udev_device *udev_device, const char *
subsystem); | |
| int udev_device_set_syspath(struct udev_device *udev_device, const char *sy
spath); | | int udev_device_set_syspath(struct udev_device *udev_device, const char *sy
spath); | |
| int udev_device_set_devnode(struct udev_device *udev_device, const char *de
vnode); | | int udev_device_set_devnode(struct udev_device *udev_device, const char *de
vnode); | |
| int udev_device_add_devlink(struct udev_device *udev_device, const char *de
vlink); | | int udev_device_add_devlink(struct udev_device *udev_device, const char *de
vlink); | |
| void udev_device_cleanup_devlinks_list(struct udev_device *udev_device); | | void udev_device_cleanup_devlinks_list(struct udev_device *udev_device); | |
| struct udev_list_entry *udev_device_add_property(struct udev_device *udev_d
evice, const char *key, const char *value); | | struct udev_list_entry *udev_device_add_property(struct udev_device *udev_d
evice, const char *key, const char *value); | |
| void udev_device_add_property_from_string_parse(struct udev_device *udev_de
vice, const char *property); | | void udev_device_add_property_from_string_parse(struct udev_device *udev_de
vice, const char *property); | |
| int udev_device_add_property_from_string_parse_finish(struct udev_device *u
dev_device); | | int udev_device_add_property_from_string_parse_finish(struct udev_device *u
dev_device); | |
| char **udev_device_get_properties_envp(struct udev_device *udev_device); | | char **udev_device_get_properties_envp(struct udev_device *udev_device); | |
| ssize_t udev_device_get_properties_monitor_buf(struct udev_device *udev_dev
ice, const char **buf); | | ssize_t udev_device_get_properties_monitor_buf(struct udev_device *udev_dev
ice, const char **buf); | |
| int udev_device_read_db(struct udev_device *udev_device, const char *dbfile
); | | int udev_device_read_db(struct udev_device *udev_device, const char *dbfile
); | |
| int udev_device_read_uevent_file(struct udev_device *udev_device); | | int udev_device_read_uevent_file(struct udev_device *udev_device); | |
| int udev_device_set_action(struct udev_device *udev_device, const char *act
ion); | | int udev_device_set_action(struct udev_device *udev_device, const char *act
ion); | |
| const char *udev_device_get_devpath_old(struct udev_device *udev_device); | | const char *udev_device_get_devpath_old(struct udev_device *udev_device); | |
| const char *udev_device_get_id_filename(struct udev_device *udev_device); | | const char *udev_device_get_id_filename(struct udev_device *udev_device); | |
| void udev_device_set_is_initialized(struct udev_device *udev_device); | | void udev_device_set_is_initialized(struct udev_device *udev_device); | |
| int udev_device_add_tag(struct udev_device *udev_device, const char *tag); | | int udev_device_add_tag(struct udev_device *udev_device, const char *tag); | |
| void udev_device_cleanup_tags_list(struct udev_device *udev_device); | | void udev_device_cleanup_tags_list(struct udev_device *udev_device); | |
|
| unsigned long long udev_device_get_usec_initialized(struct udev_device *ude | | usec_t udev_device_get_usec_initialized(struct udev_device *udev_device); | |
| v_device); | | void udev_device_set_usec_initialized(struct udev_device *udev_device, usec | |
| void udev_device_set_usec_initialized(struct udev_device *udev_device, unsi | | _t usec_initialized); | |
| gned long long usec_initialized); | | | |
| int udev_device_get_devlink_priority(struct udev_device *udev_device); | | int udev_device_get_devlink_priority(struct udev_device *udev_device); | |
| int udev_device_set_devlink_priority(struct udev_device *udev_device, int p
rio); | | int udev_device_set_devlink_priority(struct udev_device *udev_device, int p
rio); | |
| int udev_device_get_watch_handle(struct udev_device *udev_device); | | int udev_device_get_watch_handle(struct udev_device *udev_device); | |
| int udev_device_set_watch_handle(struct udev_device *udev_device, int handl
e); | | int udev_device_set_watch_handle(struct udev_device *udev_device, int handl
e); | |
| int udev_device_get_ifindex(struct udev_device *udev_device); | | int udev_device_get_ifindex(struct udev_device *udev_device); | |
| void udev_device_set_info_loaded(struct udev_device *device); | | void udev_device_set_info_loaded(struct udev_device *device); | |
| bool udev_device_get_db_persist(struct udev_device *udev_device); | | bool udev_device_get_db_persist(struct udev_device *udev_device); | |
| void udev_device_set_db_persist(struct udev_device *udev_device); | | void udev_device_set_db_persist(struct udev_device *udev_device); | |
| | | | |
| /* libudev-device-private.c */ | | /* libudev-device-private.c */ | |
| | | | |
| skipping to change at line 143 | | skipping to change at line 152 | |
| ssize_t udev_queue_read_devpath(FILE *queue_file, char *devpath, size_t siz
e); | | ssize_t udev_queue_read_devpath(FILE *queue_file, char *devpath, size_t siz
e); | |
| ssize_t udev_queue_skip_devpath(FILE *queue_file); | | ssize_t udev_queue_skip_devpath(FILE *queue_file); | |
| | | | |
| /* libudev-queue-private.c */ | | /* libudev-queue-private.c */ | |
| struct udev_queue_export *udev_queue_export_new(struct udev *udev); | | struct udev_queue_export *udev_queue_export_new(struct udev *udev); | |
| struct udev_queue_export *udev_queue_export_unref(struct udev_queue_export
*udev_queue_export); | | struct udev_queue_export *udev_queue_export_unref(struct udev_queue_export
*udev_queue_export); | |
| void udev_queue_export_cleanup(struct udev_queue_export *udev_queue_export)
; | | void udev_queue_export_cleanup(struct udev_queue_export *udev_queue_export)
; | |
| int udev_queue_export_device_queued(struct udev_queue_export *udev_queue_ex
port, struct udev_device *udev_device); | | int udev_queue_export_device_queued(struct udev_queue_export *udev_queue_ex
port, struct udev_device *udev_device); | |
| int udev_queue_export_device_finished(struct udev_queue_export *udev_queue_
export, struct udev_device *udev_device); | | int udev_queue_export_device_finished(struct udev_queue_export *udev_queue_
export, struct udev_device *udev_device); | |
| | | | |
|
| | | /* libudev-hwdb.c */ | |
| | | bool udev_hwdb_validate(struct udev_hwdb *hwdb); | |
| | | | |
| /* 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); | |
| 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); | |
| | | | |
| /* libudev-util-private.c */ | | /* libudev-util-private.c */ | |
| int util_delete_path(struct udev *udev, const char *path); | | int util_delete_path(struct udev *udev, const char *path); | |
| uid_t util_lookup_user(struct udev *udev, const char *user); | | uid_t util_lookup_user(struct udev *udev, const char *user); | |
| gid_t util_lookup_group(struct udev *udev, const char *group); | | gid_t util_lookup_group(struct udev *udev, const char *group); | |
|
| int util_resolve_subsys_kernel(struct udev *udev, const char *string, | | int util_resolve_subsys_kernel(struct udev *udev, const char *string, char | |
| char *result, size_t maxsize, int rea | | *result, size_t maxsize, int read_value); | |
| d_value); | | | |
| unsigned long long ts_usec(const struct timespec *ts); | | | |
| unsigned long long now_usec(void); | | | |
| ssize_t print_kmsg(const char *fmt, ...) __attribute__((format(printf, 1, 2
))); | | ssize_t print_kmsg(const char *fmt, ...) __attribute__((format(printf, 1, 2
))); | |
| #endif | | #endif | |
| | | | |
End of changes. 7 change blocks. |
| 24 lines changed or deleted | | 32 lines changed or added | |
|
| libudev.h | | libudev.h | |
|
| /* | | /*** | |
| * libudev - interface to udev device information | | This file is part of systemd. | |
| * | | | |
| * Copyright (C) 2008-2011 Kay Sievers <kay.sievers@vrfy.org> | | Copyright 2008-2012 Kay Sievers <kay@vrfy.org> | |
| * | | | |
| * This library is free software; you can redistribute it and/or | | systemd is free software; you can redistribute it and/or modify it | |
| * modify it under the terms of the GNU Lesser General Public | | under the terms of the GNU Lesser General Public License as published by | |
| * License as published by the Free Software Foundation; either | | the Free Software Foundation; either version 2.1 of the License, or | |
| * version 2.1 of the License, or (at your option) any later version. | | (at your option) any later version. | |
| */ | | | |
| | | systemd is distributed in the hope that it will be useful, but | |
| | | WITHOUT ANY WARRANTY; without even the implied warranty of | |
| | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| | | Lesser General Public License for more details. | |
| | | | |
| | | You should have received a copy of the GNU Lesser General Public License | |
| | | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
| | | ***/ | |
| | | | |
| #ifndef _LIBUDEV_H_ | | #ifndef _LIBUDEV_H_ | |
| #define _LIBUDEV_H_ | | #define _LIBUDEV_H_ | |
| | | | |
| #include <stdarg.h> | | #include <stdarg.h> | |
| #include <sys/types.h> | | #include <sys/types.h> | |
| #include <sys/stat.h> | | #include <sys/stat.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| | | | |
| skipping to change at line 174 | | skipping to change at line 182 | |
| unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev
_queue); | | unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev
_queue); | |
| unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_q
ueue); | | unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_q
ueue); | |
| int udev_queue_get_udev_is_active(struct udev_queue *udev_queue); | | int udev_queue_get_udev_is_active(struct udev_queue *udev_queue); | |
| int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue); | | int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue); | |
| int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsign
ed long long int seqnum); | | int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsign
ed long long int seqnum); | |
| int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queu
e, | | int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queu
e, | |
| unsigned long long int start
, unsigned long long int end); | | unsigned long long int start
, unsigned long long int end); | |
| struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue
*udev_queue); | | struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue
*udev_queue); | |
| | | | |
| /* | | /* | |
|
| | | * udev_hwdb | |
| | | * | |
| | | * access to the static hardware properties database | |
| | | */ | |
| | | struct udev_hwdb; | |
| | | struct udev_hwdb *udev_hwdb_new(struct udev *udev); | |
| | | struct udev_hwdb *udev_hwdb_ref(struct udev_hwdb *hwdb); | |
| | | struct udev_hwdb *udev_hwdb_unref(struct udev_hwdb *hwdb); | |
| | | struct udev_list_entry *udev_hwdb_get_properties_list_entry(struct udev_hwd | |
| | | b *hwdb, const char *modalias, unsigned int flags); | |
| | | | |
| | | /* | |
| * udev_util | | * udev_util | |
| * | | * | |
| * udev specific utilities | | * udev specific utilities | |
| */ | | */ | |
| int udev_util_encode_string(const char *str, char *str_enc, size_t len); | | int udev_util_encode_string(const char *str, char *str_enc, size_t len); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } /* extern "C" */ | | } /* extern "C" */ | |
| #endif | | #endif | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 10 lines changed or deleted | | 30 lines changed or added | |
|
| sd-journal.h | | sd-journal.h | |
| | | | |
| skipping to change at line 100 | | skipping to change at line 100 | |
| | | | |
| int sd_journal_previous(sd_journal *j); | | int sd_journal_previous(sd_journal *j); | |
| int sd_journal_next(sd_journal *j); | | int sd_journal_next(sd_journal *j); | |
| | | | |
| int sd_journal_previous_skip(sd_journal *j, uint64_t skip); | | int sd_journal_previous_skip(sd_journal *j, uint64_t skip); | |
| int sd_journal_next_skip(sd_journal *j, uint64_t skip); | | int sd_journal_next_skip(sd_journal *j, uint64_t skip); | |
| | | | |
| int sd_journal_get_realtime_usec(sd_journal *j, uint64_t *ret); | | int sd_journal_get_realtime_usec(sd_journal *j, uint64_t *ret); | |
| int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret, sd_id128_t
*ret_boot_id); | | int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret, sd_id128_t
*ret_boot_id); | |
| | | | |
|
| | | int sd_journal_set_data_threshold(sd_journal *j, size_t sz); | |
| | | int sd_journal_get_data_threshold(sd_journal *j, size_t *sz); | |
| | | | |
| int sd_journal_get_data(sd_journal *j, const char *field, const void **data
, size_t *l); | | int sd_journal_get_data(sd_journal *j, const char *field, const void **data
, size_t *l); | |
| int sd_journal_enumerate_data(sd_journal *j, const void **data, size_t *l); | | int sd_journal_enumerate_data(sd_journal *j, const void **data, size_t *l); | |
| void sd_journal_restart_data(sd_journal *j); | | void sd_journal_restart_data(sd_journal *j); | |
| | | | |
| int sd_journal_add_match(sd_journal *j, const void *data, size_t size); | | int sd_journal_add_match(sd_journal *j, const void *data, size_t size); | |
| int sd_journal_add_disjunction(sd_journal *j); | | int sd_journal_add_disjunction(sd_journal *j); | |
| void sd_journal_flush_matches(sd_journal *j); | | void sd_journal_flush_matches(sd_journal *j); | |
| | | | |
| int sd_journal_seek_head(sd_journal *j); | | int sd_journal_seek_head(sd_journal *j); | |
| int sd_journal_seek_tail(sd_journal *j); | | int sd_journal_seek_tail(sd_journal *j); | |
| | | | |
| skipping to change at line 127 | | 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_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_get_catalog(sd_journal *j, char **text); | |
| | | 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) \ | |
| while (sd_journal_previous(j) > 0) | | while (sd_journal_previous(j) > 0) | |
| | | | |
| #define SD_JOURNAL_FOREACH_DATA(j, data, l) \ | | #define SD_JOURNAL_FOREACH_DATA(j, data, l) \ | |
| for (sd_journal_restart_data(j); sd_journal_enumerate_data((j), &(d
ata), &(l)) > 0; ) | | for (sd_journal_restart_data(j); sd_journal_enumerate_data((j), &(d
ata), &(l)) > 0; ) | |
| | | | |
End of changes. 3 change blocks. |
| 0 lines changed or deleted | | 7 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 | |
| | | | |
|
| | | /* Hey! If you add a new message here, you *must* also update the | |
| | | * message catalog with an appropriate explanation */ | |
| | | | |
| #define SD_MESSAGE_JOURNAL_START SD_ID128_MAKE(f7,73,79,a8,49,0b,40,8b,b
e,5f,69,40,50,5a,77,7b) | | #define SD_MESSAGE_JOURNAL_START SD_ID128_MAKE(f7,73,79,a8,49,0b,40,8b,b
e,5f,69,40,50,5a,77,7b) | |
| #define SD_MESSAGE_JOURNAL_STOP SD_ID128_MAKE(d9,3f,b3,c9,c2,4d,45,1a,9
7,ce,a6,15,ce,59,c0,0b) | | #define SD_MESSAGE_JOURNAL_STOP SD_ID128_MAKE(d9,3f,b3,c9,c2,4d,45,1a,9
7,ce,a6,15,ce,59,c0,0b) | |
| #define SD_MESSAGE_JOURNAL_DROPPED SD_ID128_MAKE(a5,96,d6,fe,7b,fa,49,94,8
2,8e,72,30,9e,95,d6,1e) | | #define SD_MESSAGE_JOURNAL_DROPPED SD_ID128_MAKE(a5,96,d6,fe,7b,fa,49,94,8
2,8e,72,30,9e,95,d6,1e) | |
| #define SD_MESSAGE_JOURNAL_MISSED SD_ID128_MAKE(e9,bf,28,e6,e8,34,48,1b,b
6,f4,8f,54,8a,d1,36,06) | | #define SD_MESSAGE_JOURNAL_MISSED SD_ID128_MAKE(e9,bf,28,e6,e8,34,48,1b,b
6,f4,8f,54,8a,d1,36,06) | |
| | | | |
| #define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b
9,07,29,ab,34,a2,50,b1) | | #define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b
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_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_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_START SD_ID128_MAKE(fc,be,fc,5d,a2,3d,42,80,9
3,f9,7c,82,a9,29,0f,7b) | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 3 lines changed or added | |
|
| special.h | | special.h | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 40 | |
| * it to bring all services down that want to be brought down on | | * it to bring all services down that want to be brought down on | |
| * system shutdown. */ | | * system shutdown. */ | |
| #define SPECIAL_SHUTDOWN_TARGET "shutdown.target" | | #define SPECIAL_SHUTDOWN_TARGET "shutdown.target" | |
| #define SPECIAL_HALT_TARGET "halt.target" | | #define SPECIAL_HALT_TARGET "halt.target" | |
| #define SPECIAL_POWEROFF_TARGET "poweroff.target" | | #define SPECIAL_POWEROFF_TARGET "poweroff.target" | |
| #define SPECIAL_REBOOT_TARGET "reboot.target" | | #define SPECIAL_REBOOT_TARGET "reboot.target" | |
| #define SPECIAL_KEXEC_TARGET "kexec.target" | | #define SPECIAL_KEXEC_TARGET "kexec.target" | |
| #define SPECIAL_EXIT_TARGET "exit.target" | | #define SPECIAL_EXIT_TARGET "exit.target" | |
| #define SPECIAL_SUSPEND_TARGET "suspend.target" | | #define SPECIAL_SUSPEND_TARGET "suspend.target" | |
| #define SPECIAL_HIBERNATE_TARGET "hibernate.target" | | #define SPECIAL_HIBERNATE_TARGET "hibernate.target" | |
|
| | | #define SPECIAL_HYBRID_SLEEP_TARGET "hybrid-sleep.target" | |
| | | | |
| /* Special boot targets */ | | /* Special boot targets */ | |
| #define SPECIAL_RESCUE_TARGET "rescue.target" | | #define SPECIAL_RESCUE_TARGET "rescue.target" | |
| #define SPECIAL_EMERGENCY_TARGET "emergency.target" | | #define SPECIAL_EMERGENCY_TARGET "emergency.target" | |
| | | | |
| /* Early boot targets */ | | /* Early boot targets */ | |
| #define SPECIAL_SYSINIT_TARGET "sysinit.target" | | #define SPECIAL_SYSINIT_TARGET "sysinit.target" | |
| #define SPECIAL_SOCKETS_TARGET "sockets.target" | | #define SPECIAL_SOCKETS_TARGET "sockets.target" | |
| #define SPECIAL_LOCAL_FS_TARGET "local-fs.target" /* LSB's $local_f
s */ | | #define SPECIAL_LOCAL_FS_TARGET "local-fs.target" /* LSB's $local_f
s */ | |
| #define SPECIAL_LOCAL_FS_PRE_TARGET "local-fs-pre.target" | | #define SPECIAL_LOCAL_FS_PRE_TARGET "local-fs-pre.target" | |
| | | | |
| skipping to change at line 61 | | skipping to change at line 62 | |
| #define SPECIAL_REMOTE_FS_PRE_TARGET "remote-fs-pre.target" | | #define SPECIAL_REMOTE_FS_PRE_TARGET "remote-fs-pre.target" | |
| #define SPECIAL_SWAP_TARGET "swap.target" | | #define SPECIAL_SWAP_TARGET "swap.target" | |
| #define SPECIAL_BASIC_TARGET "basic.target" | | #define SPECIAL_BASIC_TARGET "basic.target" | |
| | | | |
| /* LSB compatibility */ | | /* LSB compatibility */ | |
| #define SPECIAL_NETWORK_TARGET "network.target" /* LSB's $network
*/ | | #define SPECIAL_NETWORK_TARGET "network.target" /* LSB's $network
*/ | |
| #define SPECIAL_NSS_LOOKUP_TARGET "nss-lookup.target" /* LSB's $named *
/ | | #define SPECIAL_NSS_LOOKUP_TARGET "nss-lookup.target" /* LSB's $named *
/ | |
| #define SPECIAL_RPCBIND_TARGET "rpcbind.target" /* LSB's $portmap
*/ | | #define SPECIAL_RPCBIND_TARGET "rpcbind.target" /* LSB's $portmap
*/ | |
| #define SPECIAL_SYSLOG_TARGET "syslog.target" /* LSB's $syslog
*/ | | #define SPECIAL_SYSLOG_TARGET "syslog.target" /* LSB's $syslog
*/ | |
| #define SPECIAL_TIME_SYNC_TARGET "time-sync.target" /* LSB's $time */ | | #define SPECIAL_TIME_SYNC_TARGET "time-sync.target" /* LSB's $time */ | |
|
| #define SPECIAL_DISPLAY_MANAGER_SERVICE "display-manager.service" /* | | #define SPECIAL_DISPLAY_MANAGER_SERVICE "display-manager.service" /* Common | |
| Debian's $x-display-manager */ | | extension of LSB */ | |
| #define SPECIAL_MAIL_TRANSFER_AGENT_TARGET "mail-transfer-agent.target" /* | | #define SPECIAL_MAIL_TRANSFER_AGENT_TARGET "mail-transfer-agent.target" /* | |
| Debian's $mail-{transport|transfer-agent */ | | Common extension of LSB */ | |
| #define SPECIAL_HTTP_DAEMON_TARGET "http-daemon.target" | | | |
| | | /* | |
| | | * Rules regarding adding further high level targets like the above: | |
| | | * | |
| | | * - Be conservative, only add more of these when we really need | |
| | | * them. We need strong usecases for further additions. | |
| | | * | |
| | | * - When there can be multiple implementations running side-by-side, | |
| | | * it needs to be a .target unit which can pull in all | |
| | | * implementations. | |
| | | * | |
| | | * - If something can be implemented with socket activation, and | |
| | | * without, it needs to be a .target unit, so that it can pull in | |
| | | * the appropriate unit. | |
| | | * | |
| | | * - Otherwise, it should be a .service unit. | |
| | | * | |
| | | * - In some cases it is OK to have both a .service and a .target | |
| | | * unit, i.e. if there can be multiple parallel implementations, but | |
| | | * only one is the "system" one. Example: syslog. | |
| | | * | |
| | | * Or to put this in other words: .service symlinks can be used to | |
| | | * arbitrate between multiple implementations if there can be only one | |
| | | * of a kind. .target units can be used to support multiple | |
| | | * implementations that can run side-by-side. | |
| | | */ | |
| | | | |
| /* Magic early boot services */ | | /* Magic early boot services */ | |
| #define SPECIAL_FSCK_SERVICE "systemd-fsck@.service" | | #define SPECIAL_FSCK_SERVICE "systemd-fsck@.service" | |
| #define SPECIAL_QUOTACHECK_SERVICE "systemd-quotacheck.service" | | #define SPECIAL_QUOTACHECK_SERVICE "systemd-quotacheck.service" | |
| #define SPECIAL_QUOTAON_SERVICE "quotaon.service" | | #define SPECIAL_QUOTAON_SERVICE "quotaon.service" | |
| #define SPECIAL_REMOUNT_FS_SERVICE "systemd-remount-fs.service" | | #define SPECIAL_REMOUNT_FS_SERVICE "systemd-remount-fs.service" | |
| | | | |
| /* Services systemd relies on */ | | /* Services systemd relies on */ | |
| #define SPECIAL_DBUS_SERVICE "dbus.service" | | #define SPECIAL_DBUS_SERVICE "dbus.service" | |
| #define SPECIAL_DBUS_SOCKET "dbus.socket" | | #define SPECIAL_DBUS_SOCKET "dbus.socket" | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 31 lines changed or added | |
|
| udev.h | | udev.h | |
| /* | | /* | |
| * Copyright (C) 2003 Greg Kroah-Hartman <greg@kroah.com> | | * Copyright (C) 2003 Greg Kroah-Hartman <greg@kroah.com> | |
|
| * Copyright (C) 2003-2010 Kay Sievers <kay.sievers@vrfy.org> | | * Copyright (C) 2003-2010 Kay Sievers <kay@vrfy.org> | |
| * | | * | |
| * This program is free software: you can redistribute it and/or modify | | * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 2 of the License, or | | * the Free Software Foundation, either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * 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. | |
| | | | |
| skipping to change at line 44 | | skipping to change at line 44 | |
| struct udev_device *dev; | | struct udev_device *dev; | |
| struct udev_device *dev_parent; | | struct udev_device *dev_parent; | |
| struct udev_device *dev_db; | | struct udev_device *dev_db; | |
| char *name; | | char *name; | |
| char *program_result; | | char *program_result; | |
| mode_t mode; | | mode_t mode; | |
| uid_t uid; | | uid_t uid; | |
| gid_t gid; | | gid_t gid; | |
| struct udev_list run_list; | | struct udev_list run_list; | |
| int exec_delay; | | int exec_delay; | |
|
| unsigned long long birth_usec; | | usec_t birth_usec; | |
| unsigned long long timeout_usec; | | usec_t timeout_usec; | |
| int fd_signal; | | int fd_signal; | |
| unsigned int builtin_run; | | unsigned int builtin_run; | |
| unsigned int builtin_ret; | | unsigned int builtin_ret; | |
| bool sigterm; | | bool sigterm; | |
| bool inotify_watch; | | bool inotify_watch; | |
| bool inotify_watch_final; | | bool inotify_watch_final; | |
| bool group_final; | | bool group_final; | |
| bool owner_final; | | bool owner_final; | |
| bool mode_set; | | bool mode_set; | |
| bool mode_final; | | bool mode_final; | |
| | | | |
| skipping to change at line 137 | | skipping to change at line 137 | |
| int udev_ctrl_get_stop_exec_queue(struct udev_ctrl_msg *ctrl_msg); | | int udev_ctrl_get_stop_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_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 { | |
|
| | | #ifdef HAVE_BLKID | |
| UDEV_BUILTIN_BLKID, | | UDEV_BUILTIN_BLKID, | |
|
| | | #endif | |
| UDEV_BUILTIN_BTRFS, | | UDEV_BUILTIN_BTRFS, | |
| UDEV_BUILTIN_FIRMWARE, | | UDEV_BUILTIN_FIRMWARE, | |
|
| | | UDEV_BUILTIN_HWDB, | |
| UDEV_BUILTIN_INPUT_ID, | | UDEV_BUILTIN_INPUT_ID, | |
|
| | | #ifdef HAVE_KMOD | |
| UDEV_BUILTIN_KMOD, | | UDEV_BUILTIN_KMOD, | |
|
| | | #endif | |
| | | UDEV_BUILTIN_NET_ID, | |
| UDEV_BUILTIN_PATH_ID, | | UDEV_BUILTIN_PATH_ID, | |
|
| UDEV_BUILTIN_PCI_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 | |
| UDEV_BUILTIN_MAX | | UDEV_BUILTIN_MAX | |
| }; | | }; | |
| 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; | |
| }; | | }; | |
|
| | | #ifdef HAVE_BLKID | |
| extern const struct udev_builtin udev_builtin_blkid; | | extern const struct udev_builtin udev_builtin_blkid; | |
|
| | | #endif | |
| extern const struct udev_builtin udev_builtin_btrfs; | | 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_hwdb; | |
| extern const struct udev_builtin udev_builtin_input_id; | | extern const struct udev_builtin udev_builtin_input_id; | |
|
| | | #ifdef HAVE_KMOD | |
| extern const struct udev_builtin udev_builtin_kmod; | | extern const struct udev_builtin udev_builtin_kmod; | |
|
| | | #endif | |
| | | extern const struct udev_builtin udev_builtin_net_id; | |
| 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_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); | | void udev_builtin_init(struct udev *udev); | |
| void udev_builtin_exit(struct udev *udev); | | void udev_builtin_exit(struct udev *udev); | |
| enum udev_builtin_cmd udev_builtin_lookup(const char *command); | | enum udev_builtin_cmd udev_builtin_lookup(const char *command); | |
| const char *udev_builtin_name(enum udev_builtin_cmd cmd); | | const char *udev_builtin_name(enum udev_builtin_cmd cmd); | |
| bool udev_builtin_run_once(enum udev_builtin_cmd cmd); | | bool udev_builtin_run_once(enum udev_builtin_cmd cmd); | |
| int udev_builtin_run(struct udev_device *dev, enum udev_builtin_cmd cmd, co
nst char *command, bool test); | | int udev_builtin_run(struct udev_device *dev, enum udev_builtin_cmd cmd, co
nst char *command, bool test); | |
| void udev_builtin_list(struct udev *udev); | | void udev_builtin_list(struct udev *udev); | |
| bool udev_builtin_validate(struct udev *udev); | | bool udev_builtin_validate(struct udev *udev); | |
| int udev_builtin_add_property(struct udev_device *dev, bool test, const cha
r *key, const char *val); | | int udev_builtin_add_property(struct udev_device *dev, bool test, const cha
r *key, const char *val); | |
|
| | | int udev_builtin_hwdb_lookup(struct udev_device *dev, const char *modalias,
bool test); | |
| | | | |
| /* udev logging */ | | /* udev logging */ | |
| void udev_main_log(struct udev *udev, int priority, | | void udev_main_log(struct udev *udev, int priority, | |
| const char *file, int line, const char *fn, | | const char *file, int line, const char *fn, | |
| const char *format, va_list args); | | const char *format, va_list args); | |
| | | | |
| /* udevadm commands */ | | /* udevadm commands */ | |
| struct udevadm_cmd { | | struct udevadm_cmd { | |
| const char *name; | | const char *name; | |
| int (*cmd)(struct udev *udev, int argc, char *argv[]); | | int (*cmd)(struct udev *udev, int argc, char *argv[]); | |
| const char *help; | | const char *help; | |
| int debug; | | int debug; | |
| }; | | }; | |
| extern const struct udevadm_cmd udevadm_info; | | extern const struct udevadm_cmd udevadm_info; | |
| extern const struct udevadm_cmd udevadm_trigger; | | extern const struct udevadm_cmd udevadm_trigger; | |
| extern const struct udevadm_cmd udevadm_settle; | | extern const struct udevadm_cmd udevadm_settle; | |
| extern const struct udevadm_cmd udevadm_control; | | extern const struct udevadm_cmd udevadm_control; | |
| extern const struct udevadm_cmd udevadm_monitor; | | extern const struct udevadm_cmd udevadm_monitor; | |
|
| | | extern const struct udevadm_cmd udevadm_hwdb; | |
| extern const struct udevadm_cmd udevadm_test; | | extern const struct udevadm_cmd udevadm_test; | |
| extern const struct udevadm_cmd udevadm_test_builtin; | | extern const struct udevadm_cmd udevadm_test_builtin; | |
| #endif | | #endif | |
| | | | |
End of changes. 17 change blocks. |
| 8 lines changed or deleted | | 18 lines changed or added | |
|
| util.h | | util.h | |
| | | | |
| skipping to change at line 82 | | skipping to change at line 82 | |
| #define NSEC_PER_MONTH (2629800ULL*NSEC_PER_SEC) | | #define NSEC_PER_MONTH (2629800ULL*NSEC_PER_SEC) | |
| #define USEC_PER_YEAR (31557600ULL*USEC_PER_SEC) | | #define USEC_PER_YEAR (31557600ULL*USEC_PER_SEC) | |
| #define NSEC_PER_YEAR (31557600ULL*NSEC_PER_SEC) | | #define NSEC_PER_YEAR (31557600ULL*NSEC_PER_SEC) | |
| | | | |
| /* What is interpreted as whitespace? */ | | /* What is interpreted as whitespace? */ | |
| #define WHITESPACE " \t\n\r" | | #define WHITESPACE " \t\n\r" | |
| #define NEWLINE "\n\r" | | #define NEWLINE "\n\r" | |
| #define QUOTES "\"\'" | | #define QUOTES "\"\'" | |
| #define COMMENTS "#;\n" | | #define COMMENTS "#;\n" | |
| | | | |
|
| #define FORMAT_TIMESTAMP_MAX 64 | | #define FORMAT_TIMESTAMP_MAX (5+11+9+4+1) | |
| #define FORMAT_TIMESTAMP_PRETTY_MAX 256 | | #define FORMAT_TIMESTAMP_PRETTY_MAX 256 | |
| #define FORMAT_TIMESPAN_MAX 64 | | #define FORMAT_TIMESPAN_MAX 64 | |
| #define FORMAT_BYTES_MAX 8 | | #define FORMAT_BYTES_MAX 8 | |
| | | | |
| #define ANSI_HIGHLIGHT_ON "\x1B[1;39m" | | #define ANSI_HIGHLIGHT_ON "\x1B[1;39m" | |
| #define ANSI_HIGHLIGHT_RED_ON "\x1B[1;31m" | | #define ANSI_HIGHLIGHT_RED_ON "\x1B[1;31m" | |
| #define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m" | | #define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m" | |
| #define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m" | | #define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m" | |
| #define ANSI_HIGHLIGHT_OFF "\x1B[0m" | | #define ANSI_HIGHLIGHT_OFF "\x1B[0m" | |
| | | | |
|
| | | bool is_efiboot(void); | |
| | | | |
| usec_t now(clockid_t clock); | | usec_t now(clockid_t clock); | |
| | | | |
| dual_timestamp* dual_timestamp_get(dual_timestamp *ts); | | dual_timestamp* dual_timestamp_get(dual_timestamp *ts); | |
| dual_timestamp* dual_timestamp_from_realtime(dual_timestamp *ts, usec_t u); | | dual_timestamp* dual_timestamp_from_realtime(dual_timestamp *ts, usec_t u); | |
| | | | |
| #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); | |
| | | | |
| | | | |
| skipping to change at line 145 | | skipping to change at line 147 | |
| | | | |
| static inline const char *strna(const char *s) { | | static inline const char *strna(const char *s) { | |
| return s ? s : "n/a"; | | return s ? s : "n/a"; | |
| } | | } | |
| | | | |
| static inline bool isempty(const char *p) { | | static inline bool isempty(const char *p) { | |
| return !p || !p[0]; | | return !p || !p[0]; | |
| } | | } | |
| | | | |
| char *endswith(const char *s, const char *postfix); | | char *endswith(const char *s, const char *postfix); | |
|
| bool startswith(const char *s, const char *prefix); | | char *startswith(const char *s, const char *prefix); | |
| bool startswith_no_case(const char *s, const char *prefix); | | char *startswith_no_case(const char *s, const char *prefix); | |
| | | | |
| bool first_word(const char *s, const char *word); | | bool first_word(const char *s, const char *word); | |
| | | | |
| int close_nointr(int fd); | | int close_nointr(int fd); | |
| void close_nointr_nofail(int fd); | | void close_nointr_nofail(int fd); | |
| void close_many(const int fds[], unsigned n_fd); | | void close_many(const int fds[], unsigned n_fd); | |
| | | | |
| int parse_boolean(const char *v); | | int parse_boolean(const char *v); | |
| int parse_usec(const char *t, usec_t *usec); | | int parse_usec(const char *t, usec_t *usec); | |
| int parse_nsec(const char *t, nsec_t *nsec); | | int parse_nsec(const char *t, nsec_t *nsec); | |
| | | | |
| skipping to change at line 294 | | skipping to change at line 296 | |
| 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_pretty(char *buf, size_t l, usec_t t); | | char *format_timestamp_pretty(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); | |
| | | | |
| int make_stdio(int fd); | | int make_stdio(int fd); | |
| int make_null_stdio(void); | | int make_null_stdio(void); | |
| int make_console_stdio(void); | | int make_console_stdio(void); | |
| | | | |
| unsigned long long random_ull(void); | | unsigned long long random_ull(void); | |
| | | | |
|
| | | /* For basic lookup tables with strictly enumerated entries */ | |
| #define __DEFINE_STRING_TABLE_LOOKUP(name,type,scope) \ | | #define __DEFINE_STRING_TABLE_LOOKUP(name,type,scope) \ | |
| scope const char *name##_to_string(type i) { \ | | scope const char *name##_to_string(type i) { \ | |
| if (i < 0 || i >= (type) ELEMENTSOF(name##_table)) \ | | if (i < 0 || i >= (type) ELEMENTSOF(name##_table)) \ | |
| return NULL; \ | | return NULL; \ | |
| return name##_table[i]; \ | | return name##_table[i]; \ | |
| } \ | | } \ | |
| scope type name##_from_string(const char *s) { \ | | scope type name##_from_string(const char *s) { \ | |
| type i; \ | | type i; \ | |
|
| unsigned u = 0; \ | | | |
| assert(s); \ | | assert(s); \ | |
| for (i = 0; i < (type)ELEMENTSOF(name##_table); i++) \ | | for (i = 0; i < (type)ELEMENTSOF(name##_table); i++) \ | |
| if (name##_table[i] && \ | | if (name##_table[i] && \ | |
| streq(name##_table[i], s)) \ | | streq(name##_table[i], s)) \ | |
| return i; \ | | return i; \ | |
|
| if (safe_atou(s, &u) >= 0 && \ | | | |
| u < ELEMENTSOF(name##_table)) \ | | | |
| return (type) u; \ | | | |
| return (type) -1; \ | | return (type) -1; \ | |
| } \ | | } \ | |
| struct __useless_struct_to_allow_trailing_semicolon__ | | struct __useless_struct_to_allow_trailing_semicolon__ | |
| | | | |
| #define DEFINE_STRING_TABLE_LOOKUP(name,type) __DEFINE_STRING_TABLE_LOOKUP(
name,type,) | | #define DEFINE_STRING_TABLE_LOOKUP(name,type) __DEFINE_STRING_TABLE_LOOKUP(
name,type,) | |
| #define DEFINE_PRIVATE_STRING_TABLE_LOOKUP(name,type) __DEFINE_STRING_TABLE
_LOOKUP(name,type,static) | | #define DEFINE_PRIVATE_STRING_TABLE_LOOKUP(name,type) __DEFINE_STRING_TABLE
_LOOKUP(name,type,static) | |
| | | | |
|
| | | /* For string conversions where numbers are also acceptable */ | |
| | | #define DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(name,type,max) \ | |
| | | int name##_to_string_alloc(type i, char **str) { \ | |
| | | char *s; \ | |
| | | int r; \ | |
| | | if (i < 0 || i > max) \ | |
| | | return -ERANGE; \ | |
| | | if (i < (type) ELEMENTSOF(name##_table)) { \ | |
| | | s = strdup(name##_table[i]); \ | |
| | | if (!s) \ | |
| | | return log_oom(); \ | |
| | | } else { \ | |
| | | r = asprintf(&s, "%u", i); \ | |
| | | if (r < 0) \ | |
| | | return log_oom(); \ | |
| | | } \ | |
| | | *str = s; \ | |
| | | return 0; \ | |
| | | } \ | |
| | | type name##_from_string(const char *s) { \ | |
| | | type i; \ | |
| | | unsigned u = 0; \ | |
| | | assert(s); \ | |
| | | for (i = 0; i < (type)ELEMENTSOF(name##_table); i++) \ | |
| | | if (name##_table[i] && \ | |
| | | streq(name##_table[i], s)) \ | |
| | | return i; \ | |
| | | if (safe_atou(s, &u) >= 0 && u <= max) \ | |
| | | return (type) u; \ | |
| | | return (type) -1; \ | |
| | | } \ | |
| | | struct __useless_struct_to_allow_trailing_semicolon__ | |
| | | | |
| int fd_nonblock(int fd, bool nonblock); | | int fd_nonblock(int fd, bool nonblock); | |
| int fd_cloexec(int fd, bool cloexec); | | int fd_cloexec(int fd, bool cloexec); | |
| | | | |
| int close_all_fds(const int except[], unsigned n_except); | | int close_all_fds(const int except[], unsigned n_except); | |
| | | | |
| bool fstype_is_network(const char *fstype); | | bool fstype_is_network(const char *fstype); | |
| | | | |
| int chvt(int vt); | | int chvt(int vt); | |
| | | | |
| int read_one_char(FILE *f, char *ret, usec_t timeout, bool *need_nl); | | int read_one_char(FILE *f, char *ret, usec_t timeout, bool *need_nl); | |
| | | | |
| skipping to change at line 481 | | skipping to change at line 513 | |
| int file_is_priv_sticky(const char *p); | | int file_is_priv_sticky(const char *p); | |
| | | | |
| int strdup_or_null(const char *a, char **b); | | int strdup_or_null(const char *a, char **b); | |
| | | | |
| #define NULSTR_FOREACH(i, l) \ | | #define NULSTR_FOREACH(i, l) \ | |
| for ((i) = (l); (i) && *(i); (i) = strchr((i), 0)+1) | | for ((i) = (l); (i) && *(i); (i) = strchr((i), 0)+1) | |
| | | | |
| #define NULSTR_FOREACH_PAIR(i, j, l) \ | | #define NULSTR_FOREACH_PAIR(i, j, l) \ | |
| for ((i) = (l), (j) = strchr((i), 0)+1; (i) && *(i); (i) = strchr((
j), 0)+1, (j) = *(i) ? strchr((i), 0)+1 : (i)) | | for ((i) = (l), (j) = strchr((i), 0)+1; (i) && *(i); (i) = strchr((
j), 0)+1, (j) = *(i) ? strchr((i), 0)+1 : (i)) | |
| | | | |
|
| const char *ioprio_class_to_string(int i); | | int ioprio_class_to_string_alloc(int i, char **s); | |
| int ioprio_class_from_string(const char *s); | | int ioprio_class_from_string(const char *s); | |
| | | | |
| const char *sigchld_code_to_string(int i); | | const char *sigchld_code_to_string(int i); | |
| int sigchld_code_from_string(const char *s); | | int sigchld_code_from_string(const char *s); | |
| | | | |
|
| const char *log_facility_unshifted_to_string(int i); | | int log_facility_unshifted_to_string_alloc(int i, char **s); | |
| int log_facility_unshifted_from_string(const char *s); | | int log_facility_unshifted_from_string(const char *s); | |
| | | | |
|
| const char *log_level_to_string(int i); | | int log_level_to_string_alloc(int i, char **s); | |
| int log_level_from_string(const char *s); | | int log_level_from_string(const char *s); | |
| | | | |
|
| const char *sched_policy_to_string(int i); | | int sched_policy_to_string_alloc(int i, char **s); | |
| int sched_policy_from_string(const char *s); | | int sched_policy_from_string(const char *s); | |
| | | | |
| const char *rlimit_to_string(int i); | | const char *rlimit_to_string(int i); | |
| int rlimit_from_string(const char *s); | | int rlimit_from_string(const char *s); | |
| | | | |
|
| const char *ip_tos_to_string(int i); | | int ip_tos_to_string_alloc(int i, char **s); | |
| int ip_tos_from_string(const char *s); | | int ip_tos_from_string(const char *s); | |
| | | | |
| const char *signal_to_string(int i); | | const char *signal_to_string(int i); | |
| int signal_from_string(const char *s); | | int signal_from_string(const char *s); | |
| | | | |
| int signal_from_string_try_harder(const char *s); | | int signal_from_string_try_harder(const char *s); | |
| | | | |
| extern int saved_argc; | | extern int saved_argc; | |
| extern char **saved_argv; | | extern char **saved_argv; | |
| | | | |
| | | | |
| skipping to change at line 532 | | skipping to change at line 564 | |
| 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); | |
| | | | |
| int getenv_for_pid(pid_t pid, const char *field, char **_value); | | int getenv_for_pid(pid_t pid, const char *field, char **_value); | |
| | | | |
| int can_sleep(const char *type); | | int can_sleep(const char *type); | |
|
| | | int can_sleep_disk(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); | |
| | | | |
| | | | |
| skipping to change at line 570 | | skipping to change at line 603 | |
| } | | } | |
| | | | |
| bool filename_is_safe(const char *p); | | bool filename_is_safe(const char *p); | |
| bool string_is_safe(const char *p); | | bool string_is_safe(const char *p); | |
| | | | |
| int parse_timestamp(const char *t, usec_t *usec); | | int parse_timestamp(const char *t, usec_t *usec); | |
| | | | |
| void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t si
ze, | | void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t si
ze, | |
| int (*compar) (const void *, const void *, void *), | | int (*compar) (const void *, const void *, void *), | |
| void *arg); | | void *arg); | |
|
| | | | |
| | | bool is_locale_utf8(void); | |
| | | | |
| | | typedef enum DrawSpecialChar { | |
| | | DRAW_TREE_VERT, | |
| | | DRAW_TREE_BRANCH, | |
| | | DRAW_TREE_RIGHT, | |
| | | DRAW_TRIANGULAR_BULLET, | |
| | | _DRAW_SPECIAL_CHAR_MAX | |
| | | } DrawSpecialChar; | |
| | | const char *draw_special_char(DrawSpecialChar ch); | |
| | | | |
| | | char *strreplace(const char *text, const char *old_string, const char *new_ | |
| | | string); | |
| | | | |
End of changes. 14 change blocks. |
| 12 lines changed or deleted | | 45 lines changed or added | |
|