/*
* 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
*/
/*
*/
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <alloca.h>
#include <stdio.h>
#include <unistd.h>
#include <dlfcn.h>
#include "libscsi_impl.h"
int
{
char *msg;
abort();
/*NOTREACHED*/
_exit(1);
/*NOTREACHED*/
return (0);
}
int
{
return (-1);
}
/*
* Internal routine for setting both _ue_errno and _ue_errmsg. We save
* and restore the UNIX errno across this routing so the caller can use either
* libscsi_set_errno(), libscsi_error(), or libscsi_verror() without this value
* changing.
*/
int
{
size_t n;
char *errmsg;
/*
* To allow the existing error message to itself be used in an error
* message, we put the new error message into a buffer on the stack,
* and then copy it into lsh_errmsg. We also need to set the errno,
* but because the call to libscsi_set_errno() is destructive to
* lsh_errmsg, we do this after we print into our temporary buffer
* (in case _libscsi_errmsg is part of the error message) and before we
* copy the temporary buffer on to _libscsi_errmsg (to prevent our new
* message from being nuked by the call to libscsi_set_errno()).
*/
return (-1);
}
/*PRINTFLIKE3*/
int
{
return (err);
}
{
}
const char *
{
sizeof (hp->lsh_errmsg));
return (hp->lsh_errmsg);
}
void *
{
void *mem;
if (size == 0) {
return (NULL);
}
return (mem);
}
void *
{
void *mem;
return (NULL);
return (mem);
}
char *
{
return (NULL);
}
/*ARGSUSED*/
void
{
}
{
*errp = ESCSI_NOMEM;
return (NULL);
}
return (hp);
}
void
{
return;
}
}
{
switch (CDB_GROUPID(cmd)) {
case CDB_GROUPID_0:
sz = CDB_GROUP0;
break;
case CDB_GROUPID_1:
sz = CDB_GROUP1;
break;
case CDB_GROUPID_2:
sz = CDB_GROUP2;
break;
case CDB_GROUPID_3:
sz = CDB_GROUP3;
break;
case CDB_GROUPID_4:
sz = CDB_GROUP4;
break;
case CDB_GROUPID_5:
sz = CDB_GROUP5;
break;
case CDB_GROUPID_6:
sz = CDB_GROUP6;
break;
case CDB_GROUPID_7:
sz = CDB_GROUP7;
break;
default:
sz = 0;
}
if (sz == 0)
"unknown or unsupported command %u", cmd);
return (sz);
}
static char *
{
char *buf;
break;
}
}
/*
* As part of basic initialization, we always retrieve the INQUIRY information
*/
int
{
return (-1);
libscsi_action_get_status(ap) != 0) {
}
return (-1);
}
return (0);
}
const char *
{
return (tp->lst_vendor);
}
const char *
{
return (tp->lst_product);
}
const char *
{
return (tp->lst_revision);
}