From cf2be54e8fc13c375f88ee8bf36b8e6a327c8498 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sun, 19 Mar 2023 05:43:40 +0200 Subject: [PATCH] LibC: add errno ENOTEMPTY --- libc/include/errno.h | 1 + libc/string/strerror.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/libc/include/errno.h b/libc/include/errno.h index 96ed3e7e..13f70fb3 100644 --- a/libc/include/errno.h +++ b/libc/include/errno.h @@ -11,6 +11,7 @@ #define ENOTSUP 7 #define EBADF 8 #define EEXISTS 9 +#define ENOTEMPTY 10 __BEGIN_DECLS diff --git a/libc/string/strerror.cpp b/libc/string/strerror.cpp index 70f4d785..76280287 100644 --- a/libc/string/strerror.cpp +++ b/libc/string/strerror.cpp @@ -37,6 +37,9 @@ char* strerror(int error) case EEXISTS: strcpy(buffer, "File exists"); break; + case ENOTEMPTY: + strcpy(buffer, "Directory not empty"); + break; default: { // FIXME: sprintf