mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 01:59:54 +00:00
f2fs_io: split definition check for crypto ioctl
commit 870915f282
category: bugfix
issue: #I6VAS0
CVE: NA
Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------
This patch fixes undefined FSCRYPT_POLICY_V1 in old distribution.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
This commit is contained in:
parent
be44193e03
commit
024521aefb
@ -91,7 +91,7 @@ typedef u32 __be32;
|
||||
#define F2FS_IOC_DECOMPRESS_FILE _IO(F2FS_IOCTL_MAGIC, 23)
|
||||
#define F2FS_IOC_COMPRESS_FILE _IO(F2FS_IOCTL_MAGIC, 24)
|
||||
|
||||
#ifndef FS_IOC_GET_ENCRYPTION_POLICY
|
||||
#ifndef FSCRYPT_POLICY_V1
|
||||
#define FSCRYPT_POLICY_V1 0
|
||||
#define FSCRYPT_KEY_DESCRIPTOR_SIZE 8
|
||||
struct fscrypt_policy_v1 {
|
||||
@ -101,10 +101,12 @@ struct fscrypt_policy_v1 {
|
||||
__u8 flags;
|
||||
__u8 master_key_descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE];
|
||||
};
|
||||
#endif
|
||||
#ifndef FS_IOC_GET_ENCRYPTION_POLICY
|
||||
#define FS_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct fscrypt_policy_v1)
|
||||
#endif
|
||||
|
||||
#ifndef FS_IOC_GET_ENCRYPTION_POLICY_EX
|
||||
#ifndef FSCRYPT_POLICY_V2
|
||||
#define FSCRYPT_POLICY_V2 2
|
||||
#define FSCRYPT_KEY_IDENTIFIER_SIZE 16
|
||||
struct fscrypt_policy_v2 {
|
||||
@ -124,6 +126,8 @@ struct fscrypt_get_policy_ex_arg {
|
||||
struct fscrypt_policy_v2 v2;
|
||||
} policy; /* output */
|
||||
};
|
||||
#endif
|
||||
#ifndef FS_IOC_GET_ENCRYPTION_POLICY_EX
|
||||
#define FS_IOC_GET_ENCRYPTION_POLICY_EX _IOWR('f', 22, __u8[9]) /* size + version */
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user