now behaves like the BeOS version

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21840 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2007-08-06 18:03:52 +00:00
parent 902067dc62
commit e00976b95c
+14 -3
View File
@@ -101,11 +101,22 @@ pathconf(const char *path, int name)
}
#define min_c(a,b) ((a)>(b)?(b):(a))
size_t
confstr(int name, char *buf, size_t len)
{
// ToDo: find out what BeOS supports here
errno = EINVAL;
return 0;
size_t string_len = 1;
char *string = "";
switch (name) {
case 0:
break;
default:
errno = EINVAL;
return 0;
}
if (buf != NULL)
strncpy(buf, string, min_c(len, string_len));
return string_len;
}