From 7917cb853718864e6ba0ccccefa3234335285c69 Mon Sep 17 00:00:00 2001 From: Giacomo Tesio Date: Wed, 23 Aug 2017 01:07:16 +0200 Subject: [PATCH] jehanne: handle POSIX_chmod and POSIX_fchmod in default_error_translator --- newlib/libc/sys/jehanne/libposix_conf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/newlib/libc/sys/jehanne/libposix_conf.c b/newlib/libc/sys/jehanne/libposix_conf.c index 4660eb4d7..f27fc0fe5 100644 --- a/newlib/libc/sys/jehanne/libposix_conf.c +++ b/newlib/libc/sys/jehanne/libposix_conf.c @@ -211,6 +211,10 @@ default_error_translator(char* error, uintptr_t caller) jehanne_fprint(2, "newlib: %s\n", error); if(caller == ADDRESS(POSIX_open)) return PosixEIO; + if(caller == ADDRESS(POSIX_chmod)) + return PosixEPERM; + if(caller == ADDRESS(POSIX_fchmod)) + return PosixEPERM; return PosixEINVAL; }