Skip to content

Commit

Permalink
xdg-document-portal: implement flock
Browse files Browse the repository at this point in the history
This is needed for Steam client

Signed-off-by: Kyohei KADOTA <[email protected]>
  • Loading branch information
lufia committed Apr 29, 2024
1 parent 0cad9ea commit 44ccc71
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion document-portal/document-portal-fuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -3192,10 +3192,16 @@ xdp_fuse_flock (fuse_req_t req,
int lock_op)
{
const char *op = "FLOCK";
XdpFile *file = (XdpFile *)fi->fh;
int res;

g_debug ("FLOCK %lx", ino);

xdp_reply_err (op, req, ENOSYS);
res = flock (file->fd, lock_op);
if (res == 0)
xdp_reply_ok (op, req);
else
xdp_reply_err (op, req, errno);
}

static void
Expand Down

0 comments on commit 44ccc71

Please sign in to comment.