]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
[S390] cmm, smsgiucv_app: convert sender to uppercase
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Mon, 9 Aug 2010 16:12:56 +0000 (18:12 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Mon, 9 Aug 2010 16:12:54 +0000 (18:12 +0200)
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: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/cmm.c
drivers/s390/net/smsgiucv_app.c

index 4bddf8d3a150284a2724ee952caf33e92192cc69..a9550dca3e4b2fed74fc7472dbfd3da95d4526fc 100644 (file)
@@ -435,6 +435,13 @@ static int __init cmm_init(void)
        if (!cmm_sysctl_header)
                goto out_sysctl;
 #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);
        if (rc < 0)
                goto out_smsg;
index 137688790207248c5153d08ea880bcbec8d287a6..4d2ea4000422d7544c594cdc474f6d1c86d5557e 100644 (file)
@@ -180,6 +180,13 @@ static int __init smsgiucv_app_init(void)
                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 */
        rc = smsg_register_callback(SMSG_PREFIX, smsg_app_callback);
        if (rc) {