cfga_sdcard.h revision 4bb7efa72ed531c10f097919636e67724ec4c25a
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _CFGA_SDCARD_H
#define _CFGA_SDCARD_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdlib.h>
#include <strings.h>
#include <fcntl.h>
#include <ctype.h>
#include <unistd.h>
#include <libintl.h>
#include <libdevice.h>
#include <libdevinfo.h>
#include <libdevice.h>
#include <librcm.h>
#include <synch.h>
#include <thread.h>
#include <assert.h>
#define CFGA_PLUGIN_LIB
#include <config_admin.h>
/* Misc text strings */
#define CFGA_DEV_DIR "/dev/cfg"
#define DYN_SEP "::"
#define CFGA_DEVCTL_NODE ":devctl"
#define MINOR_SEP ':'
#define PATH_SEP '/'
#define RESET_SLOT "sdcard_reset_slot"
/* for confirm operation */
#define SDCARD_CONFIRM_1 \
"This operation will suspend activity on the SD card device\nContinue"
#define SDCARD_CONFIRM_2 \
"This operation will disrupt activity on the SD card device\nContinue"
/* Messages */
typedef struct msgcvt {
int intl; /* Flag: if 1, internationalize */
const char *msgstr;
} msgcvt_t;
#define NO_CVT 0
#define CVT 1
/* Messages */
/* Error message ids (and indices into sdcard_error_msgs) */
typedef enum {
CFGA_SDCARD_OK = 0,
/*
* Given an error msg index, look up the associated string, and
* convert it to the current locale if required.
*/
#ifdef __cplusplus
}
#endif
#endif /* _CFGA_SDCARD_H */