diff --git a/hadoop-common-project/hadoop-common/src/main/winutils/chmod.c b/hadoop-common-project/hadoop-common/src/main/winutils/chmod.c index ff7bff33e772cd..ab65493187e035 100644 --- a/hadoop-common-project/hadoop-common/src/main/winutils/chmod.c +++ b/hadoop-common-project/hadoop-common/src/main/winutils/chmod.c @@ -367,10 +367,10 @@ static BOOL ParseCommandLineArguments( // Check if the given path name is a file or directory // Only set recursive flag if the given path is a directory // - dwRtnCode = GetFileInformationByName(*path, FALSE, &fileInfo); + dwRtnCode = GetFileInformationByPathName(*path, FALSE, &fileInfo); if (dwRtnCode != ERROR_SUCCESS) { - ReportErrorCode(L"GetFileInformationByName", dwRtnCode); + ReportErrorCode(L"GetFileInformationByPathName", dwRtnCode); return FALSE; } diff --git a/hadoop-common-project/hadoop-common/src/main/winutils/hardlink.c b/hadoop-common-project/hadoop-common/src/main/winutils/hardlink.c index 76422a8772db6d..e661c0f4bf603f 100644 --- a/hadoop-common-project/hadoop-common/src/main/winutils/hardlink.c +++ b/hadoop-common-project/hadoop-common/src/main/winutils/hardlink.c @@ -94,7 +94,8 @@ static DWORD HardlinkStat(__in LPCWSTR fileName, __out DWORD *puHardLinkCount) // Get file information which contains the hard link count // - dwErrorCode = GetFileInformationByName(longFileName, FALSE, &fileInformation); + dwErrorCode = GetFileInformationByPathName( + longFileName, FALSE, &fileInformation); if (dwErrorCode != ERROR_SUCCESS) { goto HardlinkStatExit; diff --git a/hadoop-common-project/hadoop-common/src/main/winutils/include/winutils.h b/hadoop-common-project/hadoop-common/src/main/winutils/include/winutils.h index 6c33b5ae79e6fe..f61cda908f99de 100644 --- a/hadoop-common-project/hadoop-common/src/main/winutils/include/winutils.h +++ b/hadoop-common-project/hadoop-common/src/main/winutils/include/winutils.h @@ -126,7 +126,7 @@ void ReadlinkUsage(); int SystemInfo(); void SystemInfoUsage(); -DWORD GetFileInformationByName(__in LPCWSTR pathName, __in BOOL followLink, +DWORD GetFileInformationByPathName(__in LPCWSTR pathName, __in BOOL followLink, __out LPBY_HANDLE_FILE_INFORMATION lpFileInformation); DWORD CheckAccessForCurrentUser( diff --git a/hadoop-common-project/hadoop-common/src/main/winutils/libwinutils.c b/hadoop-common-project/hadoop-common/src/main/winutils/libwinutils.c index 676f1b2dad7dda..725c15e4da3d3d 100644 --- a/hadoop-common-project/hadoop-common/src/main/winutils/libwinutils.c +++ b/hadoop-common-project/hadoop-common/src/main/winutils/libwinutils.c @@ -71,7 +71,7 @@ const ACCESS_MASK WinMasks[WIN_MASKS_TOTAL] = }; //---------------------------------------------------------------------------- -// Function: GetFileInformationByName +// Function: GetFileInformationByPathName // // Description: // To retrieve the by handle file information given the file name @@ -85,7 +85,7 @@ const ACCESS_MASK WinMasks[WIN_MASKS_TOTAL] = // or junction point to get the target file information. Otherwise, the // information for the symbolic link or junction point is retrieved. // -DWORD GetFileInformationByName( +DWORD GetFileInformationByPathName( __in LPCWSTR pathName, __in BOOL followLink, __out LPBY_HANDLE_FILE_INFORMATION lpFileInformation) @@ -888,7 +888,7 @@ DWORD FindFileOwnerAndPermission( if (pMask == NULL) goto FindFileOwnerAndPermissionEnd; - dwRtnCode = GetFileInformationByName(pathName, + dwRtnCode = GetFileInformationByPathName(pathName, followLink, &fileInformation); if (dwRtnCode != ERROR_SUCCESS) { diff --git a/hadoop-common-project/hadoop-common/src/main/winutils/ls.c b/hadoop-common-project/hadoop-common/src/main/winutils/ls.c index 8e71226f03ffe9..bdc50c9cbb77c5 100644 --- a/hadoop-common-project/hadoop-common/src/main/winutils/ls.c +++ b/hadoop-common-project/hadoop-common/src/main/winutils/ls.c @@ -280,11 +280,11 @@ int Ls(__in int argc, __in_ecount(argc) wchar_t *argv[]) goto LsEnd; } - dwErrorCode = GetFileInformationByName( + dwErrorCode = GetFileInformationByPathName( longPathName, optionsMask & CmdLineOptionFollowSymlink, &fileInformation); if (dwErrorCode != ERROR_SUCCESS) { - ReportErrorCode(L"GetFileInformationByName", dwErrorCode); + ReportErrorCode(L"GetFileInformationByPathName", dwErrorCode); goto LsEnd; }