diff options
author | drh <drh@noemail.net> | 2017-11-08 17:32:12 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-11-08 17:32:12 +0000 |
commit | 7e45e3a5d76678356b88ceef773cdd6824008651 (patch) | |
tree | ff6562b12fe87936e15132bd6d41d4924fa1d7d0 /src/os_unix.c | |
parent | 6c9d8f640b5d2397e0f1338ae160f11220146d44 (diff) | |
download | sqlite-7e45e3a5d76678356b88ceef773cdd6824008651.tar.gz sqlite-7e45e3a5d76678356b88ceef773cdd6824008651.zip |
Change the name of SQLITE_READONLY_CANTLOCK to SQLITE_READONLY_CANTINIT.
FossilOrigin-Name: 6d7f94faa7e6de62f82bc6cac019508a9c1ffd6fa1d14f52fa93e9c06afdd32f
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index c656215c4..c5d9aca2c 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -4278,7 +4278,7 @@ static void unixShmPurge(unixFile *pFd){ ** ** If the DMS cannot be locked because this is a readonly_shm=1 ** connection and no other process already holds a lock, return -** SQLITE_READONLY_CANTLOCK and set pShmNode->isUnlocked=1. +** SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. */ static int unixLockSharedMemory(unixFile *pDbFd, unixShmNode *pShmNode){ struct flock lock; @@ -4311,7 +4311,7 @@ static int unixLockSharedMemory(unixFile *pDbFd, unixShmNode *pShmNode){ }else if( lock.l_type==F_UNLCK ){ if( pShmNode->isReadonly ){ pShmNode->isUnlocked = 1; - rc = SQLITE_READONLY_CANTLOCK; + rc = SQLITE_READONLY_CANTINIT; }else{ rc = unixShmSystemLock(pDbFd, F_WRLCK, UNIX_SHM_DMS, 1); if( rc==SQLITE_OK && robust_ftruncate(pShmNode->h, 0) ){ @@ -4450,7 +4450,7 @@ static int unixOpenSharedMemory(unixFile *pDbFd){ robustFchown(pShmNode->h, sStat.st_uid, sStat.st_gid); rc = unixLockSharedMemory(pDbFd, pShmNode); - if( rc!=SQLITE_OK && rc!=SQLITE_READONLY_CANTLOCK ) goto shm_open_err; + if( rc!=SQLITE_OK && rc!=SQLITE_READONLY_CANTINIT ) goto shm_open_err; } } |