Skip to content

Commit 58a21bf

Browse files
phepworthcfriedt
authored andcommitted
doc: fs: document preconditions with fs_open & fs_opendir
fs_open and fs_opendir rely on the structures in the first param being intialized. (The init functions are documented with the type declarations.) This simple documentation change mentions this need to initialize (and emphasizes it). (Users of similar APIs such as POSIX open and opendir do not expect this initialization need.) Fixes zephyrproject-rtos#97205 Signed-off-by: Paul Hepworth <[email protected]>
1 parent 1beb3d3 commit 58a21bf

File tree

1 file changed

+2
-2
lines changed
  • include/zephyr/fs

1 file changed

+2
-2
lines changed

include/zephyr/fs/fs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ static inline void fs_dir_t_init(struct fs_dir_t *zdp)
297297
* @warning If @p flags are set to 0 the function will open file, if it exists
298298
* and is accessible, but you will have no read/write access to it.
299299
*
300-
* @param zfp Pointer to a file object
300+
* @param zfp Pointer to an @b initialized file object
301301
* @param file_name The name of a file to open
302302
* @param flags The mode flags
303303
*
@@ -506,7 +506,7 @@ int fs_mkdir(const char *path);
506506
*
507507
* Opens an existing directory specified by the path.
508508
*
509-
* @param zdp Pointer to the directory object
509+
* @param zdp Pointer to the @b initialized directory object
510510
* @param path Path to the directory to open
511511
*
512512
* @retval 0 on success;

0 commit comments

Comments
 (0)