aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod/file2alias.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r--scripts/mod/file2alias.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 6dedc31a4925..e17a29ae2e97 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -37,6 +37,9 @@ typedef unsigned char __u8;
37typedef struct { 37typedef struct {
38 __u8 b[16]; 38 __u8 b[16];
39} uuid_le; 39} uuid_le;
40typedef struct {
41 __u8 b[16];
42} uuid_t;
40#define UUID_STRING_LEN 36 43#define UUID_STRING_LEN 36
41 44
42/* Big exception to the "don't include kernel headers into userspace, which 45/* Big exception to the "don't include kernel headers into userspace, which
@@ -1291,6 +1294,21 @@ static int do_typec_entry(const char *filename, void *symval, char *alias)
1291 return 1; 1294 return 1;
1292} 1295}
1293 1296
1297/* Looks like: tee:uuid */
1298static int do_tee_entry(const char *filename, void *symval, char *alias)
1299{
1300 DEF_FIELD(symval, tee_client_device_id, uuid);
1301
1302 sprintf(alias, "tee:%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
1303 uuid.b[0], uuid.b[1], uuid.b[2], uuid.b[3], uuid.b[4],
1304 uuid.b[5], uuid.b[6], uuid.b[7], uuid.b[8], uuid.b[9],
1305 uuid.b[10], uuid.b[11], uuid.b[12], uuid.b[13], uuid.b[14],
1306 uuid.b[15]);
1307
1308 add_wildcard(alias);
1309 return 1;
1310}
1311
1294/* Looks like: wmi:guid */ 1312/* Looks like: wmi:guid */
1295static int do_wmi_entry(const char *filename, void *symval, char *alias) 1313static int do_wmi_entry(const char *filename, void *symval, char *alias)
1296{ 1314{
@@ -1382,6 +1400,7 @@ static const struct devtable devtable[] = {
1382 {"fslmc", SIZE_fsl_mc_device_id, do_fsl_mc_entry}, 1400 {"fslmc", SIZE_fsl_mc_device_id, do_fsl_mc_entry},
1383 {"tbsvc", SIZE_tb_service_id, do_tbsvc_entry}, 1401 {"tbsvc", SIZE_tb_service_id, do_tbsvc_entry},
1384 {"typec", SIZE_typec_device_id, do_typec_entry}, 1402 {"typec", SIZE_typec_device_id, do_typec_entry},
1403 {"tee", SIZE_tee_client_device_id, do_tee_entry},
1385 {"wmi", SIZE_wmi_device_id, do_wmi_entry}, 1404 {"wmi", SIZE_wmi_device_id, do_wmi_entry},
1386}; 1405};
1387 1406