From 5831c72aad8d07a1afc5ed7564fa79c03aa2ccd1 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 23 Mar 2023 14:48:42 +0200 Subject: [PATCH] LibC: add errno NAMETOOLONG --- 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 13f70fb3..0d1c71e4 100644 --- a/libc/include/errno.h +++ b/libc/include/errno.h @@ -12,6 +12,7 @@ #define EBADF 8 #define EEXISTS 9 #define ENOTEMPTY 10 +#define ENAMETOOLONG 11 __BEGIN_DECLS diff --git a/libc/string/strerror.cpp b/libc/string/strerror.cpp index 76280287..bb6cc453 100644 --- a/libc/string/strerror.cpp +++ b/libc/string/strerror.cpp @@ -40,6 +40,9 @@ char* strerror(int error) case ENOTEMPTY: strcpy(buffer, "Directory not empty"); break; + case ENAMETOOLONG: + strcpy(buffer, "Filename too long"); + break; default: { // FIXME: sprintf