diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2021-05-19 01:03:47 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2021-05-19 01:03:47 +0000 |
commit | fa1706178080329b8a02fd74ca73a378fddcafec (patch) | |
tree | 3e5075efec3f16265f9fe0bdf93d9bb0cdce7107 | |
parent | 12b866e41c09670270e4c748f973c8ae8ac741ae (diff) | |
parent | d019ac07a8e8fed36cfc433576e35a953056c628 (diff) | |
download | libfuse-android12L-d2-s4-release.tar.gz |
Snap for 7374840 from d019ac07a8e8fed36cfc433576e35a953056c628 to sc-d2-releaseandroid-12.1.0_r26android-12.1.0_r25android-12.1.0_r24android-12.1.0_r23android-12.1.0_r18android-12.1.0_r17android-12.1.0_r16android-12.1.0_r15android-12.1.0_r14android-12.1.0_r13android-12.1.0_r12android12L-d2-s8-releaseandroid12L-d2-s7-releaseandroid12L-d2-s6-releaseandroid12L-d2-s5-releaseandroid12L-d2-s4-releaseandroid12L-d2-s3-releaseandroid12L-d2-s2-releaseandroid12L-d2-s1-releaseandroid12L-d2-release
Change-Id: Idc90af5a259d6cb3d3a3e875292eef83bcaf60e3
-rw-r--r-- | OWNERS | 1 | ||||
-rw-r--r-- | include/fuse_kernel.h | 1 | ||||
-rw-r--r-- | lib/fuse_lowlevel.c | 10 |
3 files changed, 11 insertions, 1 deletions
@@ -0,0 +1 @@ +balsini@google.com diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h index 55d8e2c..bd8794e 100644 --- a/include/fuse_kernel.h +++ b/include/fuse_kernel.h @@ -836,6 +836,7 @@ struct fuse_notify_retrieve_in { #define FUSE_DEV_IOC_CLONE _IOR(229, 0, uint32_t) #define FUSE_DEV_IOC_PASSTHROUGH_OPEN_V0 _IOW(229, 1, struct fuse_passthrough_out_v0) #define FUSE_DEV_IOC_PASSTHROUGH_OPEN_V1 _IOW(229, 127, struct fuse_passthrough_out_v0) +#define FUSE_DEV_IOC_PASSTHROUGH_OPEN_V2 _IOW(229, 126, uint32_t) struct fuse_lseek_in { uint64_t fh; diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index baa6d2b..a4a4df0 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -463,6 +463,7 @@ enum { FUSE_PASSTHROUGH_API_UNAVAILABLE, FUSE_PASSTHROUGH_API_V0, FUSE_PASSTHROUGH_API_V1, + FUSE_PASSTHROUGH_API_V2, FUSE_PASSTHROUGH_API_STABLE, }; @@ -490,7 +491,14 @@ int fuse_passthrough_enable(fuse_req_t req, unsigned int fd) { switch (passthrough_version) { case FUSE_PASSTHROUGH_API_STABLE: /* There is not a stable API yet */ - passthrough_version = FUSE_PASSTHROUGH_API_V1; + passthrough_version = FUSE_PASSTHROUGH_API_V2; + case FUSE_PASSTHROUGH_API_V2: { + ret = ioctl(req->se->fd, FUSE_DEV_IOC_PASSTHROUGH_OPEN_V2, &fd); + if (ret == -1 && errno == ENOTTY) + passthrough_version = FUSE_PASSTHROUGH_API_V1; + else + break; + } case FUSE_PASSTHROUGH_API_V1: { struct fuse_passthrough_out_v0 out = {}; out.fd = fd; |