Commit Graph

33 Commits

Author SHA1 Message Date
Matias Nitsche
8c74a31fe2 vfs: fix support for PTY when CONFIG_NET is not enabled 2020-06-16 09:56:21 +08:00
Xiang Xiao
6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Xinhe Zhou
25b788a9ed fs/vfs/fs_open.c: Fix error in nx_vopen() function. 'va_start' is used in function with fixed args. 'va_start'/'va_end' should not be used in nx_vopen function, because it has fixed arguments. 2019-12-14 07:38:36 -06:00
Junmin Kim
e06329f5e7 fs/vfs/fs_open.c: Fix description of nx_open and nx_vopen comments indicate that they return zero on success when, in fact, they return the new file descriptor. 2019-12-12 08:24:14 -06:00
Gregory Nutt
bd3cc792ff fs/: Run all .c files under fs/ through tools/nxstyle. 2019-10-27 11:48:14 -06:00
Gregory Nutt
b5e6af60ac tools/nxstyle.c: Add check for multiple definitions of local variables on a line. 2019-02-14 18:33:23 -06:00
David Sidrane
ffd37a0175 fs/vfs/fs_open.c: Fix not returning failure for block_proxy() call. 2019-01-25 06:23:34 -06:00
Xiang Xiao
e674edfa19 fd/dirent, fs/driver/, and fs/vfs: Make MTD device accessible via a character driver proxy like block devices 2018-11-08 09:59:18 -06:00
Gregory Nutt
a7fd58c4db Squashed commit of the following:
many locations:  Change occurences of open() followed by file_detach() to file_open().  Change most non-controversion calls to open() to nx_open().

    fs/inode/fs_fileopen.c:  Flesh out file_open() with some interim, placeholder logic.

    fs/inode/fs_fileopen.c:  Add a framework for a file_open() implementation (no real logic in place yet).

    fs/vfs/fs_open.c:  Add nx_open() which is the same as open() except that it does not create a cancellation point nor does it modify the errno variable.
2018-09-15 10:49:41 -06:00
Gregory Nutt
d88cb93d95 fs/vfs and fs/inode: Trivial typo fixes gleaned from the fileopen branch. 2018-08-29 16:01:56 -06:00
Michał Łyszczek
94b4a86aa6 fs/vfs: Fix negative errno set in fs_open.c 2018-04-20 17:05:42 -06:00
Gregory Nutt
536e4d7fa6 fs/vfs: Change the return value of internal function fs_getfilep(). It no longer sets the errno variable but, rather, returns errors in the same manner as other internal OS functions. 2017-10-11 08:39:19 -06:00
Xiao Qin
e5c79ba1a6 Merged in x_qin/nuttx/null_check_for_open_and_write (pull request #498)
fs/vfs:null check for path on open and buf on write

Null path check is depend on CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_ASSERTIONS, added null checking so it's always performed
Added null checking on buf for write()

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-09-29 18:15:33 +00:00
Gregory Nutt
ee8abb8160 FS: Don't build block driver proxy if PSEUDOFS_OPERATIONS are disabled. 2017-03-04 08:25:20 -06:00
Masayuki Ishikawa
e239961be8 Fix open() a block device with CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y 2017-03-01 13:43:12 +09:00
Gregory Nutt
45fd98da88 Add macros support that will eventually allow dynamic allocation of strings need to support soft links. 2017-02-05 14:25:45 -06:00
Gregory Nutt
8f2c7198ed inode_find: Now takes struct inode_desc_s type as input. This was necessary before that structure includes some data storage. It was used within inode_find(), but that means that the life of the data was the life of inode_find(). That data must persist longer. It is now provided by the caller so that the life of the data persists for the entire life of the caller. 2017-02-05 09:51:42 -06:00
Gregory Nutt
0c9935f8ac FS: Remove inode_find_nofollow. Instead provide a bool nofollow argument to inode_find. 2017-02-04 11:46:54 -06:00
Gregory Nutt
b52e4e5ecd Move cancellation point definitions to their own header file. 2016-12-10 09:08:26 -06:00
Gregory Nutt
bc3ca25cc7 Cancellation points: Close up some logic to eliminte some race conditions. 2016-12-10 08:36:58 -06:00
Gregory Nutt
3eba0acb1c More cancellation points. 2016-12-09 13:49:36 -06:00
Gregory Nutt
bcb6095f1f Add an assertion 2016-07-15 17:47:00 -06:00
Gregory Nutt
6a75f2df89 PTY: Add some encode to reduce the likely of misinterpreting the return value of the file open() method 2016-07-15 17:13:21 -06:00
Gregory Nutt
4b1553d3ad PTY: Fix some tricky issues. Now seems to be working. A lot more testing is needed 2016-07-15 14:29:32 -06:00
Gregory Nutt
006528b144 Add support for freopen() 2015-11-22 08:39:17 -06:00
Gregory Nutt
84a5f846c9 open() has been extended. You can now open block drivers and access them just as you can character drivers. For example, you can hexdump a block device. 2015-11-21 11:24:55 -06:00
Gregory Nutt
c70987e551 nuttx/fs: Fix some spacing and alignment issues 2015-10-11 11:39:29 -06:00
Gregory Nutt
0b12dbf95d Fix some spacing problems 2015-10-04 15:04:00 -06:00
Gregory Nutt
839d3f2204 Cosmetic. Fix some conditional logic in some conditioned out code 2014-11-02 17:26:38 -06:00
Gregory Nutt
d914f3ceec Major structure of file system functions to better support asynchronous I/O. Respository should not be trusted until I have a chance to verify everything 2014-10-06 10:53:25 -06:00
Gregory Nutt
ae90309b36 Move fs/fs.h to fs/inode/inode.h and some to fs/driver/driver.h 2014-09-29 07:14:38 -06:00
Gregory Nutt
1b2729e35e More testing, bugfixes and integration of VFS-based named semaphores 2014-09-28 17:30:42 -06:00
Gregory Nutt
ff73be870e Move renaming files in fs/. to fs/vfs/. (Don't all belong there) 2014-09-28 11:46:11 -06:00