1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Fix order of functions in smbios.c (corrects r277949), since this corrects

a build error I committed this directly, sorry.
This commit is contained in:
Michael Gmelin 2015-01-31 00:06:05 +00:00
parent 803deb9a21
commit be0acc1ced
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277957

View File

@ -323,6 +323,29 @@ smbios_parse_table(const caddr_t addr)
return (cp + 2);
}
static caddr_t
smbios_find_struct(int type)
{
caddr_t dmi;
int i;
if (smbios.addr == NULL)
return (NULL);
for (dmi = smbios.addr, i = 0;
dmi < smbios.addr + smbios.length && i < smbios.count; i++) {
if (SMBIOS_GET8(dmi, 0) == type)
return dmi;
/* Find structure terminator. */
dmi = SMBIOS_GETSTR(dmi);
while (SMBIOS_GET16(dmi, 0) != 0)
dmi++;
dmi += 2;
}
return (NULL);
}
static void
smbios_probe(void)
{
@ -368,29 +391,6 @@ smbios_probe(void)
}
}
static caddr_t
smbios_find_struct(int type)
{
caddr_t dmi;
int i;
if (smbios.addr == NULL)
return (NULL);
for (dmi = smbios.addr, i = 0;
dmi < smbios.addr + smbios.length && i < smbios.count; i++) {
if (SMBIOS_GET8(dmi, 0) == type)
return dmi;
/* Find structure terminator. */
dmi = SMBIOS_GETSTR(dmi);
while (SMBIOS_GET16(dmi, 0) != 0)
dmi++;
dmi += 2;
}
return (NULL);
}
void
smbios_detect(void)
{