Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 120) sorted by relevance

12345

/sqlite-3.40.0/tool/
H A Dspeedtest.tcl17 close $fd
76 puts $fd {
80 close $fd
84 puts $fd {
88 close $fd
96 close $fd
134 close $fd
147 close $fd
158 close $fd
167 close $fd
[all …]
H A Dspeedtest2.tcl17 close $fd
68 puts $fd {
72 close $fd
76 puts $fd {
80 close $fd
88 close $fd
126 close $fd
132 close $fd
143 close $fd
149 close $fd
[all …]
H A Dmkpragmatab.tcl407 set fd [open $destfile wb]
408 puts $fd {/* DO NOT EDIT!
556 puts $fd "\175;"
561 puts $fd "typedef struct PragmaName \173"
566 puts $fd " u8 nPragCName; \
569 puts $fd "\175 PragmaName;"
586 puts $fd "#endif"
592 puts $fd "#if $this_if"
604 puts $fd " /* ePragFlg: */ $flagx,"
610 puts $fd "#endif"
[all …]
H A Dshowlocks.c24 static int showLocksInRange(int fd, off_t lwr, off_t upr){ in showLocksInRange() argument
52 fcntl(fd, F_GETLK, &x); in showLocksInRange()
83 int fd; in main() local
90 fd = open(argv[1], O_RDWR, 0); in main()
91 if( fd<0 ){ in main()
95 cnt = showLocksInRange(fd, 0, MX_LCK); in main()
97 close(fd); in main()
/sqlite-3.40.0/src/
H A Dtest_syscall.c106 static int ts_close(int fd);
236 static int ts_close(int fd){ in ts_close() argument
243 orig_close(fd); in ts_close()
246 return orig_close(fd); in ts_close()
286 return orig_fstat(fd, p); in ts_fstat()
296 return orig_ftruncate(fd, n); in ts_ftruncate()
310 return orig_fcntl(fd, cmd, pArg); in ts_fcntl()
320 return orig_read(fd, aBuf, nBuf); in ts_read()
351 return orig_write(fd, aBuf, nBuf); in ts_write()
381 return orig_fchmod(fd, mode); in ts_fchmod()
[all …]
H A Dtest_sqllog.c177 FILE *fd = 0; in sqllogFindFile() local
181 if( fd==0 ){ in sqllogFindFile()
217 if( ferror(fd) ){ in sqllogFindFile()
221 fclose(fd); in sqllogFindFile()
339 if( fd ){ in sqllogCopydb()
369 if( p->fd==0 ){ in sqllogOpenlog()
375 FILE *fd; in sqllogOpenlog() local
386 if( fd ) fclose(fd); in sqllogOpenlog()
488 p->fd = 0; in testSqllog()
512 if( p->fd ) fclose(p->fd); in testSqllog()
[all …]
H A Dtest_superlock.c92 sqlite3_file *fd, /* Database file handle */ in superlockShmLock() argument
98 int (*xShmLock)(sqlite3_file*, int, int, int) = fd->pMethods->xShmLock; in superlockShmLock()
100 rc = xShmLock(fd, idx, nByte, SQLITE_SHM_LOCK|SQLITE_SHM_EXCLUSIVE); in superlockShmLock()
114 sqlite3_file *fd = 0; /* Main database file handle */ in superlockWalLock() local
118 rc = sqlite3_file_control(db, "main", SQLITE_FCNTL_FILE_POINTER, (void *)&fd); in superlockWalLock()
124 rc = superlockShmLock(fd, 2, 1, pBusy); in superlockWalLock()
134 rc = fd->pMethods->xShmMap(fd, 0, 32*1024, 1, &p); in superlockWalLock()
142 rc = superlockShmLock(fd, 3, SQLITE_SHM_NLOCK-3, pBusy); in superlockWalLock()
156 sqlite3_file *fd = 0; in sqlite3demo_superunlock() local
159 fd->pMethods->xShmLock(fd, 2, 1, flags); in sqlite3demo_superunlock()
[all …]
H A Dos_unix.c676 int fd; in robust_open() local
684 if( fd<0 ){ in robust_open()
692 fd = -1; in robust_open()
695 if( fd>=0 ){ in robust_open()
709 return fd; in robust_open()
3715 *pFd = fd; in openDirectory()
6172 fd = pUnused->fd; in unixOpen()
6266 p->pPreallocatedUnused->fd = fd; in unixOpen()
6384 int fd; in unixDelete() local
7060 fd = pUnused->fd; in proxyCreateUnixFile()
[all …]
H A Dpager.c132 #define FILEHANDLEID(fd) (SQLITE_PTR_TO_INT(fd)) argument
1141 if( isOpen(pPager->fd) ){ in pagerUnlockDb()
1837 int iDc = isOpen(pPager->fd)?sqlite3OsDeviceCharacteristics(pPager->fd):0; in pager_unlock()
2368 if( isOpen(pPager->fd) in pager_playback_one_page()
2609 if( isOpen(pPager->fd) in pager_truncate()
3482 sqlite3_file *fd = pPager->fd; in pagerFixMaplimit() local
3483 if( isOpen(fd) && fd->pMethods->iVersion>=3 ){ in pagerFixMaplimit()
3844 if( isOpen(pPager->fd) ){ in sqlite3PagerReadFileheader()
5046 return pPager->fd; in sqlite3_database_file_object()
6453 sqlite3_file *fd = pPager->fd; in sqlite3PagerCommitPhaseOne() local
[all …]
H A Dtest_demovfs.c150 int fd; /* File descriptor */ member
170 ofst = lseek(p->fd, iOfst, SEEK_SET); in demoDirectWrite()
175 nWrite = write(p->fd, zBuf, iAmt); in demoDirectWrite()
205 close(p->fd); in demoClose()
234 ofst = lseek(p->fd, iOfst, SEEK_SET); in demoRead()
238 nRead = read(p->fd, zBuf, iAmt); in demoRead()
309 if( ftruncate(((DemoFile *)pFile)->fd, size) ) return SQLITE_IOERR_TRUNCATE; in demoTruncate()
326 rc = fsync(p->fd); in demoSync()
348 rc = fstat(p->fd, &sStat); in demoFileSize()
437 p->fd = open(zName, oflags, 0600); in demoOpen()
[all …]
H A Dtest_fs.c423 pCur->fd = -1; in fstreeOpen()
429 if( pCsr->fd>=0 ){ in fstreeCloseFd()
430 close(pCsr->fd); in fstreeCloseFd()
431 pCsr->fd = -1; in fstreeCloseFd()
571 fstat(pCsr->fd, &sBuf); in fstreeColumn()
731 int fd; in fsColumn() local
734 fd = open(zFile, O_RDONLY); in fsColumn()
735 if( fd<0 ) return SQLITE_IOERR; in fsColumn()
736 fstat(fd, &sbuf); in fsColumn()
745 close(fd); in fsColumn()
[all …]
/sqlite-3.40.0/ext/fts3/unicode/
H A Dparseunicode.tcl31 set fd [open $zName]
51 while { ![eof $fd] } {
52 set line [gets $fd]
94 close $fd
105 set fd [open $zName]
126 set line [gets $fd]
142 close $fd
149 set fd [open $zName]
151 set line [gets $fd]
170 set fd [open $zName]
[all …]
/sqlite-3.40.0/test/
H A Dcorrupt2.test188 close $fd
231 seek $fd [expr 1024 + 12]
241 close $fd
359 seek $fd 0 end
361 close $fd
401 close $fd
418 set zChild [read $fd 4]
422 close $fd
440 close $fd
463 seek $fd 108
[all …]
H A Dwal_common.tcl66 set fd [open $filename r+]
67 fconfigure $fd -translation binary
68 fconfigure $fd -encoding binary
69 seek $fd 0
70 puts -nonewline $fd $blob
71 close $fd
74 set fd [open $filename]
75 fconfigure $fd -translation binary
76 fconfigure $fd -encoding binary
77 set blob [read $fd 24]
[all …]
H A Dcorrupt4.test103 proc get2byte {fd offset} {
104 seek $fd $offset
105 set bin [read $fd 2]
109 proc get4byte {fd offset} {
110 seek $fd $offset
111 set bin [read $fd 4]
116 seek $fd $offset
118 puts -nonewline $fd $bin
124 set fd [open test.db r+]
129 put4byte $fd $offChild 1
[all …]
H A Dshell5.test349 close $fd
361 close $fd
373 close $fd
385 close $fd
397 puts $fd {}
398 close $fd
415 close $fd
440 close $fd
455 close $fd
469 close $fd
[all …]
H A Dexclusive2.test42 if {$fd==""} {
43 set fd [open $filename RDWR]
50 seek $fd 24
56 flush $fd
59 seek $fd 24
67 if {$needClose} {close $fd}
75 seek $fd 24
83 close $fd
239 seek $::fd 1024
241 flush $::fd
[all …]
H A Dwalcksum.test24 set fd [open $filename]
27 set data [read $fd]
28 close $fd
64 seek $fd $offset
65 puts -nonewline $fd $bin
66 close $fd
119 puts -nonewline $fd $bin
121 seek $fd 0
122 set blob [read $fd 24]
126 seek $fd 24
[all …]
H A Dwapptest.tcl74 set ret [read $fd]
75 close $fd
159 set fd [open $logfile rb]
161 while {![eof $fd]} {
162 set line [gets $fd]
203 close $fd
299 if {[eof $fd]} {
305 set line [gets $fd]
775 set fd [open $log]
776 set data [read $fd]
[all …]
/sqlite-3.40.0/ext/lsm1/tool/
H A Dmklsm1c.tcl47 set fd [open $zFile]
48 set data [read $fd]
49 close $fd
55 set G(fd) stdout
56 set G(fd) [open $zOut w]
58 puts -nonewline $G(fd) $G(hdr)
65 puts $G(fd) "#line 1 \"$zTail\""
73 puts $G(fd) $line
79 puts -nonewline $G(fd) $G(footer)
80 if {$G(fd)!="stdout"} {
[all …]
/sqlite-3.40.0/ext/fts5/tool/
H A Dmkfts5c.tcl47 set fd [open $zFile]
48 set data [read $fd]
49 close $fd
72 set G(fd) stdout
73 set G(fd) [open $zOut w]
75 puts -nonewline $G(fd) $G(hdr)
82 puts $G(fd) "#line 1 \"$zTail\""
99 puts $G(fd) $line
105 puts -nonewline $G(fd) $G(footer)
106 if {$G(fd)!="stdout"} {
[all …]
/sqlite-3.40.0/ext/lsm1/lsm-test/
H A Dlsmtest8.c87 FILE *fd; in testReadFile() local
88 fd = fopen(zFile, "rb"); in testReadFile()
89 if( fd==0 ){ in testReadFile()
92 if( 0!=fseek(fd, iOff, SEEK_SET) ){ in testReadFile()
96 if( (size_t)nByte!=fread(pOut, 1, nByte, fd) ){ in testReadFile()
100 fclose(fd); in testReadFile()
113 FILE *fd; in testWriteFile() local
114 fd = fopen(zFile, "r+b"); in testWriteFile()
115 if( fd==0 ){ in testWriteFile()
118 if( 0!=fseek(fd, iOff, SEEK_SET) ){ in testWriteFile()
[all …]
/sqlite-3.40.0/ext/lsm1/
H A Dlsm_unix.c93 p->fd = open(zFile, oflags, 0644); in lsmPosixOsOpen()
94 if( p->fd<0 ){ in lsmPosixOsOpen()
139 prc = fstat(p->fd, &sStat); in lsmPosixOsTruncate()
141 prc = ftruncate(p->fd, (off_t)nSize); in lsmPosixOsTruncate()
184 if( prc==0 ) prc = fdatasync(p->fd); in lsmPosixOsSync()
221 prc = fstat(p->fd, &buf); in lsmPosixOsRemap()
226 prc = ftruncate(p->fd, iSz); in lsmPosixOsRemap()
303 prc = fstat(p->fd, &buf); in lsmPosixOsFileid()
334 if( fcntl(p->fd, F_SETLK, &lock) ){ in lsmPosixOsLock()
364 if( fcntl(p->fd, F_GETLK, &lock) ){ in lsmPosixOsTestLock()
[all …]
/sqlite-3.40.0/doc/
H A DF2FS.txt17 rc = ioctl(fd, F2FS_IOC_GET_FEATURES, &flags);
24 where "fd" is the file-descriptor open on the database file.
36 rc = fcntl(fd, F_SETLK, ...);
39 rc = ioctl(fd, F2FS_IOC_START_ATOMIC_WRITE);
43 rc = write(fd, ...dirty page...);
45 ioctl(fd, F2FS_IOC_ABORT_VOLATILE_WRITE);
50 rc = ioctl(fd, F2FS_IOC_COMMIT_ATOMIC_WRITE);
52 ioctl(fd, F2FS_IOC_ABORT_VOLATILE_WRITE);
59 fcntl(fd, F_SETLK, ...);
/sqlite-3.40.0/ext/wasm/api/
H A Dsqlite3-wasi.h10 int fchmod(int fd, mode_t mode);
11 int fchmod(int fd, mode_t mode){ in fchmod() argument
12 return (fd && mode) ? 0 : 0; in fchmod()
16 int fchown(int fd, uid_t owner, gid_t group);
17 int fchown(int fd, uid_t owner, gid_t group){ in fchown() argument
18 return (fd && owner && group) ? 0 : 0; in fchown()

12345