diff --git a/src/sqlite3.c b/src/sqlite3.c index 21c0bea6e6e749db5e9d649fbc3346754700c45a..a6c4f41f650bc8c63e52ce3f9c3c85f31f9875b1 100644 --- a/src/sqlite3.c +++ b/src/sqlite3.c @@ -37138,7 +37138,6 @@ static void enableDbFileDelMonitor(int32_t fd) unsigned int flags = 0; int ret = ioctl(fd, HMFS_IOCTL_HW_GET_FLAGS, &flags); if (ret < 0) { - sqlite3_log(SQLITE_WARNING, "Not support fd %d enable del monitor errno = %d", fd, errno); return; } if (flags & HMFS_MONITOR_FL) { @@ -37164,12 +37163,14 @@ static void enableDbFileDelMonitor(int32_t fd) static int posixOpen(const char *zFile, int flags, int mode){ int fd = open(zFile, flags, mode); #ifdef FDSAN_ENABLE - if ( fd > 0 && fdsan_get_owner_tag(fd) == 0 ) { - fdsan_exchange_owner_tag(fd, 0, fdsan_create_owner_tag(FDSAN_OWNER_TYPE_FILE, SQLITE_FDSAN_TAG)); + if( fd >= 0 ){ + fdsan_exchange_owner_tag(fd, 0, fdsan_create_owner_tag(FDSAN_OWNER_TYPE_FILE, SQLITE_FDSAN_TAG)); } #endif #ifdef HARMONY_OS - enableDbFileDelMonitor(fd); + if( fd >= 0 ){ + enableDbFileDelMonitor(fd); + } #endif return fd; }