mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 19:58:50 +00:00
doc: update backend API
Add doc for the `backend_mkfs` function.
This commit is contained in:
parent
6cae25ee7f
commit
93ff8cabe9
1 changed files with 49 additions and 0 deletions
|
@ -1600,6 +1600,7 @@ Function arguments:
|
||||||
@item conf
|
@item conf
|
||||||
Backend configuration items.
|
Backend configuration items.
|
||||||
|
|
||||||
|
@anchor{Backend Configuration}
|
||||||
The @code{bookmarkfs_backend_conf} structure is defined as:
|
The @code{bookmarkfs_backend_conf} structure is defined as:
|
||||||
|
|
||||||
@example c
|
@example c
|
||||||
|
@ -1984,6 +1985,54 @@ but the backend may return other error codes which it sees fit.
|
||||||
Also @pxref{Error Codes}.
|
Also @pxref{Error Codes}.
|
||||||
|
|
||||||
|
|
||||||
|
@node Create Bookmark Storage
|
||||||
|
@subsection Create Bookmark Storage
|
||||||
|
|
||||||
|
The @code{backend_mkfs} function is called by the @command{mkfs.bookmarkfs}
|
||||||
|
program to create a new bookmark storage.
|
||||||
|
It can be @code{NULL}.
|
||||||
|
|
||||||
|
The new bookmark storage should be able to be opened directly, by both
|
||||||
|
@code{backend_create} and the application that owns the bookmark storage.
|
||||||
|
|
||||||
|
Type of the @code{backend_mkfs} function is defined as:
|
||||||
|
|
||||||
|
@example c
|
||||||
|
typedef int (bookmarkfs_backend_mkfs_func) (
|
||||||
|
struct bookmarkfs_backend_conf const *conf
|
||||||
|
);
|
||||||
|
@end example
|
||||||
|
|
||||||
|
Function arguments:
|
||||||
|
|
||||||
|
@table @code
|
||||||
|
@item conf
|
||||||
|
@xref{Backend Configuration} for the definition of the
|
||||||
|
@code{bookmarkfs_backend_conf} structure.
|
||||||
|
|
||||||
|
Some fields should be handled differently from @code{backend_create}:
|
||||||
|
@table @code
|
||||||
|
@item flags
|
||||||
|
A bit array of the following flags:
|
||||||
|
|
||||||
|
@table @code
|
||||||
|
@item BOOKMARKFS_BACKEND_MKFS_FORCE
|
||||||
|
Indicates that the @option{-o force} option is given to
|
||||||
|
@command{mkfs.bookmarkfs}.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@item store_path
|
||||||
|
Path to the bookmark storage to be created, equivalent to the
|
||||||
|
@code{store_path} passed to @code{backend_create}.
|
||||||
|
|
||||||
|
The backend should not overwrite existing bookmark storage, unless
|
||||||
|
the @code{BOOKMARKFS_BACKEND_MKFS_FORCE} flag is given.
|
||||||
|
@end table
|
||||||
|
@end table
|
||||||
|
|
||||||
|
The function should return @t{0} on success, and @t{-1} on error.
|
||||||
|
|
||||||
|
|
||||||
@node Filesystem-Check Handlers
|
@node Filesystem-Check Handlers
|
||||||
@chapter Filesystem-Check Handlers
|
@chapter Filesystem-Check Handlers
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue