oplmsu_ioctl_uwp.c revision 07d06da50d310a325b457d6330165aebab1e0064
/*
* 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
*/
/*
* UPPER WRITE SERVICE PROCEDURE
*/
/* I_PLINK ioctl command received */
int
{
int ncode;
return (EINVAL);
}
sizeof (struct linkblk)) {
return (EINVAL);
}
/*
* Check whether this is called by super-user privilege.
* uwq => Queue of meta control node
*/
return (ncode);
}
/* Allocate kernel memory for lpath_t */
"Failed to allocate kernel memory");
return (ENOMEM);
}
/*
* Initialize members of lpath_t
*/
"Failed to allocate kernel memory");
return (ENOMEM);
}
return (SUCCESS);
}
/* I_PUNLINK ioctl command received */
int
{
int ncode;
int use_flag;
return (EINVAL);
}
sizeof (struct linkblk)) {
return (ENOSR);
}
/*
* Check whether this is called by super-user privilege.
* uwq => Queue of meta control node
*/
return (ncode);
}
/*
* Search for a corresponding lower path information table to
* lbp->l_qbot from the lower queue address.
*/
while (lpath) {
break;
}
}
"Proper lpath_t doesn't find");
return (EINVAL);
}
/* lpath_t come into the busy status */
"Other processing is using lower path");
return (EBUSY);
}
/* upath_t is retrieved by using the path number */
case MSU_PSTAT_STOP : /* FALLTHRU */
case MSU_PSTAT_FAIL :
/*
* When traditional_status is MSU_SETID, the path
* status is changed into the state of disconnect.
*/
break;
}
/*
* When traditional_status isn't MSU_SETID,
* the error is reported.
*/
default :
/*
* When upath->status isn't MSU_PSTAT_STOP or
* MSU_PSTAT_FAIL, the error is reported.
*/
return (EINVAL);
}
} else {
/*
* This pattern is no upper info table before config_add or
* after config_del.
*/
/*
* When the upper path table doesn't exist, path is deleted
* with config_del/config_add ioctl processed.
*/
return (EINVAL);
}
}
/* Free high priority message */
"Free high-priority message by unlinking lower path");
}
}
if (rbuf_id != 0) {
}
if (rtout_id != 0) {
}
return (SUCCESS);
}
/* termio ioctl command received */
int
{
int term_stat;
int use_flag;
return (EINVAL);
}
"b_cont data block is NULL");
return (FAILURE);
}
"b_rptr data pointer is NULL");
return (EINVAL);
}
/*
* Check control node type
* uwq : Queue of user control node
*/
return (EINVAL);
}
}
case TCSETS : /* FALLTHRU */
case TCSETSW : /* FALLTHRU */
case TCSETSF :
break;
case TIOCMSET :
break;
case TIOCSPPS :
break;
case TIOCSWINSZ :
break;
case TIOCSSOFTCAR :
break;
default :
return (EINVAL);
}
"Active path doesn't exist");
return (FAILURE);
}
"Proper lpath_t doesn't exist");
return (EINVAL);
}
return (FAILURE);
}
"Proper upath_t doesn't find");
return (EINVAL);
}
/* Set ioctl command to lower path info table */
return (SUCCESS);
} else {
return (EBUSY);
}
}
/* Set destination queue (active path) */
return (SUCCESS);
} else {
return (FAILURE);
}
}