| /openbsd-src/regress/sys/kern/flock/ |
| H A D | flock.c | 113 struct flock fl; in test2() local 120 fl.l_start = 0; in test2() 121 fl.l_len = 0; in test2() 122 fl.l_type = F_WRLCK; in test2() 123 fl.l_whence = SEEK_SET; in test2() 135 if (fcntl(fd, F_SETLK, &fl) < 0) in test2() 155 res = fcntl(fd, F_SETLK, &fl); in test2() 184 struct flock fl; in test3() local 191 fl.l_start = 0; in test3() 192 fl.l_len = 0; in test3() [all …]
|
| H A D | lockf.c | 35 struct flock fl; in test1() local 39 fl.l_start = 0; in test1() 40 fl.l_len = 16; in test1() 41 fl.l_type = F_WRLCK; in test1() 42 fl.l_whence = SEEK_CUR; in test1() 43 res = fcntl(fd, F_SETLK, &fl); in test1() 50 res = fcntl(fd, F_SETLK, &fl); in test1() 52 FAIL(fl.l_type != F_WRLCK); in test1() 67 struct flock fl; in test2() local 75 fl.l_start = 0; in test2() [all …]
|
| /openbsd-src/usr.sbin/rpc.lockd/ |
| H A D | lockd_lock.c | 148 struct file_lock *fl; in lock_lookup() local 150 LIST_FOREACH(fl, &lcklst_head, lcklst) { in lock_lookup() 152 newfl->client.svid != fl->client.svid) in lock_lookup() 155 strcmp(newfl->client_name, fl->client_name) != 0) in lock_lookup() 158 fhcmp(&newfl->filehandle, &fl->filehandle) != 0) in lock_lookup() 164 return fl; in lock_lookup() 176 struct file_lock *fl; in testlock() local 187 LIST_FOREACH(fl, &lcklst_head, lcklst) { in testlock() 188 if (fl->status != LKST_LOCKED) in testlock() 190 if (fhcmp(&fl->filehandle, &filehandle) != 0) in testlock() [all …]
|
| /openbsd-src/lib/libc/gen/ |
| H A D | lockf.c | 40 struct flock fl; in lockf() local 43 fl.l_start = 0; in lockf() 44 fl.l_len = size; in lockf() 45 fl.l_whence = SEEK_CUR; in lockf() 50 fl.l_type = F_UNLCK; in lockf() 54 fl.l_type = F_WRLCK; in lockf() 58 fl.l_type = F_WRLCK; in lockf() 61 fl.l_type = F_WRLCK; in lockf() 62 if (fcntl(filedes, F_GETLK, &fl) == -1) in lockf() 64 if (fl.l_type == F_UNLCK || fl.l_pid == getpid()) in lockf() [all …]
|
| /openbsd-src/regress/sys/kern/kqueue/ |
| H A D | kqueue-flock.c | 32 struct flock fl; in check_lock() local 34 memset(&fl, 0, sizeof fl); in check_lock() 35 fl.l_type = F_WRLCK; in check_lock() 36 if (fcntl(fd, F_SETLK, &fl) == 0) { in check_lock() 42 if (fcntl(fd, F_GETLK, &fl)) in check_lock() 44 if (fl.l_type != F_WRLCK) { in check_lock() 62 struct flock fl; in do_flock() local 67 memset(&fl, 0, sizeof fl); in do_flock() 68 fl.l_type = F_WRLCK; in do_flock() 69 if (fcntl(fd, F_SETLK, &fl)) in do_flock()
|
| /openbsd-src/usr.bin/sort/ |
| H A D | file.c | 180 file_list_init(struct file_list *fl, bool tmp) in file_list_init() argument 182 fl->count = 0; in file_list_init() 183 fl->sz = 0; in file_list_init() 184 fl->fns = NULL; in file_list_init() 185 fl->tmp = tmp; in file_list_init() 192 file_list_add(struct file_list *fl, char *fn, bool allocate) in file_list_add() argument 194 if (fl->count >= fl->sz) { in file_list_add() 195 fl->fns = sort_reallocarray(fl in file_list_add() 207 file_list_populate(struct file_list * fl,int argc,char ** argv,bool allocate) file_list_populate() argument 220 file_list_clean(struct file_list * fl) file_list_clean() argument 713 procfile(const char * fsrc,struct sort_list * list,struct file_list * fl) procfile() argument 1008 shrink_file_list(struct file_list * fl) shrink_file_list() argument 1051 merge_files(struct file_list * fl,const char * fn_out) merge_files() argument [all...] |
| H A D | file.h | 105 void file_list_init(struct file_list *fl, bool tmp); 106 void file_list_add(struct file_list *fl, char *fn, bool allocate); 107 void file_list_populate(struct file_list *fl, int argc, char **argv, bool allocate); 108 void file_list_clean(struct file_list *fl); 111 void merge_files(struct file_list *fl, const char *fn_out); 114 int procfile(const char *fn, struct sort_list *list, struct file_list *fl);
|
| /openbsd-src/usr.bin/rsync/ |
| H A D | flist.c | 71 flist_dedupe(struct flist **fl, size_t *sz) in flist_dedupe() argument 89 f = &(*fl)[i]; in flist_dedupe() 90 fnext = &(*fl)[i + 1]; in flist_dedupe() 127 new[j++] = (*fl)[i]; in flist_dedupe() 135 free(*fl); in flist_dedupe() 136 *fl = new; in flist_dedupe() 153 flist_topdirs(struct sess *sess, struct flist *fl, size_t flsz) in flist_topdirs() argument 161 if (flsz && strcmp(fl[0].wpath, ".")) { in flist_topdirs() 163 if (!S_ISDIR(fl[i].st.mode)) in flist_topdirs() 165 cp = strchr(fl[i].wpath, '/'); in flist_topdirs() [all …]
|
| H A D | sender.c | 102 const struct flist *fl) in send_up_fsm() argument 179 fl[up->cur->idx].path, in send_up_fsm() 205 fl[up->cur->idx].path, &up->stat); in send_up_fsm() 238 LOG1("%s", fl[up->cur->idx].wpath); in send_up_fsm() 256 LOG1("%s", fl[up->cur->idx].wpath); in send_up_fsm() 267 fl[up->cur->idx].path, (intmax_t)up->cur->blks->size); in send_up_fsm() 284 int32_t idx, const struct flist *fl, size_t flsz, int fd) in send_dl_enqueue() argument 307 } else if (S_ISDIR(fl[idx].st.mode)) { in send_dl_enqueue() 309 "directory: %s", fl[idx].path); in send_dl_enqueue() 311 } else if (S_ISLNK(fl[idx].st.mode)) { in send_dl_enqueue() [all …]
|
| H A D | ids.c | 52 idents_assign_gid(struct sess *sess, struct flist *fl, size_t flsz, in idents_assign_gid() argument 60 if (fl[i].st.gid == 0) in idents_assign_gid() 63 if ((int32_t)fl[i].st.gid == ids[j].id) in idents_assign_gid() 66 fl[i].st.gid = ids[j].mapped; in idents_assign_gid() 74 idents_assign_uid(struct sess *sess, struct flist *fl, size_t flsz, in idents_assign_uid() argument 82 if (fl[i].st.uid == 0) in idents_assign_uid() 85 if ((int32_t)fl[i].st.uid == ids[j].id) in idents_assign_uid() 88 fl[i].st.uid = ids[j].mapped; in idents_assign_uid()
|
| H A D | uploader.c | 57 const struct flist *fl; /* file list */ member 177 f = &p->fl[p->idx]; in pre_symlink() 282 f = &p->fl[p->idx]; in pre_dev() 371 f = &p->fl[p->idx]; in pre_fifo() 448 f = &p->fl[p->idx]; in pre_sock() 524 f = &p->fl[p->idx]; in pre_dir() 586 f = &u->fl[idx]; in post_dir() 705 f = &p->fl[p->idx]; in pre_file() 810 size_t clen, const struct flist *fl, size_t flsz, mode_t msk) in upload_alloc() argument 830 p->fl = fl; in upload_alloc() [all …]
|
| /openbsd-src/usr.bin/vi/ex/ |
| H A D | ex_move.c | 89 recno_t cnt, diff, fl, tl, mfl, mtl; in ex_move() local 118 fl = fm1.lno; in ex_move() 125 lmp->lno >= fl && lmp->lno <= tl) { in ex_move() 136 if (tl > fl) { /* Destination > source. */ in ex_move() 140 if (db_get(sp, fl, DBG_FATAL, &p, &len)) in ex_move() 149 lmp->lno == fl) in ex_move() 151 if (db_delete(sp, fl)) in ex_move() 158 if (db_get(sp, fl, DBG_FATAL, &p, &len)) in ex_move() 167 lmp->lno == fl) in ex_move() 169 ++fl; in ex_move() [all …]
|
| /openbsd-src/gnu/llvm/lldb/source/Host/posix/ |
| H A D | LockFilePosix.cpp | 21 struct flock fl; in fileLock() local 23 fl.l_type = lock_type; in fileLock() 24 fl.l_whence = SEEK_SET; in fileLock() 25 fl.l_start = start; in fileLock() 26 fl.l_len = len; in fileLock() 27 fl.l_pid = ::getpid(); in fileLock() 30 if (llvm::sys::RetryAfterSignal(-1, ::fcntl, fd, cmd, &fl) == -1) in fileLock()
|
| /openbsd-src/gnu/usr.bin/cvs/lib/ |
| H A D | ftruncate.c | 33 struct flock fl; local 52 fl.l_whence = 0; 53 fl.l_len = 0; 54 fl.l_start = length; 55 fl.l_type = F_WRLCK; /* Write lock on file space. */ 61 if (fcntl (fd, F_FREESP, &fl) < 0)
|
| /openbsd-src/usr.bin/cvs/ |
| H A D | checkout.c | 241 struct cvs_filelist *fl, *nxt; in checkout_check_repository() local 304 RB_FOREACH(fl, cvs_flisthead, &(mc->mc_ignores)) in checkout_check_repository() 305 cvs_file_ignore(fl->file_path, &checkout_ign_pats); in checkout_check_repository() 307 RB_FOREACH(fl, cvs_flisthead, &(mc->mc_modules)) { in checkout_check_repository() 311 current_cvsroot->cr_dir, fl->file_path); in checkout_check_repository() 314 module_repo_root = xstrdup(fl->file_path); in checkout_check_repository() 322 wdir = fl->file_path; in checkout_check_repository() 326 switch (checkout_classify(repo, fl->file_path)) { in checkout_check_repository() 332 if (strlcpy(path, fl->file_path, in checkout_check_repository() 339 if (strlcpy(path, fl->file_path, in checkout_check_repository() [all …]
|
| H A D | file.c | 193 struct cvs_flisthead fl; in cvs_file_run() local 195 RB_INIT(&fl); in cvs_file_run() 199 cvs_file_get(argv[i], FILE_USER_SUPPLIED, &fl, 0); in cvs_file_run() 202 cvs_file_walklist(&fl, cr); in cvs_file_run() 203 cvs_file_freelist(&fl); in cvs_file_run() 207 cvs_file_get(char *name, int flags, struct cvs_flisthead *fl, int type) in cvs_file_get() argument 216 l = RB_FIND(cvs_flisthead, fl, &find); in cvs_file_get() 225 RB_INSERT(cvs_flisthead, fl, l); in cvs_file_get() 262 cvs_file_walklist(struct cvs_flisthead *fl, struct cvs_recursion *cr) in cvs_file_walklist() argument 271 for (l = RB_MIN(cvs_flisthead, fl); l != NULL; l = nxt) { in cvs_file_walklist() [all …]
|
| /openbsd-src/sys/lib/libsa/ |
| H A D | alloc.c | 115 struct fl { struct 117 struct fl *next; argument 135 struct fl **f = &freelist, **bestf = NULL; in alloc() 183 if (size < ALIGN(sizeof (struct fl *))) in alloc() 184 size = ALIGN(sizeof (struct fl *)); in alloc() 216 struct fl *f; in free() 221 f = (struct fl *)((char *)ptr - ALIGN(sizeof(unsigned))); in free()
|
| /openbsd-src/sys/kern/ |
| H A D | kern_descrip.c | 411 struct flock fl; in sys_fcntl() local 519 error = copyin((caddr_t)SCARG(uap, arg), (caddr_t)&fl, in sys_fcntl() 520 sizeof (fl)); in sys_fcntl() 525 ktrflock(p, &fl); in sys_fcntl() 527 if (fl.l_whence == SEEK_CUR) { in sys_fcntl() 530 if (fl.l_start == 0 && fl.l_len < 0) { in sys_fcntl() 532 fl.l_len = -fl.l_len; in sys_fcntl() 533 fl in sys_fcntl() [all...] |
| H A D | vfs_lockf.c | 216 struct flock *fl, int flags) in lf_advlock() argument 227 switch (fl->l_whence) { in lf_advlock() 234 start = fl->l_start; in lf_advlock() 237 start = size + fl->l_start; in lf_advlock() 244 if (fl->l_len > 0) { in lf_advlock() 245 if (fl->l_len - 1 > LLONG_MAX - start) in lf_advlock() 247 end = start + (fl->l_len - 1); in lf_advlock() 251 } else if (fl->l_len < 0) { in lf_advlock() 252 if (start + fl->l_len < 0) in lf_advlock() 255 start += fl->l_len; in lf_advlock() [all …]
|
| /openbsd-src/gnu/gcc/libmudflap/testsuite/libmudflap.c/ |
| H A D | pass45-frag.c | 17 size_t fl = strlen (f) + 1; in h() local 18 char a[pl + 1 + fl]; in h() 20 char b[pl + 5 + fl * 2]; in h() 27 memcpy (cp, f, fl); in h()
|
| /openbsd-src/gnu/gcc/gcc/config/m68k/ |
| H A D | fpgnulib.c | 111 union float_long fl; in __unordsf2() local 113 fl.f = a; in __unordsf2() 114 if (EXP(fl.l) == EXP(~0u) && (MANT(fl.l) & ~HIDDEN) != 0) in __unordsf2() 116 fl.f = b; in __unordsf2() 117 if (EXP(fl.l) == EXP(~0u) && (MANT(fl.l) & ~HIDDEN) != 0) in __unordsf2() 278 register union float_long fl; in __truncdfsf2() local 285 fl.l = SIGND(dl1); in __truncdfsf2() 286 return fl.f; in __truncdfsf2() 318 fl.l = PACK (SIGND (dl1), exp, mant); in __truncdfsf2() 319 return (fl.f); in __truncdfsf2()
|
| /openbsd-src/lib/libc/thread/ |
| H A D | rthread_file.c | 88 struct file_lock fl; member 105 if (flh[idx].fl.fp == fp && flh[idx].fl.owner != NULL) in find_lock() 107 p = &flh[idx].fl; in find_lock() 134 if (flh[idx].fl.owner == NULL) { in do_lock() 136 p = &flh[idx].fl; in do_lock()
|
| /openbsd-src/games/trek/ |
| H A D | klmove.c | 61 klmove(int fl) in klmove() argument 76 printf("klmove: fl = %d, Etc.nkling = %d\n", fl, Etc.nkling); in klmove() 82 if (fl) in klmove() 84 if (ranf(i) >= Param.moveprob[2 * Move.newquad + fl]) in klmove() 88 motion *= k->avgdist * Param.movefac[2 * Move.newquad + fl]; in klmove()
|
| H A D | warp.c | 57 dowarp(int fl) in dowarp() argument 64 warp(fl, c, d); in dowarp() 68 warp(int fl, int c, double d) in warp() argument 123 Move.time = move(fl, course, time, speed); in warp()
|
| /openbsd-src/usr.sbin/gpioctl/ |
| H A D | gpioctl.c | 75 int pin, ch, ga_offset = -1, n, fl = 0, value = 0; in main() local 157 fl |= bs->mask; in main() 164 pinset(pin, nm, fl, nam); in main() 262 pinset(int pin, char *name, int fl, char *alias) in pinset() argument 272 set.gp_flags = fl; in pinset() 294 if (fl > 0) { in pinset() 297 if (fl & bs->mask) in pinset()
|