From 7bca6ad19e54e2edc4ec9cfa10da20a26e294334 Mon Sep 17 00:00:00 2001 From: Pwn20wnd Date: Sat, 9 Mar 2019 23:30:26 +0300 Subject: Merge pwn's changes to support arm64e via rebase --- kernel_call/platform_match.h | 62 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100755 kernel_call/platform_match.h (limited to 'kernel_call/platform_match.h') diff --git a/kernel_call/platform_match.h b/kernel_call/platform_match.h new file mode 100755 index 0000000..18479a8 --- /dev/null +++ b/kernel_call/platform_match.h @@ -0,0 +1,62 @@ +/* + * platform_match.h + * Brandon Azad + */ +#ifndef VOUCHER_SWAP__PLATFORM_MATCH_H_ +#define VOUCHER_SWAP__PLATFORM_MATCH_H_ + +#include + +/* + * platform_matches_device + * + * Description: + * Check whether the current platform matches the specified device or range of devices. + * + * Match format: + * The match string may either specify a single device glob or a range of device globs. For + * example: + * + * "iPhone11,8" Matches only iPhone11,8 + * "iPhone11,*" Matches all iPhone11 devices, including e.g. iPhone11,4. + * "iPhone*,*" Matches all iPhone devices. + * "iPhone11,4-iPhone11,8" Matches all iPhone devices between 11,4 and 11,8, inclusive. + * "iPhone10,*-11,*" Matches all iPhone10 and iPhone11 devices. + * + * As a special case, "*" matches all devices. + */ +bool platform_matches_device(const char *device_range); + +/* + * platform_matches_build + * + * Description: + * Check whether the current platform matches the specified build version or range of build + * versions. + * + * Match format: + * The match string may either specify a single build version or a range of build versions. + * For example: + * + * "16C50" Matches only build 16C50. + * "16B92-16C50" Matches all builds between 16B92 and 16C50, inclusive. + * + * As a special case, either build version may be replaced with "*" to indicate a lack of + * lower or upper bound: + * + * "*-16B92" Matches all builds up to and including 16B92. + * "16C50-*" Matches build 16C50 and later. + * "*" Matches all build versions. + */ +bool platform_matches_build(const char *build_range); + +/* + * platform_matches + * + * Description: + * A convenience function that combines platform_matches_device() and + * platform_matches_build(). + */ +bool platform_matches(const char *device_range, const char *build_range); + +#endif -- cgit v1.2.3