Attributes can be exported for kobjects in the form of regular files in
the filesystem. Sysfs forwards file I/O operations to methods defined
for the attributes, providing a means to read and write kernel
attributes.
Attributes should be ASCII text files, preferably with only one value
per file. It is noted that it may not be efficient to contain only one
value per file, so it is socially acceptable to express an array of
values of the same type.
Mixing types, expressing multiple lines of data, and doing fancy
formatting of data is heavily frowned upon. Doing these things may get
you publicly humiliated and your code rewritten without notice.
A bare attribute contains no means to read or write the value of the
attribute. Subsystems are encouraged to define their own attribute
structure and wrapper functions for adding and removing attributes for
a specific object type.
For example, the driver model defines struct device_attribute like:
C’est donc bien le noyau qui exporte les données. Ceci dit il est possible qu’il y ait aussi une ou des bases de données pour renseigner les info (c’est le cas des lspci&co), mais de ce que j’ai compris ça n’est pas lié à udev.
[^] # Re: la règle est bonne, mais...
Posté par Pierre Roc . En réponse au message Problème avec des règles udev. Évalué à 1.
En particulier :
C’est donc bien le noyau qui exporte les données. Ceci dit il est possible qu’il y ait aussi une ou des bases de données pour renseigner les info (c’est le cas des lspci&co), mais de ce que j’ai compris ça n’est pas lié à udev.