File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -52627,6 +52627,11 @@ UNQLITE_PRIVATE int unqliteOsAccess(
5262752627#if defined(__APPLE__)
5262852628# include <sys/mount.h>
5262952629#endif
52630+
52631+ #ifdef __NuttX__
52632+ # include <nuttx/fs/ioctl.h>
52633+ # include <sys/ioctl.h>
52634+ #endif
5263052635/*
5263152636** Allowed values of unixFile.fsFlags
5263252637*/
@@ -52881,6 +52886,9 @@ static int unqliteErrorFromPosixError(int posixError, int unqliteIOErr) {
5288152886struct unixFileId {
5288252887 dev_t dev; /* Device number */
5288352888 ino_t ino; /* Inode number */
52889+ #ifdef __NuttX__
52890+ char path[PATH_MAX];
52891+ #endif
5288452892};
5288552893/*
5288652894** An instance of the following structure is allocated for each open
@@ -53033,6 +53041,13 @@ static int findInodeInfo(
5303353041 SyZero(&fileId,sizeof(fileId));
5303453042 fileId.dev = statbuf.st_dev;
5303553043 fileId.ino = statbuf.st_ino;
53044+ #ifdef __NuttX__
53045+ rc = ioctl(fd, FIOC_FILEPATH, &fileId.path);
53046+ if(rc){
53047+ return UNQLITE_IOERR;
53048+ }
53049+ #endif
53050+
5303653051 pInode = inodeList;
5303753052 while( pInode && SyMemcmp((const void *)&fileId,(const void *)&pInode->fileId, sizeof(fileId)) ){
5303853053 pInode = pInode->pNext;
You can’t perform that action at this time.
0 commit comments