From owner-svn-src-stable-11@freebsd.org Tue Sep 12 06:19:21 2017 Return-Path: Delivered-To: svn-src-stable-11@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 34218E1B6AF; Tue, 12 Sep 2017 06:19:21 +0000 (UTC) (envelope-from rlibby@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 0C6396369D; Tue, 12 Sep 2017 06:19:20 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8C6JK8T056805; Tue, 12 Sep 2017 06:19:20 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8C6JJ51056802; Tue, 12 Sep 2017 06:19:19 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709120619.v8C6JJ51056802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Tue, 12 Sep 2017 06:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323484 - stable/11/sys/boot/efi/boot1 X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: stable/11/sys/boot/efi/boot1 X-SVN-Commit-Revision: 323484 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Sep 2017 06:19:21 -0000 Author: rlibby Date: Tue Sep 12 06:19:19 2017 New Revision: 323484 URL: https://svnweb.freebsd.org/changeset/base/323484 Log: MFC r303723 (by markj): Fix a few cosmetic issues in boot1.efi. Modified: stable/11/sys/boot/efi/boot1/boot1.c stable/11/sys/boot/efi/boot1/ufs_module.c stable/11/sys/boot/efi/boot1/zfs_module.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/efi/boot1/boot1.c ============================================================================== --- stable/11/sys/boot/efi/boot1/boot1.c Tue Sep 12 06:06:58 2017 (r323483) +++ stable/11/sys/boot/efi/boot1/boot1.c Tue Sep 12 06:19:19 2017 (r323484) @@ -43,7 +43,7 @@ static const boot_module_t *boot_modules[] = #endif }; -#define NUM_BOOT_MODULES (sizeof(boot_modules) / sizeof(boot_module_t*)) +#define NUM_BOOT_MODULES nitems(boot_modules) /* The initial number of handles used to query EFI for partitions. */ #define NUM_HANDLES_INIT 24 @@ -330,8 +330,6 @@ load_loader(const boot_module_t **modp, dev_info_t **d const boot_module_t *mod; for (i = 0; i < NUM_BOOT_MODULES; i++) { - if (boot_modules[i] == NULL) - continue; mod = boot_modules[i]; for (dev = mod->devices(); dev != NULL; dev = dev->next) { if (dev->preferred != preferred) @@ -354,7 +352,7 @@ load_loader(const boot_module_t **modp, dev_info_t **d * it simply boots, otherwise it returns the status of last EFI call. */ static EFI_STATUS -try_boot() +try_boot(void) { size_t bufsize, loadersize, cmdsize; void *buf, *loaderbuf; @@ -497,9 +495,6 @@ probe_handle(EFI_HANDLE h, EFI_DEVICE_PATH *imgpath, B /* Run through each module, see if it can load this partition */ for (i = 0; i < NUM_BOOT_MODULES; i++) { - if (boot_modules[i] == NULL) - continue; - if ((status = bs->AllocatePool(EfiLoaderData, sizeof(*devinfo), (void **)&devinfo)) != EFI_SUCCESS) { @@ -604,9 +599,6 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) printf(" Loader path: %s\n\n", PATH_LOADER_EFI); printf(" Initializing modules:"); for (i = 0; i < NUM_BOOT_MODULES; i++) { - if (boot_modules[i] == NULL) - continue; - printf(" %s", boot_modules[i]->name); if (boot_modules[i]->init != NULL) boot_modules[i]->init(); @@ -666,10 +658,8 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) /* Status summary. */ for (i = 0; i < NUM_BOOT_MODULES; i++) { - if (boot_modules[i] != NULL) { - printf(" "); - boot_modules[i]->status(); - } + printf(" "); + boot_modules[i]->status(); } try_boot(); Modified: stable/11/sys/boot/efi/boot1/ufs_module.c ============================================================================== --- stable/11/sys/boot/efi/boot1/ufs_module.c Tue Sep 12 06:06:58 2017 (r323483) +++ stable/11/sys/boot/efi/boot1/ufs_module.c Tue Sep 12 06:19:19 2017 (r323484) @@ -142,7 +142,7 @@ load(const char *filepath, dev_info_t *dev, void **buf } static void -status() +status(void) { int i; dev_info_t *dev; @@ -164,7 +164,7 @@ status() } static dev_info_t * -_devices() +_devices(void) { return (devices); Modified: stable/11/sys/boot/efi/boot1/zfs_module.c ============================================================================== --- stable/11/sys/boot/efi/boot1/zfs_module.c Tue Sep 12 06:06:58 2017 (r323483) +++ stable/11/sys/boot/efi/boot1/zfs_module.c Tue Sep 12 06:19:19 2017 (r323484) @@ -192,7 +192,7 @@ load(const char *filepath, dev_info_t *devinfo, void * } static void -status() +status(void) { spa_t *spa; @@ -210,14 +210,14 @@ status() } static void -init() +init(void) { zfs_init(); } static dev_info_t * -_devices() +_devices(void) { return (devices);