main.c (332154) | main.c (334935) |
---|---|
1/*- 2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org> 3 * Copyright (c) 1998,2000 Doug Rabson <dfr@freebsd.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org> 3 * Copyright (c) 1998,2000 Doug Rabson <dfr@freebsd.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: stable/11/stand/userboot/userboot/main.c 332154 2018-04-06 21:37:25Z kevans $"); | 29__FBSDID("$FreeBSD: stable/11/stand/userboot/userboot/main.c 334935 2018-06-10 22:26:15Z ian $"); |
30 31#include <stand.h> 32#include <string.h> 33#include <setjmp.h> 34#include <sys/disk.h> 35 36#include "bootstrap.h" 37#include "disk.h" --- 116 unchanged lines hidden (view full) --- 154static void 155extract_currdev(void) 156{ 157 struct disk_devdesc dev; 158 159 //bzero(&dev, sizeof(dev)); 160 161#if defined(USERBOOT_ZFS_SUPPORT) | 30 31#include <stand.h> 32#include <string.h> 33#include <setjmp.h> 34#include <sys/disk.h> 35 36#include "bootstrap.h" 37#include "disk.h" --- 116 unchanged lines hidden (view full) --- 154static void 155extract_currdev(void) 156{ 157 struct disk_devdesc dev; 158 159 //bzero(&dev, sizeof(dev)); 160 161#if defined(USERBOOT_ZFS_SUPPORT) |
162 CTASSERT(sizeof(struct disk_devdesc) >= sizeof(struct zfs_devdesc)); | |
163 if (userboot_zfs_found) { 164 struct zfs_devdesc zdev; 165 166 /* Leave the pool/root guid's unassigned */ 167 bzero(&zdev, sizeof(zdev)); 168 zdev.dd.d_dev = &zfs_dev; 169 170 dev = *(struct disk_devdesc *)&zdev; --- 69 unchanged lines hidden --- | 162 if (userboot_zfs_found) { 163 struct zfs_devdesc zdev; 164 165 /* Leave the pool/root guid's unassigned */ 166 bzero(&zdev, sizeof(zdev)); 167 zdev.dd.d_dev = &zfs_dev; 168 169 dev = *(struct disk_devdesc *)&zdev; --- 69 unchanged lines hidden --- |