From: Alan Cox Date: Mon, 2 Apr 2018 22:01:02 +0000 (+0100) Subject: filesys: fix errno 0 failure with overlong path X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=746005f29762cc40e4d1d2582c4af7a7403313a6;p=FUZIX.git filesys: fix errno 0 failure with overlong path --- diff --git a/Kernel/filesys.c b/Kernel/filesys.c index ead41e65..675995db 100644 --- a/Kernel/filesys.c +++ b/Kernel/filesys.c @@ -17,8 +17,6 @@ * will be set to NULL. * The last node parsed is saved in lastname and is useful to some system * calls as they want a parent and to create the new node. - * - * FIXME: ENAMETOOLONG might be good to add */ char lastname[31]; @@ -30,6 +28,8 @@ static uint8_t getcf(void) int16_t c; c = ugetc(name); if (c == -1 || name == nameend) { + if (name == nameend) + udata.u_error = ENAMETOOLONG; n_open_fault = 1; return 0; }