summaryrefslogtreecommitdiff
path: root/document-portal/xdp-fuse.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2015-09-08 14:53:14 +0200
committerAlexander Larsson <alexl@redhat.com>2015-09-08 14:53:14 +0200
commit42c6cd4574e4b91aeda304a9f6f41bcee9834871 (patch)
tree830ff8142e54c4684ada942e0bfe832155a6a366 /document-portal/xdp-fuse.c
parentfa3eb155805bf963bdec04d04eff0cb3310cdb3b (diff)
downloadxdg-app-42c6cd4574e4b91aeda304a9f6f41bcee9834871.tar.gz
document portal: Correctly handle recursive documents
I.e. if you pass in a document fd to the document portal we reuse the existing id.
Diffstat (limited to 'document-portal/xdp-fuse.c')
-rw-r--r--document-portal/xdp-fuse.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/document-portal/xdp-fuse.c b/document-portal/xdp-fuse.c
index 7ad4a70..f4204db 100644
--- a/document-portal/xdp-fuse.c
+++ b/document-portal/xdp-fuse.c
@@ -2170,6 +2170,18 @@ xdp_fuse_invalidate_doc (const char *doc_id_s,
fuse_lowlevel_notify_inval_entry (main_ch, FUSE_ROOT_ID, doc_id_s, strlen (doc_id_s));
}
+guint32
+xdp_fuse_lookup_id_for_inode (ino_t inode)
+{
+ XdpInodeClass class = get_class (inode);
+ guint64 class_ino = get_class_ino (inode);
+
+ if (class != APP_DOC_FILE_INO_CLASS)
+ return 0;
+
+ return get_doc_id_from_app_doc_ino (class_ino);
+}
+
const char *
xdp_fuse_get_mountpoint (void)
{