fix(coverage/tdb): move tdb close dir from header to c file
This commit is contained in:
parent
1ce6f4a383
commit
bf1e90bb51
|
@ -66,3 +66,10 @@ int tdbGetFileSize(tdb_fd_t fd, int szPage, SPgno *size) {
|
||||||
*size = szBytes / szPage;
|
*size = szBytes / szPage;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tdbCloseDir(TdDirPtr *ppDir) {
|
||||||
|
int32_t ret = taosCloseDir(ppDir);
|
||||||
|
if (ret) {
|
||||||
|
tdbError("failed to close directory, reason:%s", tstrerror(ret));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -71,12 +71,7 @@ typedef TdFilePtr tdb_fd_t;
|
||||||
#define tdbGetDirEntryName taosGetDirEntryName
|
#define tdbGetDirEntryName taosGetDirEntryName
|
||||||
#define tdbDirEntryBaseName taosDirEntryBaseName
|
#define tdbDirEntryBaseName taosDirEntryBaseName
|
||||||
|
|
||||||
static FORCE_INLINE void tdbCloseDir(TdDirPtr *ppDir) {
|
void tdbCloseDir(TdDirPtr *ppDir);
|
||||||
int32_t ret = taosCloseDir(ppDir);
|
|
||||||
if (ret) {
|
|
||||||
tdbError("failed to close directory, reason:%s", tstrerror(ret));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define tdbOsRemove remove
|
#define tdbOsRemove remove
|
||||||
#define tdbOsFileSize(FD, PSIZE) taosFStatFile(FD, PSIZE, NULL)
|
#define tdbOsFileSize(FD, PSIZE) taosFStatFile(FD, PSIZE, NULL)
|
||||||
|
|
Loading…
Reference in New Issue