/third_party/ltp/testcases/network/nfs/nfslock01/ |
H A D | nfs_flock.h | 16 #define read_lock(fd, offset, whence, len) \ 17 lock_reg(fd, F_RDLCK, offset, whence, len, F_SETLK) 18 #define write_lock(fd, offset, whence, len) \ 19 lock_reg(fd, F_WRLCK, offset, whence, len, F_SETLK) 20 #define un_lock(fd, offset, whence, len) \ 21 lock_reg(fd, F_UNLCK, offset, whence, len, F_SETLK) 22 #define readb_lock(fd, offset, whence, len) \ 23 lock_reg(fd, F_RDLCK, offset, whence, len, F_SETLKW) 24 #define writeb_lock(fd, offset, whence, len) \ 25 lock_reg(fd, F_WRLCK, offset, whence, le [all...] |
H A D | nfs_flock_func.c | 12 int lock_reg(int fd, int type, off_t offset, int whence, off_t len, int cmd) in lock_reg() argument 18 lock.l_whence = whence; in lock_reg() 24 int lock_test(int fd, int type, off_t offset, int whence, int len) in lock_test() argument 30 lock.l_whence = whence; in lock_test()
|
/third_party/musl/porting/liteos_a/kernel/src/stdio/ |
H A D | fseek.c | 4 int __fseeko_unlocked(FILE *f, off_t off, int whence) in __fseeko_unlocked() argument 6 /* Fail immediately for invalid whence argument. */ in __fseeko_unlocked() 7 if (whence != SEEK_CUR && whence != SEEK_SET && whence != SEEK_END) { in __fseeko_unlocked() 13 if (whence == SEEK_CUR && f->rend) off -= f->rend - f->rpos; in __fseeko_unlocked() 25 if (f->seek(f, off, whence) < 0) return -1; in __fseeko_unlocked() 34 int __fseeko(FILE *f, off_t off, int whence) in __fseeko() argument 38 result = __fseeko_unlocked(f, off, whence); in __fseeko() 43 int fseek(FILE *f, long off, int whence) in fseek() argument [all...] |
/third_party/musl/src/stdio/ |
H A D | fseek.c | 7 int __fseeko_unlocked(FILE *f, off_t off, int whence) in __fseeko_unlocked() argument 9 /* Fail immediately for invalid whence argument. */ in __fseeko_unlocked() 10 if (whence != SEEK_CUR && whence != SEEK_SET && whence != SEEK_END) { in __fseeko_unlocked() 16 if (whence == SEEK_CUR && f->rend) off -= f->rend - f->rpos; in __fseeko_unlocked() 28 if (f->seek(f, off, whence) < 0) return -1; in __fseeko_unlocked() 37 int __fseeko(FILE *f, off_t off, int whence) in __fseeko() argument 44 result = __fseeko_unlocked(f, off, whence); in __fseeko() 49 int fseek(FILE *f, long off, int whence) in fseek() argument [all...] |
/third_party/musl/porting/liteos_m/kernel/src/stdio/ |
H A D | fseek.c | 3 int __fseeko_unlocked(FILE *f, off_t off, int whence)
in __fseeko_unlocked() argument 6 if (whence == SEEK_CUR && f->rend) off -= f->rend - f->rpos;
in __fseeko_unlocked() 18 if (lseek(f->fd, off, whence) < 0) return -1;
in __fseeko_unlocked() 27 int __fseeko(FILE *f, off_t off, int whence)
in __fseeko() argument 31 result = __fseeko_unlocked(f, off, whence);
in __fseeko() 36 int fseek(FILE *f, long off, int whence)
in fseek() argument 38 return __fseeko(f, off, whence);
in fseek()
|
H A D | __stdio_seek.c | 5 static off64_t __stdio_lseek64(int fd, int offsetHigh, int offsetLow, off64_t *result, int whence)
18 /* libc seekdir function should set the whence to SEEK_SET, so we can discard
19 * the whence argument here */
38 ret = file_seek64(filep, offset, whence);
49 off_t __stdio_seek(FILE *f, off_t off, int whence)
in __stdio_seek() argument 52 return lseek(f->fd, (unsigned int)off, whence) ? -1 : result;
in __stdio_seek()
|
/third_party/musl/porting/uniproton/kernel/src/stdio/ |
H A D | fseek.c | 3 int __fseeko_unlocked(FILE *f, off_t off, int whence)
in __fseeko_unlocked() argument 6 if (whence == SEEK_CUR && f->rend) off -= f->rend - f->rpos;
in __fseeko_unlocked() 18 if (lseek(f->fd, off, whence) < 0) return -1;
in __fseeko_unlocked() 27 int __fseeko(FILE *f, off_t off, int whence)
in __fseeko() argument 31 result = __fseeko_unlocked(f, off, whence);
in __fseeko() 36 int fseek(FILE *f, long off, int whence)
in fseek() argument 38 return __fseeko(f, off, whence);
in fseek()
|
H A D | __stdio_seek.c | 5 static off64_t __stdio_lseek64(int fd, int offsetHigh, int offsetLow, off64_t *result, int whence)
18 /* libc seekdir function should set the whence to SEEK_SET, so we can discard
19 * the whence argument here */
38 ret = file_seek64(filep, offset, whence);
49 off_t __stdio_seek(FILE *f, off_t off, int whence)
in __stdio_seek() argument 52 return lseek(f->fd, (unsigned int)off, whence) ? -1 : result;
in __stdio_seek()
|
/third_party/ffmpeg/libavformat/ |
H A D | cache.c | 227 static int64_t cache_seek(URLContext *h, int64_t pos, int whence) in cache_seek() argument 232 if (whence == AVSEEK_SIZE) { in cache_seek() 233 pos= ffurl_seek(c->inner, pos, whence); in cache_seek() 245 if (whence == SEEK_CUR) { in cache_seek() 246 whence = SEEK_SET; in cache_seek() 248 } else if (whence == SEEK_END && c->is_true_eof) { in cache_seek() 250 whence = SEEK_SET; in cache_seek() 254 if (whence == SEEK_SET && pos >= 0 && pos < c->end) { in cache_seek() 261 ret= ffurl_seek(c->inner, pos, whence); in cache_seek() 262 if ((whence in cache_seek() [all...] |
H A D | subfile.c | 115 static int64_t subfile_seek(URLContext *h, int64_t pos, int whence) in subfile_seek() argument 121 if (whence == AVSEEK_SIZE || whence == SEEK_END) { in subfile_seek() 127 if (whence == AVSEEK_SIZE) in subfile_seek() 129 switch (whence) { in subfile_seek()
|
/third_party/musl/porting/liteos_a_newlib/kernel/src/ |
H A D | fs.c | 72 off_t _lseek(int fd, off_t offset, int whence) in _lseek() argument 74 return lseek(fd, offset, whence); in _lseek() 77 int __wrap__fseeko_r(struct _reent *ptr, register FILE *fp, _off_t offset, int whence) in __wrap__fseeko_r() argument 79 return _lseek(fp, offset, whence); in __wrap__fseeko_r() 119 off_t _lseek(int fd, off_t offset, int whence) in _lseek() argument 124 int __wrap__fseeko_r(struct _reent *ptr, register FILE *fp, _off_t offset, int whence) in __wrap__fseeko_r() argument
|
/third_party/ltp/testcases/kernel/syscalls/llseek/ |
H A D | llseek03.c | 39 int whence; member 61 static const char *str_whence(int whence) in str_whence() argument 63 switch (whence) { in str_whence() 85 TEST(lseek(fd, tc->off, tc->whence)); in verify_lseek() 107 tst_res(TPASS, "%s read returned 0", str_whence(tc->whence)); in verify_lseek() 115 tst_res(TPASS, "%s for llseek", str_whence(tc->whence)); in verify_lseek()
|
H A D | llseek02.c | 8 * 1) lseek(2) fails and sets errno to EINVAL when whence is invalid. 31 int whence; member 42 TEST(lseek(*tc->fd, (loff_t) 1, tc->whence)); in verify_llseek() 45 *tc->fd, tc->whence, TST_RET); in verify_llseek() 50 *tc->fd, tc->whence); in verify_llseek() 53 "unexpectedly, expected %s", *tc->fd, tc->whence, in verify_llseek()
|
/third_party/curl/src/ |
H A D | tool_cb_see.c | 50 int tool_seek_cb(void *userdata, curl_off_t offset, int whence) in tool_seek_cb() argument 66 if(whence != SEEK_SET) in tool_seek_cb() 85 if(LSEEK_ERROR == lseek(per->infd, offset, whence)) in tool_seek_cb() 99 # define _lseeki64(hnd,ofs,whence) lseek(hnd,ofs,whence)
|
/third_party/NuttX/fs/vfs/ |
H A D | fs_lseek64.c | 68 * whence Defines how to use offset 76 off64_t file_seek64(struct file *filep, off64_t offset, int whence) in file_seek64() argument 95 pos = filep->ops->seek(filep, offset, whence); in file_seek64() 108 switch (whence) in file_seek64() 150 * directive 'whence' as follows: 167 * whence Defines how to use offset 173 * EINVAL whence is not one of SEEK_SET, SEEK_CUR, SEEK_END; or the 181 off64_t lseek64(int fd, off64_t offset, int whence) in lseek64() argument 196 return file_seek64(filep, offset, whence); in lseek64()
|
H A D | fs_lseek.c | 50 * whence Defines how to use offset 58 off_t file_seek(struct file *filep, off_t offset, int whence) in file_seek() argument 76 pos = filep->ops->seek(filep, offset, whence); in file_seek() 89 switch (whence) in file_seek() 130 * directive 'whence' as follows: 147 * whence Defines how to use offset 153 * EINVAL whence is not one of SEEK_SET, SEEK_CUR, SEEK_END; or the 161 off_t lseek(int fd, off_t offset, int whence) in lseek() argument 176 return file_seek(filep, offset, whence); in lseek()
|
/third_party/ltp/testcases/kernel/syscalls/lseek/ |
H A D | lseek02.c | 10 * 2) lseek(2) fails ans sets errno to EINVAL when whence is invalid. 32 int whence; member 56 TEST(lseek(*tc->fd, (off_t) 1, tc->whence)); in verify_lseek() 59 *tc->fd, tc->whence); in verify_lseek() 65 *tc->fd, tc->whence); in verify_lseek() 68 "unexpectedly, expected %s", *tc->fd, tc->whence, in verify_lseek()
|
/third_party/python/Modules/clinic/ |
H A D | fcntlmodule.c.h | 172 "lockf($module, fd, cmd, len=0, start=0, whence=0, /)\n" 191 "EOF. `start` is the byte offset, relative to `whence`, to that the lock\n" 192 "starts. `whence` is as with fileobj.seek(), specifically:\n" 203 PyObject *startobj, int whence); 213 int whence = 0; in fcntl_lockf() local 236 whence = _PyLong_AsInt(args[4]); in fcntl_lockf() 237 if (whence == -1 && PyErr_Occurred()) { in fcntl_lockf() 241 return_value = fcntl_lockf_impl(module, fd, code, lenobj, startobj, whence); in fcntl_lockf()
|
/third_party/musl/src/unistd/ |
H A D | lseek.c | 4 off_t __lseek(int fd, off_t offset, int whence) in __lseek() argument 8 return syscall(SYS__llseek, fd, offset>>32, offset, &result, whence) ? -1 : result; in __lseek() 10 return syscall(SYS_lseek, fd, offset, whence); in __lseek()
|
/third_party/python/Lib/ |
H A D | _compression.py | 130 def seek(self, offset, whence=io.SEEK_SET): 132 if whence == io.SEEK_SET: 134 elif whence == io.SEEK_CUR: 136 elif whence == io.SEEK_END: 143 raise ValueError("Invalid value for whence: {}".format(whence))
|
H A D | codecs.py | 399 def seek(self, offset, whence=0): 400 self.stream.seek(offset, whence) 401 if whence == 0 and offset == 0: 634 def seek(self, offset, whence=0): 639 self.stream.seek(offset, whence) 732 def seek(self, offset, whence=0): 733 self.stream.seek(offset, whence) 735 if whence == 0 and offset == 0: 850 def seek(self, offset, whence=0): 853 self.reader.seek(offset, whence) [all...] |
/third_party/libsnd/ossfuzz/ |
H A D | sndfile_fuzz_header.h | 16 static sf_count_t vfseek (sf_count_t offset, int whence, void *user_data) in vfseek() argument 21 switch (whence) in vfseek() 42 " whence(%d), vf->offset(%" PRId64 "), offset(%" PRId64 ")\n", in vfseek() 43 new_offset, vf->length, whence, vf->offset, offset) ; in vfseek() 48 printf("vf underseek: new_offset(%" PRId64 ") < 0; whence(%d), vf->offset" in vfseek() 50 new_offset, whence, vf->offset, vf->length, offset) ; in vfseek()
|
/third_party/musl/libc-test/src/functional/ |
H A D | fopencookie_test.c | 74 int mseek(void *f, off_t *off, int whence)
in mseek() argument 78 if (whence == SEEK_SET) {
in mseek() 80 } else if (whence == SEEK_CUR) {
in mseek() 82 } else if (whence == SEEK_END) {
in mseek()
|
/third_party/python/Modules/_io/clinic/ |
H A D | stringio.c.h | 153 "seek($self, pos, whence=0, /)\n" 158 "Seek to character offset pos relative to position indicated by whence:\n" 168 _io_StringIO_seek_impl(stringio *self, Py_ssize_t pos, int whence); 175 int whence = 0; in _io_StringIO_seek() local 195 whence = _PyLong_AsInt(args[1]); in _io_StringIO_seek() 196 if (whence == -1 && PyErr_Occurred()) { in _io_StringIO_seek() 200 return_value = _io_StringIO_seek_impl(self, pos, whence); in _io_StringIO_seek()
|
/third_party/ltp/testcases/kernel/syscalls/pwrite/ |
H A D | pwrite04.c | 33 static void l_seek(int fdesc, off_t offset, int whence, off_t checkoff) in l_seek() argument 37 offloc = SAFE_LSEEK(fdesc, offset, whence); in l_seek() 40 (int64_t)offloc, fdesc, (int64_t)offset, whence, (int64_t)checkoff); in l_seek()
|