doc: update doc for fsck handler API

Add doc for the `info` function.
This commit is contained in:
CismonX 2025-01-23 18:02:10 +08:00
parent 228f1b621e
commit 0510e5e8c0
No known key found for this signature in database
GPG key ID: 3094873E29A482FB

View file

@ -1801,8 +1801,42 @@ struct bookmarkfs_fsck_handler @{
@};
@end example
Each field is a function pointer provided by the fsck handler,
all of which are mandatory (must not be @code{NULL}).
Each field is a function pointer provided by the fsck handler.
Some can be optional and set to @code{NULL}, if the backend
does not support the corresponding features.
@node Get Handler Information
@subsection Get Handler Information
If not @code{NULL}, the @code{info} function is called when the user
instructs @command{fsck.bookmarkfs} to print information about the handler.
When this function is called, the handler should write a human-readable
message of the corresponding information to standard output.
@example c
typedef void (bookmarkfs_fsck_handler_info_func) (
uint32_t flags
);
@end example
Function arguments:
@table @code
@item flags
A bit array of the following flags:
@table @code
@item BOOKMARKFS_FSCK_HANDLER_INFO_HELP
@item BOOKMARKFS_FSCK_HANDLER_INFO_VERSION
Indicates that the backend should print a help/version message.
These flags are analogous to the corresponding flags in the
@code{backend_info} function of the backend API.
@xref{Get Backend Information}.
@end table
@end table
@node General Index