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.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index bc25898f6df0..2b9395501d81 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -1305,6 +1305,31 @@ static int do_fsl_mc_entry(const char *filename, void *symval,
1305} 1305}
1306ADD_TO_DEVTABLE("fslmc", fsl_mc_device_id, do_fsl_mc_entry); 1306ADD_TO_DEVTABLE("fslmc", fsl_mc_device_id, do_fsl_mc_entry);
1307 1307
1308/* Looks like: tbsvc:kSpNvNrN */
1309static int do_tbsvc_entry(const char *filename, void *symval, char *alias)
1310{
1311 DEF_FIELD(symval, tb_service_id, match_flags);
1312 DEF_FIELD_ADDR(symval, tb_service_id, protocol_key);
1313 DEF_FIELD(symval, tb_service_id, protocol_id);
1314 DEF_FIELD(symval, tb_service_id, protocol_version);
1315 DEF_FIELD(symval, tb_service_id, protocol_revision);
1316
1317 strcpy(alias, "tbsvc:");
1318 if (match_flags & TBSVC_MATCH_PROTOCOL_KEY)
1319 sprintf(alias + strlen(alias), "k%s", *protocol_key);
1320 else
1321 strcat(alias + strlen(alias), "k*");
1322 ADD(alias, "p", match_flags & TBSVC_MATCH_PROTOCOL_ID, protocol_id);
1323 ADD(alias, "v", match_flags & TBSVC_MATCH_PROTOCOL_VERSION,
1324 protocol_version);
1325 ADD(alias, "r", match_flags & TBSVC_MATCH_PROTOCOL_REVISION,
1326 protocol_revision);
1327
1328 add_wildcard(alias);
1329 return 1;
1330}
1331ADD_TO_DEVTABLE("tbsvc", tb_service_id, do_tbsvc_entry);
1332
1308/* Does namelen bytes of name exactly match the symbol? */ 1333/* Does namelen bytes of name exactly match the symbol? */
1309static bool sym_is(const char *name, unsigned namelen, const char *symbol) 1334static bool sym_is(const char *name, unsigned namelen, const char *symbol)
1310{ 1335{