util.c revision 724365f7556fc4201fdb11766ebc6bd918523130
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <inttypes.h>
#include <stdio.h>
#include <stdarg.h>
#include <ctype.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include <assert.h>
#include <smbios.h>
#include "util.h"
#include "sfx4500-disk.h"
extern log_class_t g_verbose;
/*
* Search a string list for a particular value.
* Return the string associated with that value.
*/
char *
{
}
}
return ((char *)NULL);
}
/*
* Produce a pretty dump of memory
* <X> <Byte_i-1> <Byte_i> <Byte_i+1> ... [TEXT REPRESENTATION]
*/
static void
{
int byte_count;
int i;
#define LINEBUFLEN 128
char linebuf[LINEBUFLEN];
char *linep;
/*
* Inner loop processes 16 bytes at a time, or less
* if we have less than 16 bytes to go
*/
(unsigned char) start[byte_count + i]);
if (bufleft >= 2) {
if (i == 7)
*linep = '-';
else
*linep = ' ';
--bufleft;
++linep;
}
}
/*
* If i is less than 16, then we had less than 16 bytes
* written to the output. We need to fixup the alignment
* to allow the "text" output to be aligned
*/
if (i < 16) {
while (numspaces-- > 0) {
if (bufleft >= 2) {
*linep = ' ';
--bufleft;
linep++;
}
}
}
if (bufleft >= 2) {
*linep = ' ';
--bufleft;
++linep;
}
int subscript = byte_count + i;
if (bufleft >= 2) {
--bufleft;
++linep;
}
}
}
}
void
{
return;
}
static void
{
}
static void
{
}
static void
{
}
void
{
return;
}
static void
{
return;
}
void
{
return;
}
/*PRINTFLIKE1*/
void
{
return;
}
/*PRINTFLIKE1*/
void
{
return;
}
/*PRINTFLIKE1*/
void
log_warn_e(const char *fmt, ...)
{
return;
}
void
{
}
void
dstrfree(char *s)
{
fmd_hdl_strfree(g_fm_hdl, s);
}
void *
{
}
void *
{
}
char *
dstrdup(const char *s)
{
}
void
{
else {
}
/* If the queue was empty, we need to wake people up */
}
void *
{
/* Wait while the queue is empty */
}
/*
* If Block-On-Empty is false, the queue may be empty
*/
}
return (rv);
}
qu_t *
{
return (newqp);
}
void
{
void *item;
}
}