Fix review errors.
This commit is contained in:
parent
99f4aadef1
commit
b3f1a0ca59
|
@ -323,26 +323,6 @@ int32_t taosGetFileDiskID(const char *path, int64_t *diskid) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
bool taosCheckFileDiskID(const char *path, int64_t *actDiskID, int64_t expDiskID) {
|
||||
OS_PARAM_CHECK(path);
|
||||
#ifdef WINDOWS
|
||||
struct _stati64 fileStat;
|
||||
int32_t code = _stati64(path, &fileStat);
|
||||
#else
|
||||
struct stat fileStat;
|
||||
int32_t code = stat(path, &fileStat);
|
||||
#endif
|
||||
if (-1 == code) {
|
||||
terrno = TAOS_SYSTEM_ERROR(errno);
|
||||
return terrno;
|
||||
}
|
||||
|
||||
if (actDiskID != NULL) {
|
||||
*actDiskID = fileStat.st_dev;
|
||||
}
|
||||
return fileStat.st_dev == expDiskID;
|
||||
}
|
||||
|
||||
int32_t taosDevInoFile(TdFilePtr pFile, int64_t *stDev, int64_t *stIno) {
|
||||
#ifdef WINDOWS
|
||||
if (pFile == NULL || pFile->hFile == NULL) {
|
||||
|
|
Loading…
Reference in New Issue