diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2008-02-05 01:27:38 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:08 -0500 |
commit | 52debb06238b8076ec2667359668d4c5e38e8807 (patch) | |
tree | a0a4487f1078b3d641a751cb3a75451dd0bbf56a /drivers/pcmcia | |
parent | d6b4fa6d698f5cf331ead08db4ba5e60cd3c83be (diff) |
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 <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | 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 846468ce1144..5a85871f5ee9 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) | |||
865 | ds_dbg(1, "trying to load CIS file %s\n", filename); | 865 | ds_dbg(1, "trying to load CIS file %s\n", filename); |
866 | 866 | ||
867 | if (strlen(filename) > 14) { | 867 | if (strlen(filename) > 14) { |
868 | printk(KERN_WARNING "pcmcia: CIS filename is too long\n"); | 868 | printk(KERN_WARNING "pcmcia: CIS filename is too long [%s]\n", |
869 | filename); | ||
869 | return -EINVAL; | 870 | return -EINVAL; |
870 | } | 871 | } |
871 | 872 | ||
872 | snprintf(path, 20, "%s", filename); | 873 | snprintf(path, sizeof(path), "%s", filename); |
873 | 874 | ||
874 | if (request_firmware(&fw, path, &dev->dev) == 0) { | 875 | if (request_firmware(&fw, path, &dev->dev) == 0) { |
875 | if (fw->size >= CISTPL_MAX_CIS_SIZE) { | 876 | if (fw->size >= CISTPL_MAX_CIS_SIZE) { |