btrfs-progs: docs: add path-utils.h API docs

[ ci skip ]

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2024-09-17 16:04:19 +02:00
parent 4ca6444fba
commit 5b7f6a4a5b

View File

@ -34,6 +34,17 @@ Printing options is done by `pretty_size_mode` which takes the value and option
mode. Default mode is human readable, the macros defining the modes are from
`UNITS_*` namespace.
File path handling
------------------
Files: :file:`common/path-utils.h`
The paths on Linux can be at most PATH_MAX, which is 4096 (:command:`getconf`).
For easier handling use a local variable like :code:`char path[PATH_MAX] = { 0 };`
and for concatenation helpers :code:`path_cat_out()` or
:code:`path_cat_out3()` and check the error values for overflows. There are
helpers to check file type :code:`path_is_*()`.
TODO
----
@ -44,8 +55,6 @@ Undocumented or incomplete APIs:
* common/device-utils.h
* common/messages.h
* common/open-utils.h
* common/path-utils.h
* common/sort-utils.h
* common/string-table.h
* common/string-table.h
* common/task-utils.h