From 1c20d4bdd5b8d4bb6c0b4659c3ac9de62b65c44e Mon Sep 17 00:00:00 2001 From: boris-sun Date: Thu, 29 Aug 2024 16:29:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E9=BB=84=E5=8C=BA=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: boris-sun --- src/sqlite3.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sqlite3.c b/src/sqlite3.c index 21c0bea..a6c4f41 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; } -- Gitee