X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fudev%2Fudev.h;h=b54cb58fc32ed5696953f2407f54fd5d25899601;hp=d160a86dfb23a19a4555d756f8984b4652479b6e;hb=22582bb2cbe85b40de5f561589e0468dac769515;hpb=0bb91b50100e4633a0e68135854e606653055748 diff --git a/src/udev/udev.h b/src/udev/udev.h index d160a86df..b54cb58fc 100644 --- a/src/udev/udev.h +++ b/src/udev/udev.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2003 Greg Kroah-Hartman - * Copyright (C) 2003-2010 Kay Sievers + * Copyright (C) 2003-2010 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 @@ -41,15 +41,17 @@ struct udev_event { gid_t gid; struct udev_list run_list; int exec_delay; - unsigned long long birth_usec; - unsigned long long timeout_usec; + usec_t birth_usec; + usec_t timeout_usec; int fd_signal; unsigned int builtin_run; unsigned int builtin_ret; bool sigterm; bool inotify_watch; bool inotify_watch_final; + bool group_set; bool group_final; + bool owner_set; bool owner_final; bool mode_set; bool mode_final; @@ -93,7 +95,7 @@ void udev_watch_end(struct udev *udev, struct udev_device *dev); struct udev_device *udev_watch_lookup(struct udev *udev, int wd); /* udev-node.c */ -void udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid); +void udev_node_add(struct udev_device *dev, bool apply, mode_t mode, uid_t uid, gid_t gid); void udev_node_remove(struct udev_device *dev); void udev_node_update_old_links(struct udev_device *dev, struct udev_device *dev_old); @@ -134,14 +136,18 @@ int udev_ctrl_get_set_children_max(struct udev_ctrl_msg *ctrl_msg); /* built-in commands */ enum udev_builtin_cmd { +#ifdef HAVE_BLKID UDEV_BUILTIN_BLKID, +#endif UDEV_BUILTIN_BTRFS, UDEV_BUILTIN_FIRMWARE, + UDEV_BUILTIN_HWDB, UDEV_BUILTIN_INPUT_ID, +#ifdef HAVE_KMOD UDEV_BUILTIN_KMOD, +#endif + UDEV_BUILTIN_NET_ID, UDEV_BUILTIN_PATH_ID, - UDEV_BUILTIN_PCI_DB, - UDEV_BUILTIN_USB_DB, UDEV_BUILTIN_USB_ID, #ifdef HAVE_ACL UDEV_BUILTIN_UACCESS, @@ -157,17 +163,21 @@ struct udev_builtin { bool (*validate)(struct udev *udev); bool run_once; }; +#ifdef HAVE_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_firmware; +extern const struct udev_builtin udev_builtin_hwdb; extern const struct udev_builtin udev_builtin_input_id; +#ifdef HAVE_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_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_uaccess; -int udev_builtin_init(struct udev *udev); +void udev_builtin_init(struct udev *udev); void udev_builtin_exit(struct udev *udev); enum udev_builtin_cmd udev_builtin_lookup(const char *command); const char *udev_builtin_name(enum udev_builtin_cmd cmd); @@ -176,6 +186,7 @@ int udev_builtin_run(struct udev_device *dev, enum udev_builtin_cmd cmd, const c void udev_builtin_list(struct udev *udev); bool udev_builtin_validate(struct udev *udev); int udev_builtin_add_property(struct udev_device *dev, bool test, const char *key, const char *val); +int udev_builtin_hwdb_lookup(struct udev_device *dev, const char *modalias, bool test); /* udev logging */ void udev_main_log(struct udev *udev, int priority, @@ -194,6 +205,7 @@ extern const struct udevadm_cmd udevadm_trigger; extern const struct udevadm_cmd udevadm_settle; extern const struct udevadm_cmd udevadm_control; 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_builtin; #endif