Skip to content

Commit

Permalink
xdg-document-portal: implement setlk
Browse files Browse the repository at this point in the history
This is needed for things like sqlite3

See flatpak#1117

Signed-off-by: Hubert Figuière <[email protected]>
  • Loading branch information
hfiguiere committed Nov 14, 2023
1 parent ae6125a commit c53dc8c
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 @@ -3159,10 +3159,16 @@ xdp_fuse_setlk (fuse_req_t req,
int sleep)
{
const char *op = "SETLK";
XdpFile *file = (XdpFile *)fi->fh;
int res;

g_debug ("SETLK %lx", ino);

xdp_reply_err (op, req, ENOSYS);
res = fcntl (file->fd, F_SETLK, lock);
if (res == 0)
return xdp_reply_err (op, req, 0);
else
return xdp_reply_err (op, req, errno);
}

static void
Expand Down

0 comments on commit c53dc8c

Please sign in to comment.