Skip to content

Commit a111cec

Browse files
aescolarnashif
authored andcommitted
Revert "posix: device_io: implement fdopen()"
This reverts commit 581a0f5. PR zephyrproject-rtos#73978 introduced a regression. Unfortunately this PR cannot be reverted without reverting also Let's revert both PRs to stabilize main again towards the 3.7 release. For more details on the issue see zephyrproject-rtos#75205 Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent 9f38377 commit a111cec

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

lib/os/fdtable.c

-11
Original file line numberDiff line numberDiff line change
@@ -403,17 +403,6 @@ int zvfs_close(int fd)
403403
return res;
404404
}
405405

406-
FILE *zvfs_fdopen(int fd, const char *mode)
407-
{
408-
ARG_UNUSED(mode);
409-
410-
if (_check_fd(fd) < 0) {
411-
return NULL;
412-
}
413-
414-
return (FILE *)&fdtable[fd];
415-
}
416-
417406
int zvfs_fstat(int fd, struct stat *buf)
418407
{
419408
if (_check_fd(fd) < 0) {

lib/posix/options/device_io.c

-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66

77
#include <stddef.h>
8-
#include <stdio.h>
98
#include <stdint.h>
109

1110
#include <zephyr/posix/poll.h>
@@ -14,7 +13,6 @@
1413

1514
/* prototypes for external, not-yet-public, functions in fdtable.c or fs.c */
1615
int zvfs_close(int fd);
17-
FILE *zvfs_fdopen(int fd, const char *mode);
1816
int zvfs_open(const char *name, int flags);
1917
ssize_t zvfs_read(int fd, void *buf, size_t sz, size_t *from_offset);
2018
ssize_t zvfs_write(int fd, const void *buf, size_t sz, size_t *from_offset);
@@ -47,11 +45,6 @@ int close(int fd)
4745
FUNC_ALIAS(close, _close, int);
4846
#endif
4947

50-
FILE *fdopen(int fd, const char *mode)
51-
{
52-
return zvfs_fdopen(fd, mode);
53-
}
54-
5548
int open(const char *name, int flags, ...)
5649
{
5750
/* FIXME: necessarily need to check for O_CREAT and unpack ... if set */

0 commit comments

Comments
 (0)