mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
When printing out V1 info, make sure that there is additional info
before printing it. Terminate when we come to a 0xff byte. This allows there to be zero or more additional info fields printed correctly. Before, the old code would print bogons or dump core when presented with this case. I don't know what the spec says about this, exactly, but this allows me to do a dumpcis of my non-ATA AMP 4M FLASH cards w/o pccardc dumping core.
This commit is contained in:
parent
ef76b8c057
commit
f229c04eef
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=44701
1 changed files with 8 additions and 2 deletions
|
@ -26,7 +26,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id: printcis.c,v 1.8 1997/10/06 11:35:55 charnier Exp $";
|
||||
"$Id: printcis.c,v 1.9 1997/11/18 21:08:07 nate Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -620,9 +620,15 @@ dump_info_v1(unsigned char *p, int len)
|
|||
while (*p++);
|
||||
printf("card vers = [%s]\n", p);
|
||||
while (*p++);
|
||||
if (*p == 0xff)
|
||||
return;
|
||||
printf("\tAddit. info = [%s]", p);
|
||||
while (*p++);
|
||||
printf(",[%s]\n", p);
|
||||
while (*p != 0xff) {
|
||||
printf(",[%s]", p);
|
||||
while (*p++);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue