Project

General

Profile

Actions

Bug #1394

closed

[PATCH] getcwd(3) returns wrong error codes

Added by Anonymous over 15 years ago. Updated about 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Salute.

getcwd(3) returns EINVAL if the supplied buffer length is 0 or 1 and ENOMEM
(duh!) if the length is greater than 1 but can't hold pathname + 1.

POSIX expects getcwd() to return EINVAL if length is 0 and ERANGE if length is
greater than 0 but less than pathname + 1.

I attach a patch to review. I've built a kernel and running it at the moment.
So far nothing bro


Files

getcwd.diff (965 Bytes) getcwd.diff Anonymous, 06/04/2009 02:00 PM
Actions #1

Updated by Anonymous about 15 years ago

Fixed with a08a76400bd23209e8e38f4835d71e88eee3c887

Actions

Also available in: Atom PDF