From owner-svn-src-head@freebsd.org Tue Jun 5 22:13:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 253DEFF978C; Tue, 5 Jun 2018 22:13:48 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B46C177BF8; Tue, 5 Jun 2018 22:13:47 +0000 (UTC) (envelope-from ian@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8FF6522545; Tue, 5 Jun 2018 22:13:47 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w55MDlgo048519; Tue, 5 Jun 2018 22:13:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w55MDkN4048513; Tue, 5 Jun 2018 22:13:46 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201806052213.w55MDkN4048513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 5 Jun 2018 22:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334695 - in head/stand: common i386/libi386 uboot/lib userboot/userboot zfs X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/stand: common i386/libi386 uboot/lib userboot/userboot zfs X-SVN-Commit-Revision: 334695 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2018 22:13:48 -0000 Author: ian Date: Tue Jun 5 22:13:45 2018 New Revision: 334695 URL: https://svnweb.freebsd.org/changeset/base/334695 Log: Remove comments and assertions that are no longer valid after r330809. r330809 replaced duplication of devdesc struct fields with an embedded copy of the devdesc struct, to avoid fragility. That means all the scattered comments indicating that structs must match are no longer valid. Likewise asserts that attempted to mitigate some of the old fragility. Reviewed by: imp@ Modified: head/stand/common/disk.h head/stand/i386/libi386/biosdisk.c head/stand/i386/libi386/libi386.h head/stand/uboot/lib/libuboot.h head/stand/userboot/userboot/main.c head/stand/zfs/libzfs.h Modified: head/stand/common/disk.h ============================================================================== --- head/stand/common/disk.h Tue Jun 5 21:55:40 2018 (r334694) +++ head/stand/common/disk.h Tue Jun 5 22:13:45 2018 (r334695) @@ -81,9 +81,8 @@ #ifndef _DISK_H #define _DISK_H -/* Note: Must match the 'struct devdesc' in stand.h */ struct disk_devdesc { - struct devdesc dd; + struct devdesc dd; /* Must be first. */ int d_slice; int d_partition; uint64_t d_offset; Modified: head/stand/i386/libi386/biosdisk.c ============================================================================== --- head/stand/i386/libi386/biosdisk.c Tue Jun 5 21:55:40 2018 (r334694) +++ head/stand/i386/libi386/biosdisk.c Tue Jun 5 22:13:45 2018 (r334695) @@ -78,8 +78,6 @@ struct ptable { #include "geliboot.c" #endif /* LOADER_GELI_SUPPORT */ -CTASSERT(sizeof(struct i386_devdesc) >= sizeof(struct disk_devdesc)); - #define BIOS_NUMDRIVES 0x475 #define BIOSDISK_SECSIZE 512 #define BUFSIZE (1 * BIOSDISK_SECSIZE) Modified: head/stand/i386/libi386/libi386.h ============================================================================== --- head/stand/i386/libi386/libi386.h Tue Jun 5 21:55:40 2018 (r334694) +++ head/stand/i386/libi386/libi386.h Tue Jun 5 22:13:45 2018 (r334695) @@ -29,11 +29,9 @@ /* * i386 fully-qualified device descriptor. - * Note, this must match struct zfs_devdesc for zfs support. */ -/* Note: Must match the 'struct devdesc' in stand.h */ struct i386_devdesc { - struct devdesc dd; + struct devdesc dd; /* Must be first. */ union { struct Modified: head/stand/uboot/lib/libuboot.h ============================================================================== --- head/stand/uboot/lib/libuboot.h Tue Jun 5 21:55:40 2018 (r334694) +++ head/stand/uboot/lib/libuboot.h Tue Jun 5 22:13:45 2018 (r334695) @@ -27,9 +27,8 @@ * $FreeBSD$ */ -/* Note: Must match the 'struct devdesc' in stand.h */ struct uboot_devdesc { - struct devdesc dd; + struct devdesc dd; /* Must be first. */ union { struct { int slice; Modified: head/stand/userboot/userboot/main.c ============================================================================== --- head/stand/userboot/userboot/main.c Tue Jun 5 21:55:40 2018 (r334694) +++ head/stand/userboot/userboot/main.c Tue Jun 5 22:13:45 2018 (r334695) @@ -159,7 +159,6 @@ extract_currdev(void) #if defined(USERBOOT_ZFS_SUPPORT) struct zfs_devdesc zdev; - CTASSERT(sizeof(struct disk_devdesc) >= sizeof(struct zfs_devdesc)); if (userboot_zfs_found) { /* Leave the pool/root guid's unassigned */ Modified: head/stand/zfs/libzfs.h ============================================================================== --- head/stand/zfs/libzfs.h Tue Jun 5 21:55:40 2018 (r334694) +++ head/stand/zfs/libzfs.h Tue Jun 5 22:13:45 2018 (r334695) @@ -33,12 +33,9 @@ /* * ZFS fully-qualified device descriptor. - * Arch-specific device descriptors should be binary compatible with this - * structure if they are to support ZFS. */ -/* Note: Must match the 'struct devdesc' in stand.h */ struct zfs_devdesc { - struct devdesc dd; + struct devdesc dd; /* Must be first. */ uint64_t pool_guid; uint64_t root_guid; };