From owner-svn-src-all@freebsd.org Thu Sep 22 19:04:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C2ECBE5B0A; Thu, 22 Sep 2016 19:04:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C8968E2; Thu, 22 Sep 2016 19:04:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8MJ4psa048674; Thu, 22 Sep 2016 19:04:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8MJ4pXv048672; Thu, 22 Sep 2016 19:04:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201609221904.u8MJ4pXv048672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 22 Sep 2016 19:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306209 - in head/sys/amd64: amd64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 19:04:52 -0000 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);