Skip to content

Commit cfa37f4

Browse files
aescolarDashingR
authored andcommitted
Revert "posix: device_io: implement fileno()"
This reverts commit 48dff55. 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 0584df3 commit cfa37f4

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

lib/os/fdtable.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -414,16 +414,6 @@ FILE *zvfs_fdopen(int fd, const char *mode)
414414
return (FILE *)&fdtable[fd];
415415
}
416416

417-
int zvfs_fileno(FILE *file)
418-
{
419-
if (!IS_ARRAY_ELEMENT(fdtable, file)) {
420-
errno = EBADF;
421-
return -1;
422-
}
423-
424-
return (struct fd_entry *)file - fdtable;
425-
}
426-
427417
int zvfs_fstat(int fd, struct stat *buf)
428418
{
429419
if (_check_fd(fd) < 0) {

lib/posix/options/device_io.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
/* prototypes for external, not-yet-public, functions in fdtable.c or fs.c */
1616
int zvfs_close(int fd);
1717
FILE *zvfs_fdopen(int fd, const char *mode);
18-
int zvfs_fileno(FILE *file);
1918
int zvfs_open(const char *name, int flags);
2019
ssize_t zvfs_read(int fd, void *buf, size_t sz, size_t *from_offset);
2120
ssize_t zvfs_write(int fd, const void *buf, size_t sz, size_t *from_offset);
@@ -53,11 +52,6 @@ FILE *fdopen(int fd, const char *mode)
5352
return zvfs_fdopen(fd, mode);
5453
}
5554

56-
int fileno(FILE *file)
57-
{
58-
return zvfs_fileno(file);
59-
}
60-
6155
int open(const char *name, int flags, ...)
6256
{
6357
/* FIXME: necessarily need to check for O_CREAT and unpack ... if set */

0 commit comments

Comments
 (0)