diff options
| author | Danish Khateeb <danishkhateeb03@gmail.com> | 2026-10-28 15:07:41 -0500 |
|---|---|---|
| committer | Thomas Weißschuh <linux@weissschuh.net> | 2026-11-02 01:38:36 +0000 |
| commit | d9ca353ea4e4d4d03562b6e3c951af5d88b7d9a6 (patch) | |
| tree | 446ec09f07ef37e43a5fe6b73fb0e715f0a36b55 /scripts/Makefile.thinlto | |
| parent | 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 (diff) | |
| download | linux-next-d9ca353ea4e4d4d03562b6e3c951af5d88b7d9a6.tar.gz linux-next-d9ca353ea4e4d4d03562b6e3c951af5d88b7d9a6.zip | |
tools/nolibc: fix fopen() errno when open() fails
When open() fails, fopen() passes its -1 on to fdopen(), which sets
errno to EBADF and so overwrites the error from open(). A missing file
is reported as EBADF instead of ENOENT, and a file without permission as
EBADF instead of EACCES.
Return NULL as soon as open() fails, leaving its errno in place.
Fixes: a009a0c6faa9 ("tools/nolibc: add fopen()")
Signed-off-by: Danish Khateeb <danishkhateeb03@gmail.com>
Link: https://patch.msgid.link/20261028200743.154151-2-danishkhateeb03@gmail.com
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
