Skip to content

Commit 5b7f6a4

Browse files
committed
btrfs-progs: docs: add path-utils.h API docs
[ ci skip ] Signed-off-by: David Sterba <[email protected]>
1 parent 4ca6444 commit 5b7f6a4

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Documentation/dev/dev-internal-apis.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ Printing options is done by `pretty_size_mode` which takes the value and option
3434
mode. Default mode is human readable, the macros defining the modes are from
3535
`UNITS_*` namespace.
3636

37+
File path handling
38+
------------------
39+
40+
Files: :file:`common/path-utils.h`
41+
42+
The paths on Linux can be at most PATH_MAX, which is 4096 (:command:`getconf`).
43+
For easier handling use a local variable like :code:`char path[PATH_MAX] = { 0 };`
44+
and for concatenation helpers :code:`path_cat_out()` or
45+
:code:`path_cat_out3()` and check the error values for overflows. There are
46+
helpers to check file type :code:`path_is_*()`.
47+
3748
TODO
3849
----
3950

@@ -44,8 +55,6 @@ Undocumented or incomplete APIs:
4455
* common/device-utils.h
4556
* common/messages.h
4657
* common/open-utils.h
47-
* common/path-utils.h
4858
* common/sort-utils.h
4959
* common/string-table.h
50-
* common/string-table.h
5160
* common/task-utils.h

0 commit comments

Comments
 (0)