Lines Matching defs:length
29 do_lock(int fd, int type, off_t start, off_t length)
31 printf("%s lock %lld:%lld\n", type_name(type), start, length);
37 flock.l_len = length;
40 start, length, strerror(errno));
49 shared_lock(int fd, off_t start, off_t length)
51 return do_lock(fd, F_RDLCK, start, length);
56 exclusive_lock(int fd, off_t start, off_t length)
58 return do_lock(fd, F_WRLCK, start, length);
63 remove_lock(int fd, off_t start, off_t length)
65 return do_lock(fd, F_UNLCK, start, length);
81 fprintf(stderr, "usage: %s [shared|exclusive|unlock <start> <length>] "
90 int length = strlen(op);
91 if (length == 0)
94 return command1 != NULL && !strncmp(op, command1, length)
95 || command2 != NULL && !strncmp(op, command2, length);
120 off_t length = strtoll(argv[3], NULL, 0);
131 do_lock(fd, type, start, length);