X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udev%2Flib%2Flibudev-private.h;h=1e47d510803f58d4da056823cda78a74d1014876;hp=2f8b8259b5ffa7d07e4846fe6c18b536d873102b;hb=4b09a2fc4383f191d96a8d6134b95a4b84aef931;hpb=77b852f3334311575b9c19ffb29d4a77a21b4bb2 diff --git a/udev/lib/libudev-private.h b/udev/lib/libudev-private.h index 2f8b8259b..1e47d5108 100644 --- a/udev/lib/libudev-private.h +++ b/udev/lib/libudev-private.h @@ -3,18 +3,10 @@ * * Copyright (C) 2008 Kay Sievers * - * 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 - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. */ #ifndef _LIBUDEV_PRIVATE_H_ @@ -56,6 +48,7 @@ extern struct udev_list_entry *udev_get_properties_list_entry(struct udev *udev) /* libudev-device */ extern int udev_device_set_syspath(struct udev_device *udev_device, const char *syspath); extern int udev_device_set_subsystem(struct udev_device *udev_device, const char *subsystem); +extern int udev_device_set_devtype(struct udev_device *udev_device, const char *devtype); extern int udev_device_set_devnode(struct udev_device *udev_device, const char *devnode); extern int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink); extern void udev_device_cleanup_devlinks_list(struct udev_device *udev_device); @@ -83,6 +76,8 @@ extern int udev_device_get_devlink_priority(struct udev_device *udev_device); extern int udev_device_set_devlink_priority(struct udev_device *udev_device, int prio); extern int udev_device_get_ignore_remove(struct udev_device *udev_device); extern int udev_device_set_ignore_remove(struct udev_device *udev_device, int ignore); +extern int udev_device_get_watch_handle(struct udev_device *udev_device); +extern int udev_device_set_watch_handle(struct udev_device *udev_device, int handle); extern void udev_device_set_info_loaded(struct udev_device *device); /* libudev-device-db-write.c */ @@ -106,6 +101,7 @@ extern int udev_ctrl_send_set_log_level(struct udev_ctrl *uctrl, int priority); extern int udev_ctrl_send_stop_exec_queue(struct udev_ctrl *uctrl); extern int udev_ctrl_send_start_exec_queue(struct udev_ctrl *uctrl); extern int udev_ctrl_send_reload_rules(struct udev_ctrl *uctrl); +extern int udev_ctrl_send_settle(struct udev_ctrl *uctrl); extern int udev_ctrl_send_set_env(struct udev_ctrl *uctrl, const char *key); extern int udev_ctrl_send_set_max_childs(struct udev_ctrl *uctrl, int count); struct udev_ctrl_msg; @@ -117,6 +113,7 @@ extern int udev_ctrl_get_set_log_level(struct udev_ctrl_msg *ctrl_msg); extern int udev_ctrl_get_stop_exec_queue(struct udev_ctrl_msg *ctrl_msg); extern int udev_ctrl_get_start_exec_queue(struct udev_ctrl_msg *ctrl_msg); extern int udev_ctrl_get_reload_rules(struct udev_ctrl_msg *ctrl_msg); +extern pid_t udev_ctrl_get_settle(struct udev_ctrl_msg *ctrl_msg); extern const char *udev_ctrl_get_set_env(struct udev_ctrl_msg *ctrl_msg); extern int udev_ctrl_get_set_max_childs(struct udev_ctrl_msg *ctrl_msg); @@ -159,9 +156,10 @@ extern int udev_queue_export_device_finished(struct udev_queue *udev_queue, stru extern int udev_queue_export_device_failed(struct udev_queue *udev_queue, struct udev_device *udev_device); /* libudev-utils */ -#define UTIL_PATH_SIZE 1024 -#define UTIL_LINE_SIZE 2048 -#define UTIL_NAME_SIZE 512 +#define UTIL_PATH_SIZE 1024 +#define UTIL_LINE_SIZE 2048 +#define UTIL_NAME_SIZE 512 +#define UDEV_ALLOWED_CHARS_INPUT "/ $%?," extern ssize_t util_get_sys_subsystem(struct udev *udev, const char *syspath, char *subsystem, size_t size); extern ssize_t util_get_sys_driver(struct udev *udev, const char *syspath, char *driver, size_t size); extern int util_resolve_sys_link(struct udev *udev, char *syspath, size_t size); @@ -171,5 +169,8 @@ extern size_t util_path_decode(char *s); extern void util_remove_trailing_chars(char *path, char c); extern size_t util_strlcpy(char *dst, const char *src, size_t size); extern size_t util_strlcat(char *dst, const char *src, size_t size); -extern int util_replace_chars(char *str, const char *white); +extern int udev_util_replace_whitespace(const char *str, char *to, size_t len); +extern int udev_util_replace_chars(char *str, const char *white); +extern int udev_util_encode_string(const char *str, char *str_enc, size_t len); +extern void util_set_fd_cloexec(int fd); #endif