Lines Matching +full:0 +full:x01 +full:- +full:negative

3  * Copyright (c) 2020-2024 Nordic Semiconductor ASA
5 * SPDX-License-Identifier: Apache-2.0
24 * @version 1.0.0
35 FS_DIR_ENTRY_FILE = 0,
42 * Zephyr supports in-tree file systems and external ones. Each
46 * in-tree file systems.
55 /** Identifier for in-tree FatFS file system. */
56 FS_FATFS = 0,
58 /** Identifier for in-tree LittleFS file system. */
61 /** Identifier for in-tree Ext2 file system. */
69 #define FS_MOUNT_FLAG_NO_FORMAT BIT(0)
70 /** Flag makes mounted file system read-only */
72 /** Flag used in pre-defined mount structures that are to be mounted
75 * This flag has no impact in user-defined mount structures.
81 * should return -ENOSUP; when the flag is not set the file system driver
124 /** Size of file (0 if directory). */
151 #define FS_O_READ 0x01
153 #define FS_O_WRITE 0x02
154 /** Open for read-write flag combination */
157 #define FS_O_MODE_MASK 0x03
160 #define FS_O_CREATE 0x10
162 #define FS_O_APPEND 0x20
164 #define FS_O_TRUNC 0x40
166 #define FS_O_FLAGS_MASK 0x70
181 #define FS_SEEK_SET 0
204 ((DT_PROP(node_id, automount) ? FS_MOUNT_FLAG_AUTOMOUNT : 0) \
205 | (DT_PROP(node_id, read_only) ? FS_MOUNT_FLAG_READ_ONLY : 0) \
206 | (DT_PROP(node_id, no_format) ? FS_MOUNT_FLAG_NO_FORMAT : 0) \
207 | (DT_PROP(node_id, disk_access) ? FS_MOUNT_FLAG_USE_DISK_ACCESS : 0))
239 zfp->filep = NULL; in fs_file_t_init()
240 zfp->mp = NULL; in fs_file_t_init()
241 zfp->flags = 0; in fs_file_t_init()
255 zdp->dirp = NULL; in fs_dir_t_init()
256 zdp->mp = NULL; in fs_dir_t_init()
267 * @p flags can be 0 or a binary combination of one or more of the following
269 * - @c FS_O_READ open for read
270 * - @c FS_O_WRITE open for write
271 * - @c FS_O_RDWR open for read/write (<tt>FS_O_READ | FS_O_WRITE</tt>)
272 * - @c FS_O_CREATE create file if it does not exist
273 * - @c FS_O_APPEND move to end of file before each write
274 * - @c FS_O_TRUNC truncate the file
276 * @warning If @p flags are set to 0 the function will open file, if it exists
283 * @retval 0 on success;
284 * @retval -EBUSY when zfp is already used;
285 * @retval -EINVAL when a bad file name is given;
286 * @retval -EROFS when opening read-only file for write, or attempting to
289 * @retval -ENOENT when the file does not exist at the path;
290 * @retval -ENOTSUP when not implemented by underlying file system driver;
291 * @retval -EACCES when trying to truncate a file without opening it for write.
292 * @retval <0 an other negative errno code, depending on a file system back-end.
303 * @retval 0 on success;
304 * @retval -ENOTSUP when not implemented by underlying file system driver;
305 * @retval <0 a negative errno code on error.
316 * @retval 0 on success;
317 * @retval -EINVAL when a bad file name is given;
318 * @retval -EROFS if file is read-only, or when file system has been mounted
320 * @retval -ENOTSUP when not implemented by underlying file system driver;
321 * @retval <0 an other negative errno code on error.
342 * @retval 0 on success;
343 * @retval -EINVAL when a bad file name is given, or when rename would cause move
345 * @retval -EROFS if file is read-only, or when file system has been mounted
347 * @retval -ENOTSUP when not implemented by underlying file system driver;
348 * @retval <0 an other negative errno code on error.
363 * @retval >=0 a number of bytes read, on success;
364 * @retval -EBADF when invoked on zfp that represents unopened/closed file;
365 * @retval -ENOTSUP when not implemented by underlying file system driver;
366 * @retval <0 a negative errno code on error.
374 * If a negative value is returned from the function, the file pointer has not
376 * If the function returns a non-negative number that is lower than @p size,
384 * @retval >=0 a number of bytes written, on success;
385 * @retval -EBADF when invoked on zfp that represents unopened/closed file;
386 * @retval -ENOTSUP when not implemented by underlying file system driver;
387 * @retval <0 an other negative errno code on error.
400 * - @c FS_SEEK_SET for the beginning of the file;
401 * - @c FS_SEEK_CUR for the current position;
402 * - @c FS_SEEK_END for the end of the file.
404 * @retval 0 on success;
405 * @retval -EBADF when invoked on zfp that represents unopened/closed file;
406 * @retval -ENOTSUP if not supported by underlying file system driver;
407 * @retval <0 an other negative errno code on error.
418 * @retval >= 0 a current position in file;
419 * @retval -EBADF when invoked on zfp that represents unopened/closed file;
420 * @retval -ENOTSUP if not supported by underlying file system driver;
421 * @retval <0 an other negative errno code on error.
442 * @retval 0 on success;
443 * @retval -EBADF when invoked on zfp that represents unopened/closed file;
444 * @retval -ENOTSUP when not implemented by underlying file system driver;
445 * @retval <0 an other negative errno code on error.
460 * @retval 0 on success;
461 * @retval -EBADF when invoked on zfp that represents unopened/closed file;
462 * @retval -ENOTSUP when not implemented by underlying file system driver;
463 * @retval <0 a negative errno code on error.
474 * @retval 0 on success;
475 * @retval -EEXIST if entry of given name exists;
476 * @retval -EROFS if @p path is within read-only directory, or when
478 * @retval -ENOTSUP when not implemented by underlying file system driver;
479 * @retval <0 an other negative errno code on error
491 * @retval 0 on success;
492 * @retval -EINVAL when a bad directory path is given;
493 * @retval -EBUSY when zdp is already used;
494 * @retval -ENOTSUP when not implemented by underlying file system driver;
495 * @retval <0 a negative errno code on error.
502 * Reads directory entries of an open directory. In end-of-dir condition,
503 * the function will return 0 and set the <tt>entry->name[0]</tt> to 0.
513 * @retval 0 on success or end-of-dir;
514 * @retval -ENOENT when no such directory found;
515 * @retval -ENOTSUP when not implemented by underlying file system driver;
516 * @retval <0 a negative errno code on error.
527 * @retval 0 on success;
528 * @retval -ENOTSUP when not implemented by underlying file system driver;
529 * @retval <0 a negative errno code on error.
542 * or mount points that consist of single digit, e.g: "/0:", "/1:" and so forth.
551 * @retval 0 on success;
552 * @retval -ENOENT when file system type has not been registered;
553 * @retval -ENOTSUP when not supported by underlying file system driver;
556 * @retval -EROFS if system requires formatting but @c FS_MOUNT_FLAG_READ_ONLY
558 * @retval <0 an other negative errno code on error.
571 * @retval 0 on success;
572 * @retval -EINVAL if no system has been mounted at given mount point;
573 * @retval -ENOTSUP when not supported by underlying file system driver;
574 * @retval <0 an other negative errno code on error.
590 * @retval 0 on success;
591 * @retval -ENOENT if there is no mount point with given index.
605 * @retval 0 on success;
606 * @retval -EINVAL when a bad directory or file name is given;
607 * @retval -ENOENT when no such directory or file is found;
608 * @retval -ENOTSUP when not supported by underlying file system driver;
609 * @retval <0 negative errno code on error.
622 * @retval 0 on success;
623 * @retval -EINVAL when a bad path to a directory, or a file, is given;
624 * @retval -ENOTSUP when not implemented by underlying file system driver;
625 * @retval <0 an other negative errno code on error.
637 * @retval 0 on success;
638 * @retval <0 negative errno code on error.
652 * @retval 0 on success;
653 * @retval -EALREADY when a file system of a given type has already been registered;
654 * @retval -ENOSCP when there is no space left, in file system registry, to add
667 * @retval 0 on success;
668 * @retval -EINVAL when file system of a given type has not been registered.