Home | History | Annotate | Download | only in md_monitord
      1 /*
      2  * CDDL HEADER START
      3  *
      4  * The contents of this file are subject to the terms of the
      5  * Common Development and Distribution License, Version 1.0 only
      6  * (the "License").  You may not use this file except in compliance
      7  * with the License.
      8  *
      9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
     10  * or http://www.opensolaris.org/os/licensing.
     11  * See the License for the specific language governing permissions
     12  * and limitations under the License.
     13  *
     14  * When distributing Covered Code, include this CDDL HEADER in each
     15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     16  * If applicable, add the following below this CDDL HEADER, with the
     17  * fields enclosed by brackets "[]" replaced with your own identifying
     18  * information: Portions Copyright [yyyy] [name of copyright owner]
     19  *
     20  * CDDL HEADER END
     21  */
     22 /*
     23  * Copyright 1999-2002 Sun Microsystems, Inc.  All rights reserved.
     24  * Use is subject to license terms.
     25  */
     26 
     27 #ifndef _MD_MONITORD_H
     28 #define	_MD_MONITORD_H
     29 
     30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
     31 
     32 #ifdef __cplusplus
     33 extern "C" {
     34 #endif
     35 
     36 #define	_REENTRANT
     37 #include <stdarg.h>
     38 #include <stdio.h>
     39 #include <errno.h>
     40 #include <time.h>
     41 #include <fcntl.h>
     42 #include <limits.h>
     43 #include <locale.h>
     44 #include <signal.h>
     45 #include <strings.h>
     46 #include <syslog.h>
     47 #include <thread.h>
     48 #include <unistd.h>
     49 	/* #include <sys/types.h> */
     50 #include <sys/stat.h>
     51 	/* #include <sys/fcntl.h> */
     52 #include <meta.h>
     53 #include <sys/lvm/md_mddb.h>
     54 #include <sys/lvm/md_notify.h>
     55 
     56 #define	MD_FF_Q	"md_failfast_queue_01"
     57 #define	MD_FF_TAG	1
     58 #define	INTMAP(n)	{n, #n}
     59 #define	CCNULL		((const char *)0)
     60 
     61 enum boolean { True, False };
     62 typedef enum boolean boolean_e;
     63 
     64 typedef struct intmap {
     65 	int	im_int;
     66 	const char	*im_name;
     67 } intmap_t;
     68 
     69 extern boolean_e issue_ioctl;
     70 extern mdsetname_t	*sp;
     71 void monitord_exit(int status);
     72 void monitord_print(int level, char *message, ...);
     73 void probe_mirror_devs(boolean_e verbose);
     74 void probe_raid_devs(boolean_e verbose);
     75 void probe_trans_devs(boolean_e verbose);
     76 void probe_hotspare_devs(boolean_e verbose);
     77 #ifdef	__cplusplus
     78 }
     79 #endif
     80 
     81 #endif	/* _MD_MONITORD_H */
     82