4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   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 /*
  23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 #ifndef _CFGA_SATA_H
  28 #define _CFGA_SATA_H
  29 
  30 #pragma ident   "%Z%%M% %I%     %E% SMI"
  31 
  32 #ifdef __cplusplus
  33 extern "C" {
  34 #endif
  35 
  36 #include <stdlib.h>
  37 #include <strings.h>
  38 #include <fcntl.h>
  39 #include <ctype.h>
  40 #include <unistd.h>
  41 #include <libintl.h>
  42 #include <libdevice.h>
  43 #include <sys/varargs.h>
  44 
  45 #include <sys/sata/sata_cfgadm.h>
  46 
  47 #include <libdevinfo.h>
  48 #include <libdevice.h>
  49 #include <librcm.h>
  50 #include <synch.h>
  51 #include <thread.h>
  52 #include <assert.h>
  53 
  54 #define CFGA_PLUGIN_LIB
  55 #include <config_admin.h>
  56 
  57 /*
  58  * Debug stuff
  59  */
  60 #ifdef  DEBUG
  61 #define DPRINTF printf
  62 #else
  63 #define DPRINTF 0 &&
  64 #endif /* DEBUG */
  65 
  66 typedef enum {
  67         CFGA_SATA_TERMINATE = 0,
  68         CFGA_SATA_CONTINUE
  69 } sata_cfga_recur_t;
  70 
  71 /* for walking links */
  72 typedef struct walk_link {
  73         char *path;
  74         char len;
  75         char **linkpp;
  76 } walk_link_t;
  77 
  78 #define MATCH_MINOR_NAME        1
  79 
  80 /* Misc text strings */
  81 #define CFGA_DEV_DIR                    "/dev/cfg"
 
 | 
 
 
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   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 /*
  23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24  * Copyright 2017 Nexenta Systems, Inc. All rights reserved.
  25  * Use is subject to license terms.
  26  */
  27 
  28 #ifndef _CFGA_SATA_H
  29 #define _CFGA_SATA_H
  30 
  31 #pragma ident   "%Z%%M% %I%     %E% SMI"
  32 
  33 #ifdef __cplusplus
  34 extern "C" {
  35 #endif
  36 
  37 #include <stdlib.h>
  38 #include <strings.h>
  39 #include <fcntl.h>
  40 #include <ctype.h>
  41 #include <unistd.h>
  42 #include <libintl.h>
  43 #include <libdevice.h>
  44 #include <sys/varargs.h>
  45 
  46 #include <sys/sata/sata_cfgadm.h>
  47 
  48 #include <libdevinfo.h>
  49 #include <libdevice.h>
  50 #include <librcm.h>
  51 #include <synch.h>
  52 #include <thread.h>
  53 #include <assert.h>
  54 
  55 #define CFGA_PLUGIN_LIB
  56 #include <config_admin.h>
  57 
  58 /*
  59  * Debug stuff
  60  */
  61 #ifdef  DEBUG
  62 #define DPRINTF (void) printf
  63 #else
  64 #define DPRINTF 0 &&
  65 #endif /* DEBUG */
  66 
  67 typedef enum {
  68         CFGA_SATA_TERMINATE = 0,
  69         CFGA_SATA_CONTINUE
  70 } sata_cfga_recur_t;
  71 
  72 /* for walking links */
  73 typedef struct walk_link {
  74         char *path;
  75         char len;
  76         char **linkpp;
  77 } walk_link_t;
  78 
  79 #define MATCH_MINOR_NAME        1
  80 
  81 /* Misc text strings */
  82 #define CFGA_DEV_DIR                    "/dev/cfg"
 
 |