1 What: /sys/.../uevent 1 What: /sys/.../uevent 2 Date: May 2017 2 Date: May 2017 3 KernelVersion: 4.13 3 KernelVersion: 4.13 4 Contact: Linux kernel mailing list <linu 4 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> 5 Description: 5 Description: 6 Enable passing additional vari 6 Enable passing additional variables for synthetic uevents that 7 are generated by writing /sys/ 7 are generated by writing /sys/.../uevent file. 8 8 9 Recognized extended format is: 9 Recognized extended format is:: 10 10 11 ACTION [UUID [KEY=VALU 11 ACTION [UUID [KEY=VALUE ...] 12 12 13 The ACTION is compulsory - it 13 The ACTION is compulsory - it is the name of the uevent 14 action (``add``, ``change``, ` 14 action (``add``, ``change``, ``remove``). There is no change 15 compared to previous functiona 15 compared to previous functionality here. The rest of the 16 extended format is optional. 16 extended format is optional. 17 17 18 You need to pass UUID first be 18 You need to pass UUID first before any KEY=VALUE pairs. 19 The UUID must be in ``xxxxxxxx 19 The UUID must be in ``xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`` 20 format where 'x' is a hex digi 20 format where 'x' is a hex digit. The UUID is considered to be 21 a transaction identifier so it 21 a transaction identifier so it's possible to use the same UUID 22 value for one or more syntheti 22 value for one or more synthetic uevents in which case we 23 logically group these uevents 23 logically group these uevents together for any userspace 24 listeners. The UUID value appe 24 listeners. The UUID value appears in uevent as 25 ``SYNTH_UUID=xxxxxxxx-xxxx-xxx 25 ``SYNTH_UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`` environment 26 variable. 26 variable. 27 27 28 If UUID is not passed in, the 28 If UUID is not passed in, the generated synthetic uevent gains 29 ``SYNTH_UUID=0`` environment v 29 ``SYNTH_UUID=0`` environment variable automatically. 30 30 31 The KEY=VALUE pairs can contai 31 The KEY=VALUE pairs can contain alphanumeric characters only. 32 32 33 It's possible to define zero o 33 It's possible to define zero or more pairs - each pair is then 34 delimited by a space character 34 delimited by a space character ' '. Each pair appears in 35 synthetic uevent as ``SYNTH_AR 35 synthetic uevent as ``SYNTH_ARG_KEY=VALUE``. That means the KEY 36 name gains ``SYNTH_ARG_`` pref 36 name gains ``SYNTH_ARG_`` prefix to avoid possible collisions 37 with existing variables. 37 with existing variables. 38 38 39 Example of valid sequence writ 39 Example of valid sequence written to the uevent file:: 40 40 41 add fe4d7c9d-b8c6-4a70-9ef 41 add fe4d7c9d-b8c6-4a70-9ef1-3d8a58d18eed A=1 B=abc 42 42 43 This generates synthetic ueven 43 This generates synthetic uevent including these variables:: 44 44 45 ACTION=add 45 ACTION=add 46 SYNTH_ARG_A=1 46 SYNTH_ARG_A=1 47 SYNTH_ARG_B=abc 47 SYNTH_ARG_B=abc 48 SYNTH_UUID=fe4d7c9d-b8c6-4 48 SYNTH_UUID=fe4d7c9d-b8c6-4a70-9ef1-3d8a58d18eed 49 49 50 Users: 50 Users: 51 udev, userspace tools generati 51 udev, userspace tools generating synthetic uevents
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.