Home
last modified time | relevance | path

Searched refs:lseek (Results 1 - 25 of 300) sorted by relevance

12345678910>>...12

/third_party/musl/libc-test/src/functionalext/supplement/linux/
H A Dflock.c30 lseek(fd, 2, SEEK_SET); in flock_0100()
48 lseek(fd, 2, SEEK_SET); in flock_0200()
66 lseek(fd, 2, SEEK_SET); in flock_0300()
84 lseek(fd, 2, SEEK_SET); in flock_0400()
102 lseek(fd, 2, SEEK_SET); in flock_0500()
131 lseek(fd, 2, SEEK_SET); in flock_0700()
/third_party/musl/libc-test/src/functionalext/supplement/unistd/
H A Dlseek.c69 off_t data = lseek(fd, 0L, SEEK_SET); in lseek_0100()
86 off_t data = lseek(fd, 8L, SEEK_SET); in lseek_0200()
103 off_t data = lseek(fd, 10L, SEEK_SET); in lseek_0300()
104 data = lseek(fd, 0L, SEEK_CUR); in lseek_0300()
121 off_t data = lseek(fd, -1L, SEEK_END); in lseek_0400()
138 off_t data = lseek(fd, -10L, SEEK_SET); in lseek_0500()
155 off_t data = lseek(fd, 10L, SEEK_END); in lseek_0600()
/third_party/skia/third_party/externals/oboe/samples/parselib/src/main/cpp/stream/
H A DFileInputStream.cpp28 ::lseek(mFH, -numBytes, SEEK_CUR); in peek()
34 ::lseek(mFH, numBytes, SEEK_CUR); in advance()
39 return ::lseek(mFH, 0L, SEEK_CUR); in getPos()
44 ::lseek(mFH, pos, SEEK_SET); in setPos()
/third_party/curl/src/
H A Dtool_cb_see.c37 both represent the same value. Maximum offset used here when we lseek
70 if(LSEEK_ERROR == lseek(per->infd, 0, SEEK_SET)) in tool_seek_cb()
76 if(LSEEK_ERROR == lseek(per->infd, step, SEEK_CUR)) in tool_seek_cb()
85 if(LSEEK_ERROR == lseek(per->infd, offset, whence)) in tool_seek_cb()
97 /* 64-bit lseek-like function unavailable */
99 # define _lseeki64(hnd,ofs,whence) lseek(hnd,ofs,whence)
/third_party/NuttX/fs/vfs/
H A Dfs_sendfile.c101 /* Use lseek to get the current file position */ in sendfile()
103 startpos = lseek(infd, 0, SEEK_CUR); in sendfile()
109 /* Use lseek again to set the new file position */ in sendfile()
111 if (lseek(infd, *offset, SEEK_SET) == (off_t)-1) in sendfile()
247 /* Use lseek to get the current file position */ in sendfile()
249 off_t curpos = lseek(infd, 0, SEEK_CUR); in sendfile()
259 /* Use lseek again to restore the original file position */ in sendfile()
261 if (lseek(infd, startpos, SEEK_SET) == (off_t)-1) in sendfile()
/third_party/python/Lib/test/
H A Dtest_largefile.py105 self.assertEqual(os.lseek(f.fileno(), 0, 0), 0)
106 self.assertEqual(os.lseek(f.fileno(), 42, 0), 42)
107 self.assertEqual(os.lseek(f.fileno(), 42, 1), 84)
108 self.assertEqual(os.lseek(f.fileno(), 0, 1), 84)
109 self.assertEqual(os.lseek(f.fileno(), 0, 2), size+1+0)
110 self.assertEqual(os.lseek(f.fileno(), -10, 2), size+1-10)
111 self.assertEqual(os.lseek(f.fileno(), -size-1, 2), 0)
112 self.assertEqual(os.lseek(f.fileno(), size, 0), size)
/third_party/ltp/testcases/kernel/io/direct_io/
H A Ddiotest4.c102 if (lseek(fd, offset, SEEK_SET) < 0) { in runtest_f()
104 tst_resm(TFAIL, "lseek before read failed: %s", in runtest_f()
117 if (lseek(fd, offset, SEEK_SET) < 0) { in runtest_f()
119 tst_resm(TFAIL, "lseek before write failed: %s", in runtest_f()
143 if (lseek(fd, offset, SEEK_SET) < 0) { in runtest_s()
144 tst_resm(TFAIL, "lseek before read failed: %s", in runtest_s()
154 if (lseek(fd, offset, SEEK_SET) < 0) { in runtest_s()
155 tst_resm(TFAIL, "lseek before write failed: %s", in runtest_s()
249 ret = lseek(fd, offset, SEEK_SET); in main()
251 tst_resm(TFAIL, "lseek allow in main()
[all...]
/third_party/zlib/examples/
H A Dgzlog.c231 #include <unistd.h> /* lseek, read, write, close, unlink, sleep, */
415 if (lseek(log->fd, 0, SEEK_SET) < 0 || in log_head()
451 ret = lseek(log->fd, HEAD, SEEK_SET) < 0 || in log_mark()
476 if (back != 8 && (lseek(log->fd, log->last - len, SEEK_SET) < 0 || in log_last()
491 return lseek(log->fd, log->last - len, SEEK_SET) < 0 || in log_last()
493 lseek(log->fd, log->stored, SEEK_CUR) < 0 ? -1 : 0; in log_last()
553 (end = lseek(log->fd, 0, SEEK_CUR)) < 0 || ftruncate(log->fd, end)) in log_append()
644 if (lseek(log->fd, log->first - (log->back > 8 ? 2 : 1), in log_compress()
646 read(log->fd, buf, 1) != 1 || lseek(log->fd, -1, SEEK_CUR) < 0) { in log_compress()
677 if ((log->first = lseek(lo in log_compress()
[all...]
H A Dgzappend.c33 * - Add L to constants in lseek() calls
210 if (lseek(in->fd, (off_t)bypass, SEEK_CUR) == -1) in skip()
291 lastoff = lseek(gz.fd, 0L, SEEK_CUR) - gz.left; in gzscan()
331 lastoff = lseek(gz.fd, 0L, SEEK_CUR) - strm->avail_in; in gzscan()
340 end = lseek(gz.fd, 0L, SEEK_CUR) - gz.left; in gzscan()
355 lseek(gz.fd, lastoff - (lastbit != 0), SEEK_SET); in gzscan()
358 lseek(gz.fd, -1L, SEEK_CUR); in gzscan()
374 lseek(gz.fd, --end, SEEK_SET); in gzscan()
378 lseek(gz.fd, end, SEEK_SET); in gzscan()
/third_party/ffmpeg/libavformat/
H A Dos_support.h45 # ifdef lseek
46 # undef lseek macro
48 # define lseek(f,p,w) _lseeki64((f), (p), (w)) macro
91 # ifdef lseek
92 # undef lseek macro
94 # define lseek(f,p,w) lseek64((f), (p), (w)) macro
/third_party/toybox/toys/posix/
H A Dtail.c65 // Reading through very large files is slow. Using lseek can speed things
72 off_t pos = lseek(fd, 0, SEEK_END); in try_lseek()
74 // If lseek() doesn't work on this stream, return now. in try_lseek()
79 if (lseek(fd, bytes, SEEK_END)<0) lseek(fd, 0, SEEK_SET); in try_lseek()
93 if (pos != lseek(fd, pos, SEEK_SET)) { in try_lseek()
122 lseek(fd, bytes, SEEK_SET); in try_lseek()
149 // so make lseek support optional. in do_tail()
/third_party/node/test/wasi/c/
H A Dftruncate.c23 assert(0 == lseek(fd, 0, SEEK_CUR)); in main()
29 assert(0 == lseek(fd, 0, SEEK_CUR)); in main()
35 assert(0 == lseek(fd, 0, SEEK_CUR)); in main()
/third_party/musl/libc-test/src/functionalext/supplement/stat/
H A Dfstatat.c38 lseek(fd, 0, SEEK_SET); in fstatat_0100()
62 lseek(fd, 0, SEEK_SET); in fstatat_0200()
94 lseek(fd, 0, SEEK_SET); in fstatat_0300()
117 lseek(fd, 0, SEEK_SET); in fstatat_time64_0100()
/third_party/ltp/testcases/kernel/mem/mmapstress/
H A Dmmapstress07.c171 if (lseek(rwfd, sparseoff, SEEK_SET) < 0) {
173 perror("lseek");
187 if (lseek(rwfd, holesize, SEEK_CUR) == -1) {
231 if (lseek(rwfd, sparseoff + e_pageskip * pagesize, SEEK_SET) == -1) {
233 CLEANERROR("couldn't lseek back to put e's in hole");
250 if (lseek(rofd, sparseoff, SEEK_SET) == -1) {
252 CLEANERROR("couldn't lseek to begining to verify contents");
/third_party/ltp/testcases/kernel/fs/doio/
H A Dwrite_log.c226 offset = lseek(wfile->w_afd, 0, SEEK_CUR) - reclen; in wlog_record_write()
229 "Could not reposition file pointer - lseek(%s, 0, SEEK_CUR) failed: %s\n", in wlog_record_write()
235 if ((lseek(wfile->w_rfd, offset, SEEK_SET)) == -1) { in wlog_record_write()
237 "Could not reposition file pointer - lseek(%s, %ld, SEEK_SET) failed: %s\n", in wlog_record_write()
276 if ((lseek(fd, 0, SEEK_END)) == -1) { in wlog_scan_backward()
278 "Could not reposition file pointer - lseek(%s, 0, SEEK_END) failed: %s\n", in wlog_scan_backward()
282 offset = lseek(fd, 0, SEEK_CUR); in wlog_scan_backward()
285 "Could not reposition file pointer - lseek(%s, 0, SEEK_CUR) failed: %s\n", in wlog_scan_backward()
311 if ((lseek(fd, offset, SEEK_SET)) == -1) { in wlog_scan_backward()
313 "Could not reposition file pointer - lseek( in wlog_scan_backward()
[all...]
/third_party/vk-gl-cts/framework/delibs/deutil/
H A DdeFile.c151 return lseek(file->fd, (off_t)offset, mapSeekPosition(base)) >= 0; in deFile_seek()
156 return lseek(file->fd, 0, SEEK_CUR); in deFile_getPosition()
162 deInt64 curPos = lseek(file->fd, 0, SEEK_CUR); in deFile_getSize()
167 size = lseek(file->fd, 0, SEEK_END); in deFile_getSize()
172 lseek(file->fd, (off_t)curPos, SEEK_SET); in deFile_getSize()
/third_party/ltp/testcases/kernel/io/ltp-aiodio/
H A Dread_checkzero.c54 offset = lseek(fd, 4096, SEEK_END); in read_eof()
57 offset = lseek(fd, offset - 4096, SEEK_SET); in read_eof()
/third_party/ltp/testcases/kernel/syscalls/llseek/
H A Dllseek01.c7 * Verify that lseek() call succeeds to set the file pointer position to an
30 TEST(lseek(fildes, (loff_t) (80 * BUFSIZ), SEEK_SET)); in verify_llseek()
32 tst_res(TPASS, "lseek() can set file pointer position larger than file size limit"); in verify_llseek()
34 tst_res(TFAIL, "lseek() returned wrong value %ld when write past file size", TST_RET); in verify_llseek()
41 TEST(lseek(fildes, (loff_t) BUFSIZ, SEEK_SET)); in verify_llseek()
43 tst_res(TPASS,"lseek() can set file pointer position under filer size limit"); in verify_llseek()
45 tst_brk(TFAIL,"lseek() returns wrong value %ld when write under file size", TST_RET); in verify_llseek()
/third_party/elfutils/tests/
H A Ddwfl-report-offline-memory.c66 off_t size = lseek (fd, 0, SEEK_END); in main()
68 error (-1, 0, "can't lseek file %s: %s", fname, strerror (errno)); in main()
69 lseek (fd, 0, SEEK_SET); in main()
/third_party/ltp/testcases/kernel/syscalls/mremap/
H A Dmremap01.c184 if (lseek(fildes, (off_t) memsize, SEEK_SET) != (off_t) memsize) { in setup()
206 if (lseek(fildes, (off_t) newsize, SEEK_SET) != (off_t) newsize) { in setup()
207 tst_brkm(TBROK, cleanup, "lseek() to %d offset pos. Failed, " in setup()
/third_party/ltp/testcases/kernel/fs/scsi/ltpscsi/
H A Dllseek.c98 * Now try ordinary lseek. in llse_llseek()
104 return lseek(fd, (off_t) offset, origin); in llse_llseek()
120 return lseek(fd, (off_t) offset, origin); in llse_llseek()
/third_party/skia/third_party/externals/libjpeg-turbo/md5/
H A Dmd5hl.c44 #define lseek _lseek macro
105 if (lseek(f, ofs, SEEK_SET) < 0) in MD5FileChunk()
/third_party/FreeBSD/sbin/fsck_msdosfs/
H A Dboot.c200 if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, in readboot()
226 if (lseek(dosfs, boot->bpbFSInfo * in readboot()
341 if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) in writefsinfo()
355 if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) in writefsinfo()
H A Ddir.c319 if (lseek(fd, off, SEEK_SET) != off) { in delete()
320 perr("Unable to lseek to %" PRId64, off); in delete()
331 if (lseek(fd, off, SEEK_SET) != off) { in delete()
332 perr("Unable to lseek to %" PRId64, off); in delete()
499 if (lseek(fd, off, SEEK_SET) != off || in check_subdirectory()
599 if (lseek(fd, off, SEEK_SET) != off || in readDosDirSection()
1001 if (lseek(fd, off, SEEK_SET) != off in readDosDirSection()
1021 if (lseek(fd, off, SEEK_SET) != off in readDosDirSection()
1122 if (lseek(dosfs, lfoff, SEEK_SET) != lfoff in reconnect()
1152 if (lseek(dosf in reconnect()
[all...]
/third_party/libwebsockets/lib/misc/fts/
H A Dtrie.c464 assert(lseek(t->fd, 0, SEEK_END) == (off_t)t->c); in finalize_per_input()
601 // assert(lseek(t->fd, 0, SEEK_END) == t->c); in lws_fts_fill()
1059 if (lseek(t->fd, lbh, SEEK_SET) < 0) { in lws_fts_fill()
1073 assert(lseek(t->fd, 0, SEEK_END) == (off_t)t->c); in lws_fts_fill()
1075 if (lseek(t->fd, (off_t)t->c, SEEK_SET) < 0) { in lws_fts_fill()
1185 if (lseek(t->fd, 0xc, SEEK_SET) < 0) in lws_fts_serialize()
1193 if (lseek(t->fd, (off_t)(t->c + (unsigned int)bp), SEEK_SET) < 0) in lws_fts_serialize()
1337 assert(lseek(t->fd, 0, SEEK_END) == (off_t)t->c); in lws_fts_serialize()
1341 if (lseek(t->fd, 4, SEEK_SET) < 0) { in lws_fts_serialize()

Completed in 13 milliseconds

12345678910>>...12