* fhandler.cc (rootdir): Don't set errno.

* syscalls.cc (statvfs): Set errno to ENOTDIR if rootdir() failed.
This commit is contained in:
Corinna Vinschen
2005-06-24 09:12:15 +00:00
parent 6bfab24ef3
commit 3b12a57cb6
3 changed files with 11 additions and 7 deletions

View File

@ -1179,18 +1179,14 @@ rootdir (const char *full_path, char *root_path)
{
const char *cp = strchr (full_path + 2, '\\');
if (!cp)
goto error;
return NULL;
while (*++cp && *cp != '\\')
;
memcpy (root_path, full_path, (len = cp - full_path));
rootp = root_path + len;
}
else
{
error:
set_errno (ENOTDIR);
return NULL;
}
return NULL;
*rootp++ = '\\';
*rootp = '\0';