Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168317932
D54436.id168803.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
661 B
Referenced Files
None
Subscribers
None
D54436.id168803.diff
View Options
Index: sys/dev/asmc/asmc.c
===================================================================
--- sys/dev/asmc/asmc.c
+++ sys/dev/asmc/asmc.c
@@ -823,10 +823,17 @@
#ifdef DEBUG
void asmc_dumpall(device_t dev)
{
- int i;
+ int i, nkeys;
+ uint8_t buf[4];
- /* XXX magic number */
- for (i=0; i < 0x100; i++)
+ /* Read the actual number of keys from SMC */
+ if (asmc_key_read(dev, ASMC_NKEYS, buf, 4) != 0) {
+ device_printf(dev, "asmc_dumpall: failed to read key count\n");
+ return;
+ }
+ nkeys = ntohl(*(uint32_t*)buf);
+ device_printf(dev, "asmc_dumpall: dumping %d keys\n", nkeys);
+ for (i = 0; i < nkeys; i++)
asmc_key_dump(dev, i);
}
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 28, 2:42 PM (20 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37432669
Default Alt Text
D54436.id168803.diff (661 B)
Attached To
Mode
D54436: asmc: improve asmc_dumpall to read actual SMC key count
Attached
Detach File
Event Timeline
Log In to Comment