Commit 41b42876 authored by Hendrik Brueckner's avatar Hendrik Brueckner Committed by Martin Schwidefsky

[S390] cmm, smsgiucv_app: convert sender to uppercase

The sender kernel parameter contains a z/VM user ID where
alphabetic characters must be specified in uppercase.

Allow users to specify lowercase characters and convert the
sender string to uppercase at module initialization.
Signed-off-by: default avatarHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 2e85ba51
...@@ -435,6 +435,13 @@ static int __init cmm_init(void) ...@@ -435,6 +435,13 @@ static int __init cmm_init(void)
if (!cmm_sysctl_header) if (!cmm_sysctl_header)
goto out_sysctl; goto out_sysctl;
#ifdef CONFIG_CMM_IUCV #ifdef CONFIG_CMM_IUCV
/* convert sender to uppercase characters */
if (sender) {
int len = strlen(sender);
while (len--)
sender[len] = toupper(sender[len]);
}
rc = smsg_register_callback(SMSG_PREFIX, cmm_smsg_target); rc = smsg_register_callback(SMSG_PREFIX, cmm_smsg_target);
if (rc < 0) if (rc < 0)
goto out_smsg; goto out_smsg;
......
...@@ -180,6 +180,13 @@ static int __init smsgiucv_app_init(void) ...@@ -180,6 +180,13 @@ static int __init smsgiucv_app_init(void)
goto fail_put_driver; goto fail_put_driver;
} }
/* convert sender to uppercase characters */
if (sender) {
int len = strlen(sender);
while (len--)
sender[len] = toupper(sender[len]);
}
/* register with the smsgiucv device driver */ /* register with the smsgiucv device driver */
rc = smsg_register_callback(SMSG_PREFIX, smsg_app_callback); rc = smsg_register_callback(SMSG_PREFIX, smsg_app_callback);
if (rc) { if (rc) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment