udevadm: make use of the new uuid-enabled triggering for "udevadm trigger"
This adds two things: - A new switch --uuid is added to "udevadm trigger". If specified a random UUID is associated with the synthettic uevent and it is printed to stdout. It may then be used manually to match up uevents as they propagate through the system. - The UUID logic is now implicitly enabled if "udevadm trigger --settle" is used, in order to wait for precisely the uevents we actually trigger. Fallback support is kept for pre-4.13 kernels (where the requests for trigger uevents with uuids results in EINVAL).
This commit is contained in:
@@ -57,6 +57,9 @@ void path_hash_func(const char *q, struct siphash *state) {
|
||||
DEFINE_HASH_OPS(path_hash_ops, char, path_hash_func, path_compare);
|
||||
DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR(path_hash_ops_free,
|
||||
char, path_hash_func, path_compare, free);
|
||||
DEFINE_HASH_OPS_FULL(path_hash_ops_free_free,
|
||||
char, path_hash_func, path_compare, free,
|
||||
void, free);
|
||||
|
||||
void trivial_hash_func(const void *p, struct siphash *state) {
|
||||
siphash24_compress(&p, sizeof(p), state);
|
||||
|
||||
@@ -82,6 +82,7 @@ extern const struct hash_ops string_hash_ops_free_free;
|
||||
void path_hash_func(const char *p, struct siphash *state);
|
||||
extern const struct hash_ops path_hash_ops;
|
||||
extern const struct hash_ops path_hash_ops_free;
|
||||
extern const struct hash_ops path_hash_ops_free_free;
|
||||
|
||||
/* This will compare the passed pointers directly, and will not dereference them. This is hence not useful for strings
|
||||
* or suchlike. */
|
||||
|
||||
Reference in New Issue
Block a user