diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2021-05-14 01:03:53 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2021-05-14 01:03:53 +0000 |
commit | b7f142ea8dca7e2750bc1bf2bbdc0e8c69037b0e (patch) | |
tree | 3e5075efec3f16265f9fe0bdf93d9bb0cdce7107 | |
parent | 89b8ccbd8166124774af13bfbb87f1a11c8a5715 (diff) | |
parent | 48ea17ee4b4cc770738c7b667c2f545d375dc383 (diff) | |
download | libfuse-android-cts-12.0_r1.tar.gz |
Snap for 7360053 from 48ea17ee4b4cc770738c7b667c2f545d375dc383 to sc-releaseandroid-vts-12.0_r9android-vts-12.0_r8android-vts-12.0_r7android-vts-12.0_r6android-vts-12.0_r5android-vts-12.0_r4android-vts-12.0_r3android-vts-12.0_r2android-vts-12.0_r12android-vts-12.0_r11android-vts-12.0_r10android-vts-12.0_r1android-security-12.0.0_r60android-security-12.0.0_r59android-security-12.0.0_r58android-security-12.0.0_r57android-security-12.0.0_r56android-security-12.0.0_r55android-security-12.0.0_r54android-security-12.0.0_r53android-security-12.0.0_r52android-security-12.0.0_r51android-security-12.0.0_r50android-security-12.0.0_r49android-security-12.0.0_r48android-security-12.0.0_r47android-security-12.0.0_r46android-security-12.0.0_r45android-security-12.0.0_r44android-security-12.0.0_r43android-security-12.0.0_r42android-security-12.0.0_r41android-security-12.0.0_r40android-security-12.0.0_r39android-security-12.0.0_r38android-security-12.0.0_r37android-security-12.0.0_r36android-security-12.0.0_r35android-security-12.0.0_r34android-platform-12.0.0_r9android-platform-12.0.0_r8android-platform-12.0.0_r7android-platform-12.0.0_r6android-platform-12.0.0_r5android-platform-12.0.0_r4android-platform-12.0.0_r32android-platform-12.0.0_r31android-platform-12.0.0_r30android-platform-12.0.0_r3android-platform-12.0.0_r29android-platform-12.0.0_r28android-platform-12.0.0_r27android-platform-12.0.0_r26android-platform-12.0.0_r25android-platform-12.0.0_r24android-platform-12.0.0_r23android-platform-12.0.0_r22android-platform-12.0.0_r21android-platform-12.0.0_r20android-platform-12.0.0_r2android-platform-12.0.0_r19android-platform-12.0.0_r18android-platform-12.0.0_r17android-platform-12.0.0_r16android-platform-12.0.0_r15android-platform-12.0.0_r14android-platform-12.0.0_r13android-platform-12.0.0_r12android-platform-12.0.0_r11android-platform-12.0.0_r10android-platform-12.0.0_r1android-cts-12.0_r9android-cts-12.0_r8android-cts-12.0_r7android-cts-12.0_r6android-cts-12.0_r5android-cts-12.0_r4android-cts-12.0_r3android-cts-12.0_r2android-cts-12.0_r12android-cts-12.0_r11android-cts-12.0_r10android-cts-12.0_r1android-12.0.0_r9android-12.0.0_r8android-12.0.0_r34android-12.0.0_r33android-12.0.0_r31android-12.0.0_r30android-12.0.0_r3android-12.0.0_r25android-12.0.0_r2android-12.0.0_r11android-12.0.0_r10android-12.0.0_r1android12-tests-releaseandroid12-security-releaseandroid12-s5-releaseandroid12-s4-releaseandroid12-s3-releaseandroid12-s2-releaseandroid12-s1-releaseandroid12-releaseandroid12-platform-release
Change-Id: Ic6827bd755db4b8efc45a5f4369c9cae02cec2af
-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; |