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;
 };
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to