scfostoescf.c revision 25cf1a301a396c38e8adf52c15f537b80d2483f7
/*
* 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
*/
/*
* All Rights Reserved, Copyright (c) FUJITSU LIMITED 2006
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* scf_service_putinfo()
*
* Description: Data request to send processing from the OS to ESCF.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_service_putinfo() "
int ret = 0; /* Return value */
int tm_stop_cnt;
/* SCF command table clear */
/* Lock driver mutex */
/* Check "key" */
/* Invalid "key" */
sizeof (key));
goto END_service_putinfo;
}
/* Check "length" and "datap" */
/* Invalid "length" or "datap" */
sizeof (length));
goto END_service_putinfo;
}
/* Check "length" is max length */
if (length > SCF_L_CNT_MAX) {
/* Invalid "length" */
sizeof (length));
goto END_service_putinfo;
}
/* Check putinfo exec flag */
/* Multiplex, putinfo */
sizeof (scf_comtbl.putinfo_exec_flag));
goto END_service_putinfo;
}
/* putinfo exec flag ON */
/* Check "length" is 0 */
if (length != 0) {
/* Send buffer allocation */
/* Data copy to send buffer */
}
/* Make SCF command */
/* Send SCF command */
/* Check send buffer */
/* Send data release */
}
/* putinfo exec flag OFF */
/*
* END_service_putinfo
*/
/* Collect the timers which need to be stopped */
/* Unlock driver mutex */
/* Timer stop */
if (tm_stop_cnt != 0) {
}
return (ret);
}
/*
* scf_service_getinfo()
*
* Description: Data request to receive processing from the OS to ESCF.
*
*/
int
{
#define SCF_FUNC_NAME "scf_service_getinfo() "
int ret = 0; /* Return value */
int tm_stop_cnt;
/* Lock driver mutex */
/* Check "key" */
/* Invalid "key" */
sizeof (key));
goto END_service_getinfo;
}
/* Check "lengthp" and "datap" */
/* Invalid "lengthp" */
sizeof (lengthp));
goto END_service_getinfo;
}
/* Check "lengthp" is max length */
if (*lengthp > SCF_L_CNT_MAX) {
/* Invalid "lengthp" */
sizeof (*lengthp));
goto END_service_getinfo;
}
/* Check, parameter "length" and "datap" */
/* Invalid "lengthp" or "datap" */
sizeof (*lengthp));
goto END_service_getinfo;
}
/* Check getinfo exec flag */
/* Multiplex, getinfo */
sizeof (scf_comtbl.getinfo_exec_flag));
goto END_service_getinfo;
}
/* getinfo exec flag ON */
/* Check "lengthp" is 0 */
if (*lengthp != 0) {
/*
* Receive buffer allocation
*/
} else {
wkleng = 0;
}
/* Make SCF command */
/* Send SCF command */
/* Check return code */
if (ret == 0) {
/* Set receive length */
/* Set receive data length */
}
/* Check receive data length is not 0 */
if (*lengthp != 0) {
/* Data copy to "datap" */
}
}
/* Check receive buffer */
/*
* Receive data release
*/
}
/* getinfo exec flag OFF */
/*
* END_service_getinfo
*/
/* Collect the timers which need to be stopped */
/* Unlock driver mutex */
/* Timer stop */
if (tm_stop_cnt != 0) {
}
return (ret);
}