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

3  * Copyright (c) 2020-2021 Nordic Semiconductor ASA
5 * SPDX-License-Identifier: Apache-2.0
33 FS_DIR_ENTRY_FILE = 0,
40 * Zephyr supports in-tree file systems and external ones. Each
44 * in-tree file systems.
53 /** Identifier for in-tree FatFS file system. */
54 FS_FATFS = 0,
56 /** Identifier for in-tree LittleFS file system. */
59 /** Identifier for in-tree Ext2 file system. */
67 #define FS_MOUNT_FLAG_NO_FORMAT BIT(0)
68 /** Flag makes mounted file system read-only */
70 /** Flag used in pre-defined mount structures that are to be mounted
73 * This flag has no impact in user-defined mount structures.
79 * should return -ENOSUP; when the flag is not set the file system driver
122 /** Size of file (0 if directory). */
149 #define FS_O_READ 0x01
151 #define FS_O_WRITE 0x02
152 /** Open for read-write flag combination */
155 #define FS_O_MODE_MASK 0x03
158 #define FS_O_CREATE 0x10
160 #define FS_O_APPEND 0x20
162 #define FS_O_FLAGS_MASK 0x30
176 #define FS_SEEK_SET 0
199 ((DT_PROP(node_id, automount) ? FS_MOUNT_FLAG_AUTOMOUNT : 0) \
200 | (DT_PROP(node_id, read_only) ? FS_MOUNT_FLAG_READ_ONLY : 0) \
201 | (DT_PROP(node_id, no_format) ? FS_MOUNT_FLAG_NO_FORMAT : 0) \
202 | (DT_PROP(node_id, disk_access) ? FS_MOUNT_FLAG_USE_DISK_ACCESS : 0))
234 *zfp = (struct fs_file_t){ 0 }; in fs_file_t_init()
248 *zdp = (struct fs_dir_t){ 0 }; in fs_dir_t_init()
257 * @p flags can be 0 or a binary combination of one or more of the following
259 * - @c FS_O_READ open for read
260 * - @c FS_O_WRITE open for write
261 * - @c FS_O_RDWR open for read/write (<tt>FS_O_READ | FS_O_WRITE</tt>)
262 * - @c FS_O_CREATE create file if it does not exist
263 * - @c FS_O_APPEND move to end of file before each write
265 * If @p flags are set to 0 the function will attempt to open an existing file
272 * @retval 0 on success;
273 * @retval -EBUSY when zfp is already used;
274 * @retval -EINVAL when a bad file name is given;
275 * @retval -EROFS when opening read-only file for write, or attempting to
278 * @retval -ENOENT when the file path is not possible (bad mount point);
279 * @retval -ENOTSUP when not implemented by underlying file system driver;
280 * @retval <0 an other negative errno code, depending on a file system back-end.
291 * @retval 0 on success;
292 * @retval -ENOTSUP when not implemented by underlying file system driver;
293 * @retval <0 a negative errno code on error.
304 * @retval 0 on success;
305 * @retval -EINVAL when a bad file name is given;
306 * @retval -EROFS if file is read-only, or when file system has been mounted
308 * @retval -ENOTSUP when not implemented by underlying file system driver;
309 * @retval <0 an other negative errno code on error.
330 * @retval 0 on success;
331 * @retval -EINVAL when a bad file name is given, or when rename would cause move
333 * @retval -EROFS if file is read-only, or when file system has been mounted
335 * @retval -ENOTSUP when not implemented by underlying file system driver;
336 * @retval <0 an other negative errno code on error.
351 * @retval >=0 a number of bytes read, on success;
352 * @retval -EBADF when invoked on zfp that represents unopened/closed file;
353 * @retval -ENOTSUP when not implemented by underlying file system driver;
354 * @retval <0 a negative errno code on error.
362 * If a negative value is returned from the function, the file pointer has not
364 * If the function returns a non-negative number that is lower than @p size,
372 * @retval >=0 a number of bytes written, on success;
373 * @retval -EBADF when invoked on zfp that represents unopened/closed file;
374 * @retval -ENOTSUP when not implemented by underlying file system driver;
375 * @retval <0 an other negative errno code on error.
388 * - @c FS_SEEK_SET for the beginning of the file;
389 * - @c FS_SEEK_CUR for the current position;
390 * - @c FS_SEEK_END for the end of the file.
392 * @retval 0 on success;
393 * @retval -EBADF when invoked on zfp that represents unopened/closed file;
394 * @retval -ENOTSUP if not supported by underlying file system driver;
395 * @retval <0 an other negative errno code on error.
406 * @retval >= 0 a current position in file;
407 * @retval -EBADF when invoked on zfp that represents unopened/closed file;
408 * @retval -ENOTSUP if not supported by underlying file system driver;
409 * @retval <0 an other negative errno code on error.
430 * @retval 0 on success;
431 * @retval -EBADF when invoked on zfp that represents unopened/closed file;
432 * @retval -ENOTSUP when not implemented by underlying file system driver;
433 * @retval <0 an other negative errno code on error.
448 * @retval 0 on success;
449 * @retval -EBADF when invoked on zfp that represents unopened/closed file;
450 * @retval -ENOTSUP when not implemented by underlying file system driver;
451 * @retval <0 a negative errno code on error.
462 * @retval 0 on success;
463 * @retval -EEXIST if entry of given name exists;
464 * @retval -EROFS if @p path is within read-only directory, or when
466 * @retval -ENOTSUP when not implemented by underlying file system driver;
467 * @retval <0 an other negative errno code on error
479 * @retval 0 on success;
480 * @retval -EINVAL when a bad directory path is given;
481 * @retval -EBUSY when zdp is already used;
482 * @retval -ENOTSUP when not implemented by underlying file system driver;
483 * @retval <0 a negative errno code on error.
490 * Reads directory entries of an open directory. In end-of-dir condition,
491 * the function will return 0 and set the <tt>entry->name[0]</tt> to 0.
501 * @retval 0 on success or end-of-dir;
502 * @retval -ENOENT when no such directory found;
503 * @retval -ENOTSUP when not implemented by underlying file system driver;
504 * @retval <0 a negative errno code on error.
515 * @retval 0 on success;
516 * @retval -ENOTSUP when not implemented by underlying file system driver;
517 * @retval <0 a negative errno code on error.
530 * or mount points that consist of single digit, e.g: "/0:", "/1:" and so forth.
539 * @retval 0 on success;
540 * @retval -ENOENT when file system type has not been registered;
541 * @retval -ENOTSUP when not supported by underlying file system driver;
544 * @retval -EROFS if system requires formatting but @c FS_MOUNT_FLAG_READ_ONLY
546 * @retval <0 an other negative errno code on error.
559 * @retval 0 on success;
560 * @retval -EINVAL if no system has been mounted at given mount point;
561 * @retval -ENOTSUP when not supported by underlying file system driver;
562 * @retval <0 an other negative errno code on error.
578 * @retval 0 on success;
579 * @retval -ENOENT if there is no mount point with given index.
593 * @retval 0 on success;
594 * @retval -EINVAL when a bad directory or file name is given;
595 * @retval -ENOENT when no such directory or file is found;
596 * @retval -ENOTSUP when not supported by underlying file system driver;
597 * @retval <0 negative errno code on error.
610 * @retval 0 on success;
611 * @retval -EINVAL when a bad path to a directory, or a file, is given;
612 * @retval -ENOTSUP when not implemented by underlying file system driver;
613 * @retval <0 an other negative errno code on error.
625 * @retval 0 on success;
626 * @retval <0 negative errno code on error.
640 * @retval 0 on success;
641 * @retval -EALREADY when a file system of a given type has already been registered;
642 * @retval -ENOSCP when there is no space left, in file system registry, to add
655 * @retval 0 on success;
656 * @retval -EINVAL when file system of a given type has not been registered.