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