Skip to content

Commit ea849ae

Browse files
aescolarChromeos LUCI
authored and
Chromeos LUCI
committed
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 (cherry picked from commit 9f38377) Original-Signed-off-by: Alberto Escolar Piedras <[email protected]> GitOrigin-RevId: 9f38377 Change-Id: I5cb2c6f8939b9c17348f124acfe5950c13726243 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5678576 Tested-by: ChromeOS Prod (Robot) <[email protected]> Commit-Queue: Fabio Baltieri <[email protected]> Reviewed-by: Fabio Baltieri <[email protected]>
1 parent e6e7133 commit ea849ae

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

lib/os/fdtable.c

-10
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

-6
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)