svn commit: r306209 - in head/sys/amd64: amd64 include
Warner Losh
imp at FreeBSD.org
Thu Sep 22 19:04:52 UTC 2016
Author: imp
Date: Thu Sep 22 19:04:51 2016
New Revision: 306209
URL: https://svnweb.freebsd.org/changeset/base/306209
Log:
Change the efi_get_table interface to a void ** so we can return the
pointer by dereferencing the pointer.
Reviewed by: kib@
MFC After: 2 weeks
Sponsored by: Netflix, Inc
Modified:
head/sys/amd64/amd64/efirt.c
head/sys/amd64/include/efi.h
Modified: head/sys/amd64/amd64/efirt.c
==============================================================================
--- head/sys/amd64/amd64/efirt.c Thu Sep 22 19:04:08 2016 (r306208)
+++ head/sys/amd64/amd64/efirt.c Thu Sep 22 19:04:51 2016 (r306209)
@@ -405,7 +405,7 @@ efi_uninit(void)
}
int
-efi_get_table(struct uuid *uuid, void *ptr)
+efi_get_table(struct uuid *uuid, void **ptr)
{
struct efi_cfgtbl *ct;
u_long count;
@@ -416,7 +416,7 @@ efi_get_table(struct uuid *uuid, void *p
ct = efi_cfgtbl;
while (count--) {
if (!bcmp(&ct->ct_uuid, uuid, sizeof(*uuid))) {
- ptr = (void *)PHYS_TO_DMAP(ct->ct_data);
+ *ptr = (void *)PHYS_TO_DMAP(ct->ct_data);
return (0);
}
ct++;
Modified: head/sys/amd64/include/efi.h
==============================================================================
--- head/sys/amd64/include/efi.h Thu Sep 22 19:04:08 2016 (r306208)
+++ head/sys/amd64/include/efi.h Thu Sep 22 19:04:51 2016 (r306209)
@@ -43,7 +43,7 @@
struct uuid;
struct efi_tm;
-int efi_get_table(struct uuid *uuid, void *ptr);
+int efi_get_table(struct uuid *uuid, void **ptr);
int efi_get_time(struct efi_tm *tm);
int efi_get_time_locked(struct efi_tm *tm);
int efi_reset_system(void);
More information about the svn-src-all
mailing list