diff options
| author | Karel Zak <kzak@redhat.com> | 2024-12-03 18:56:41 +0100 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2025-01-08 13:58:13 +0100 |
| commit | 33c42f5b1728585c012f01121a6126e845e8e68b (patch) | |
| tree | 7757c08165e63033baeb36dd7aa33eecb1ce698e /libmount/src/utils.c | |
| parent | df67bcc130daf634b190082cd8199e4ec64723ec (diff) | |
| download | util-linux-33c42f5b1728585c012f01121a6126e845e8e68b.tar.gz | |
libmount: read all types of kernel messages
Previously, libmount only read error messages from fsopen() file
descriptor. This commit improves the library to read all messages
and keep them in their original format ("<type> <mesg>") in the library mount context.
Applications can now read all messages by using mnt_context_get_mesgs().
Furthermore, private functions have been implemented to include new
library-specific messages in the log. Currently, these messages are
only managed in mnt_context_get_excode(), but it would be beneficial
to relocate them to the appropriate locations where errors are
triggered.
In the future, mnt_context_get_excode() should only be utilized by
basic applications that require an one error message. For more
critical purposes (e.g. mount(8)), it will be recommended to utilize
the messages array.
The public function mnt_context_get_excode() has been modified to use
the new functionality and provide messages in a backwardly compatible
way.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/utils.c')
0 files changed, 0 insertions, 0 deletions
