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 #1117
Signed-off-by: Hubert Figuière <[email protected]>
  • Loading branch information
hfiguiere authored and GeorgesStavracas committed Nov 22, 2023
1 parent 45c02b0 commit 954cdc6
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 @@ -3161,10 +3161,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, errno);

return xdp_reply_err (op, req, 0);
}

static void
Expand Down

0 comments on commit 954cdc6

Please sign in to comment.