From: Jeffrey Altman Date: Sat, 19 Sep 2009 08:55:09 +0000 (-0400) Subject: Windows: Use "Name not found" instead of "File not found" X-Git-Tag: openafs-devel-1_5_64~9 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=72e8bac22201e194242e715a107f3b3cb8a480df;p=packages%2Fo%2Fopenafs.git Windows: Use "Name not found" instead of "File not found" When a file cannot be opened because the name of the file or a directory in the path cannot be found, return "Name not found" instead of "File not found". "File not found" is the error returned by the smb redirector to the application when the file cannot be located in the search path. "Name not found" indicates that the entry is not present at the location requested. The use of "File not found" prevented execution of applications from the \\AFS name space on Windows 7. LICENSE MIT Reviewed-on: http://gerrit.openafs.org/469 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/smb.c b/src/WINNT/afsd/smb.c index 8a259a497..7e2ddec9e 100644 --- a/src/WINNT/afsd/smb.c +++ b/src/WINNT/afsd/smb.c @@ -2996,10 +2996,10 @@ void smb_MapNTError(long code, unsigned long *NTStatusp) NTStatus = 0; } else if (code == CM_ERROR_NOSUCHCELL) { - NTStatus = 0xC000000FL; /* No such file */ + NTStatus = 0xC0000034L; /* Name not found */ } else if (code == CM_ERROR_NOSUCHVOLUME) { - NTStatus = 0xC000000FL; /* No such file */ + NTStatus = 0xC0000034L; /* Name not found */ } else if (code == CM_ERROR_TIMEDOUT) { #ifdef COMMENT @@ -3019,7 +3019,7 @@ void smb_MapNTError(long code, unsigned long *NTStatusp) } else if (code == CM_ERROR_NOSUCHFILE || code == CM_ERROR_BPLUS_NOMATCH) { - NTStatus = 0xC000000FL; /* No such file */ + NTStatus = 0xC0000034L; /* Name not found */ } else if (code == CM_ERROR_NOSUCHPATH) { NTStatus = 0xC000003AL; /* Object path not found */