X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flibudev%2Flibudev-private.h;h=af0f125c7391c8633b5811346a90e2b14c002d3c;hb=5972fe953ec56c77936a1e612ca87d8a0e6c0c64;hp=e3fc9a76f4f82aa8d73f4d754a7638bb9dc3316d;hpb=40fe8b11be9c1a1b38b91db097a5d6ebfa99304c;p=elogind.git diff --git a/src/libudev/libudev-private.h b/src/libudev/libudev-private.h index e3fc9a76f..af0f125c7 100644 --- a/src/libudev/libudev-private.h +++ b/src/libudev/libudev-private.h @@ -1,13 +1,21 @@ -/* - * libudev - interface to udev device information - * - * Copyright (C) 2008-2012 Kay Sievers - * - * 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. - */ +/*** + This file is part of systemd. + + Copyright 2008-2012 Kay Sievers + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (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 . +***/ #ifndef _LIBUDEV_PRIVATE_H_ #define _LIBUDEV_PRIVATE_H_ @@ -21,6 +29,7 @@ #include "macro.h" #include "util.h" #include "mkdir.h" +#include "strxcpyx.h" #define READ_END 0 #define WRITE_END 1 @@ -39,8 +48,7 @@ /* libudev.c */ void udev_log(struct udev *udev, int priority, const char *file, int line, const char *fn, - const char *format, ...) - __attribute__((format(printf, 6, 7))); + const char *format, ...) _printf_(6, 7); 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 *key, const char *value); struct udev_list_entry *udev_get_properties_list_entry(struct udev *udev); @@ -48,9 +56,10 @@ struct udev_list_entry *udev_get_properties_list_entry(struct udev *udev); /* libudev-device.c */ struct udev_device *udev_device_new(struct udev *udev); mode_t udev_device_get_devnode_mode(struct udev_device *udev_device); +uid_t udev_device_get_devnode_uid(struct udev_device *udev_device); +gid_t udev_device_get_devnode_gid(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 *syspath); -int udev_device_set_devnode(struct udev_device *udev_device, const char *devnode); int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink); void udev_device_cleanup_devlinks_list(struct udev_device *udev_device); struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value); @@ -119,8 +128,6 @@ void udev_list_cleanup(struct udev_list *list); struct udev_list_entry *udev_list_get_entry(struct udev_list *list); struct udev_list_entry *udev_list_entry_add(struct udev_list *list, const char *name, const char *value); void udev_list_entry_delete(struct udev_list_entry *entry); -void udev_list_entry_insert_before(struct udev_list_entry *new, struct udev_list_entry *entry); -void udev_list_entry_append(struct udev_list_entry *new, struct udev_list *list); int udev_list_entry_get_num(struct udev_list_entry *list_entry); void udev_list_entry_set_num(struct udev_list_entry *list_entry, int num); #define udev_list_entry_foreach_safe(entry, tmp, first) \ @@ -154,10 +161,6 @@ int util_resolve_sys_link(struct udev *udev, char *syspath, size_t size); int util_log_priority(const char *priority); size_t util_path_encode(const char *src, char *dest, size_t size); void util_remove_trailing_chars(char *path, char c); -size_t util_strpcpy(char **dest, size_t size, const char *src); -size_t util_strpcpyl(char **dest, size_t size, const char *src, ...) __attribute__((sentinel)); -size_t util_strscpy(char *dest, size_t size, const char *src); -size_t util_strscpyl(char *dest, size_t size, const char *src, ...) __attribute__((sentinel)); int util_replace_whitespace(const char *str, char *to, size_t len); int util_replace_chars(char *str, const char *white); unsigned int util_string_hash32(const char *key); @@ -168,5 +171,6 @@ int util_delete_path(struct udev *udev, const char *path); uid_t util_lookup_user(struct udev *udev, const char *user); gid_t util_lookup_group(struct udev *udev, const char *group); int util_resolve_subsys_kernel(struct udev *udev, const char *string, char *result, size_t maxsize, int read_value); -ssize_t print_kmsg(const char *fmt, ...) __attribute__((format(printf, 1, 2))); +ssize_t print_kmsg(const char *fmt, ...) _printf_(1, 2); + #endif