Logo Search packages:      
Sourcecode: fuse version File versions

int fuse_reply_lock ( fuse_req_t  req,
struct flock *  lock 

Reply with file lock information

Possible requests: getlk

req request handle
lock the lock information
zero for success, -errno for failure to send reply

Definition at line 412 of file fuse_lowlevel.c.

References fuse_reply_lock().

Referenced by fuse_reply_lock().

      struct fuse_lk_out arg;

      memset(&arg, 0, sizeof(arg));
      arg.lk.type = lock->l_type;
      if (lock->l_type != F_UNLCK) {
            arg.lk.start = lock->l_start;
            if (lock->l_len == 0)
                  arg.lk.end = OFFSET_MAX;
                  arg.lk.end = lock->l_start + lock->l_len - 1;
      arg.lk.pid = lock->l_pid;
      return send_reply_ok(req, &arg, sizeof(arg));

Generated by  Doxygen 1.6.0   Back to index