Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=52debb06238b8076ec2667359668d4c5e38e8807
Commit:     52debb06238b8076ec2667359668d4c5e38e8807
Parent:     d6b4fa6d698f5cf331ead08db4ba5e60cd3c83be
Author:     Randy Dunlap <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:27:38 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:08 2008 -0800

    pcmcia: include bad CIS filename in error message
    
    - Print the invalid CIS filename in the invalid filename message.
    - Use sizeof() instead of hard-coded constant for buffer size.
    
    Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/pcmcia/ds.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 846468c..5a85871 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -865,11 +865,12 @@ static int pcmcia_load_firmware(struct pcmcia_device 
*dev, char * filename)
        ds_dbg(1, "trying to load CIS file %s\n", filename);
 
        if (strlen(filename) > 14) {
-               printk(KERN_WARNING "pcmcia: CIS filename is too long\n");
+               printk(KERN_WARNING "pcmcia: CIS filename is too long [%s]\n",
+                       filename);
                return -EINVAL;
        }
 
-       snprintf(path, 20, "%s", filename);
+       snprintf(path, sizeof(path), "%s", filename);
 
        if (request_firmware(&fw, path, &dev->dev) == 0) {
                if (fw->size >= CISTPL_MAX_CIS_SIZE) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to