Print this page
2976 remove useless offsetof() macros


   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 


  26 #include <sys/types.h>
  27 #include <sys/mdb_modapi.h>
  28 
  29 #include <sys/nsctl/nsctl.h>
  30 #include <sys/unistat/spcs_s.h>
  31 #include <sys/unistat/spcs_s_k.h>
  32 
  33 
  34 #include <sys/nsctl/dsw.h>
  35 #include <sys/nsctl/dsw_dev.h>
  36 
  37 #include <sys/nsctl/nsvers.h>
  38 
  39 #define offsetof(s, m)  ((size_t)(&((s *)0)->m))
  40 
  41 
  42 const mdb_bitmask_t bi_flags_bits[] = {
  43         { "DSW_GOLDEN", DSW_GOLDEN, DSW_GOLDEN },
  44         { "DSW_COPYINGP", DSW_COPYINGP, DSW_COPYINGP },
  45         { "DSW_COPYINGM", DSW_COPYINGM, DSW_COPYINGM },
  46         { "DSW_COPYINGS", DSW_COPYINGS, DSW_COPYINGS },
  47         { "DSW_COPYINGX", DSW_COPYINGX, DSW_COPYINGX },
  48         { "DSW_BMPOFFLINE", DSW_BMPOFFLINE, DSW_BMPOFFLINE },
  49         { "DSW_SHDOFFLINE", DSW_SHDOFFLINE, DSW_SHDOFFLINE },
  50         { "DSW_MSTOFFLINE", DSW_MSTOFFLINE, DSW_MSTOFFLINE },
  51         { "DSW_OVROFFLINE", DSW_OVROFFLINE, DSW_OVROFFLINE },
  52         { "DSW_TREEMAP", DSW_TREEMAP, DSW_TREEMAP },
  53         { "DSW_OVERFLOW", DSW_OVERFLOW, DSW_OVERFLOW },
  54         { "DSW_SHDEXPORT", DSW_SHDEXPORT, DSW_SHDEXPORT },
  55         { "DSW_SHDIMPORT", DSW_SHDIMPORT, DSW_SHDIMPORT },
  56         { "DSW_VOVERFLOW", DSW_VOVERFLOW, DSW_VOVERFLOW },
  57         { "DSW_HANGING", DSW_HANGING, DSW_HANGING },
  58         { "DSW_CFGOFFLINE", DSW_CFGOFFLINE, DSW_CFGOFFLINE },
  59         { "DSW_OVRHDRDRTY", DSW_OVRHDRDRTY, DSW_OVRHDRDRTY },
  60         { "DSW_RESIZED", DSW_RESIZED, DSW_RESIZED },




   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 #include <stddef.h>
  27 
  28 #include <sys/types.h>
  29 #include <sys/mdb_modapi.h>
  30 
  31 #include <sys/nsctl/nsctl.h>
  32 #include <sys/unistat/spcs_s.h>
  33 #include <sys/unistat/spcs_s_k.h>
  34 
  35 
  36 #include <sys/nsctl/dsw.h>
  37 #include <sys/nsctl/dsw_dev.h>
  38 
  39 #include <sys/nsctl/nsvers.h>
  40 


  41 
  42 const mdb_bitmask_t bi_flags_bits[] = {
  43         { "DSW_GOLDEN", DSW_GOLDEN, DSW_GOLDEN },
  44         { "DSW_COPYINGP", DSW_COPYINGP, DSW_COPYINGP },
  45         { "DSW_COPYINGM", DSW_COPYINGM, DSW_COPYINGM },
  46         { "DSW_COPYINGS", DSW_COPYINGS, DSW_COPYINGS },
  47         { "DSW_COPYINGX", DSW_COPYINGX, DSW_COPYINGX },
  48         { "DSW_BMPOFFLINE", DSW_BMPOFFLINE, DSW_BMPOFFLINE },
  49         { "DSW_SHDOFFLINE", DSW_SHDOFFLINE, DSW_SHDOFFLINE },
  50         { "DSW_MSTOFFLINE", DSW_MSTOFFLINE, DSW_MSTOFFLINE },
  51         { "DSW_OVROFFLINE", DSW_OVROFFLINE, DSW_OVROFFLINE },
  52         { "DSW_TREEMAP", DSW_TREEMAP, DSW_TREEMAP },
  53         { "DSW_OVERFLOW", DSW_OVERFLOW, DSW_OVERFLOW },
  54         { "DSW_SHDEXPORT", DSW_SHDEXPORT, DSW_SHDEXPORT },
  55         { "DSW_SHDIMPORT", DSW_SHDIMPORT, DSW_SHDIMPORT },
  56         { "DSW_VOVERFLOW", DSW_VOVERFLOW, DSW_VOVERFLOW },
  57         { "DSW_HANGING", DSW_HANGING, DSW_HANGING },
  58         { "DSW_CFGOFFLINE", DSW_CFGOFFLINE, DSW_CFGOFFLINE },
  59         { "DSW_OVRHDRDRTY", DSW_OVRHDRDRTY, DSW_OVRHDRDRTY },
  60         { "DSW_RESIZED", DSW_RESIZED, DSW_RESIZED },