summaryrefslogtreecommitdiff
path: root/vendor/github.com/ncruces/go-sqlite3/vfs/os_linux.go
diff options
context:
space:
mode:
authorLibravatar kim <grufwub@gmail.com>2025-11-05 21:58:38 +0100
committerLibravatar tobi <tobi.smethurst@protonmail.com>2025-11-17 14:12:41 +0100
commitd0c551acb5ab79efafd325f5b19c76a3de835356 (patch)
treeba9462cdc5081015fbd6bf5d98d9f39334d13207 /vendor/github.com/ncruces/go-sqlite3/vfs/os_linux.go
parent[performance] when transforming media, perform read operations of large files... (diff)
downloadgotosocial-d0c551acb5ab79efafd325f5b19c76a3de835356.tar.xz
[chore] update dependencies (#4542)
- github.com/minio/minio-go/v7: v7.0.95 -> v7.0.97 - github.com/ncruces/go-sqlite3: v0.29.1 -> v0.30.0 - github.com/tdewolff/minify/v2: v2.24.5 -> v2.24.6 - codeberg.org/gruf/go-mmap: fixes build for BSD platforms Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4542 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/vfs/os_linux.go')
-rw-r--r--vendor/github.com/ncruces/go-sqlite3/vfs/os_linux.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/vfs/os_linux.go b/vendor/github.com/ncruces/go-sqlite3/vfs/os_linux.go
index 893f1512c..1f7705ca0 100644
--- a/vendor/github.com/ncruces/go-sqlite3/vfs/os_linux.go
+++ b/vendor/github.com/ncruces/go-sqlite3/vfs/os_linux.go
@@ -44,15 +44,15 @@ func osAllocate(file *os.File, size int64) error {
}
-func osReadLock(file *os.File, start, len int64, timeout time.Duration) _ErrorCode {
+func osReadLock(file *os.File, start, len int64, timeout time.Duration) error {
return osLock(file, unix.F_RDLCK, start, len, timeout, _IOERR_RDLOCK)
}
-func osWriteLock(file *os.File, start, len int64, timeout time.Duration) _ErrorCode {
+func osWriteLock(file *os.File, start, len int64, timeout time.Duration) error {
return osLock(file, unix.F_WRLCK, start, len, timeout, _IOERR_LOCK)
}
-func osLock(file *os.File, typ int16, start, len int64, timeout time.Duration, def _ErrorCode) _ErrorCode {
+func osLock(file *os.File, typ int16, start, len int64, timeout time.Duration, def _ErrorCode) error {
lock := unix.Flock_t{
Type: typ,
Start: start,
@@ -68,7 +68,7 @@ func osLock(file *os.File, typ int16, start, len int64, timeout time.Duration, d
return osLockErrorCode(err, def)
}
-func osUnlock(file *os.File, start, len int64) _ErrorCode {
+func osUnlock(file *os.File, start, len int64) error {
lock := unix.Flock_t{
Type: unix.F_UNLCK,
Start: start,
@@ -77,10 +77,10 @@ func osUnlock(file *os.File, start, len int64) _ErrorCode {
for {
err := unix.FcntlFlock(file.Fd(), unix.F_OFD_SETLK, &lock)
if err == nil {
- return _OK
+ return nil
}
if err != unix.EINTR {
- return _IOERR_UNLOCK
+ return sysError{err, _IOERR_UNLOCK}
}
}
}