rdutil.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/resource.h>
#include <stdlib.h>
#include <libintl.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <stdarg.h>
#include <poll.h>
#include <unistd.h>
#include <project.h>
#include <pwd.h>
#include <pthread.h>
#include "rdfile.h"
#include "rdimpl.h"
#include "rdutil.h"
static char PRG_FMT[] = "%s: ";
static char ERR_FMT[] = ": %s\n";
static char *modulname = "srm provider";
extern jmp_buf dm_jmpbuffer;
extern char errmsg[];
extern void monitor_stop();
extern pthread_mutex_t logLock;
/*PRINTFLIKE1*/
void
format_err(char *format, ...)
{
int pos = 0;
}
/*PRINTFLIKE1*/
void
format_errno(char *format, ...)
{
}
/*PRINTFLIKE1*/
void
{
}
void *
{
int cnt = 0;
return (ptr);
goto eagain;
}
dmerror("not enough memory");
/*NOTREACHED*/
return (NULL); /* keep gcc happy */
}
void *
{
}
void *
{
}
void
{
}
int
{
dmerror("getrlimit failed");
else
return (rv);
}
void
{
if (size > 0) {
}
}
void
{
return;
}
void
{
} else {
}
}
void
{
char projbuf[PROJECT_BUFSZ];
} else {
}
}
void
{
}
}
static char buf[RDS_MAXLINE];
static int call_cnt = 0;
static int bytes_written = 0;
void
{
else
}
void
{
}
/*PRINTFLIKE1*/
void
{
int n;
return;
if (pthread_mutex_lock(&logLock) == 0) {
bytes_written = 0;
}
if (hrt_base == 0)
bytes_written += n;
if (pthread_mutex_unlock(&logLock) != 0)
perror("log pthread_mutex_unlock");
} else
perror("log pthread_mutex_lock");
}
/*PRINTFLIKE1*/
void
{
int n;
return;
if (pthread_mutex_lock(&logLock) == 0) {
bytes_written = 0;
}
if (hrt_base == 0)
bytes_written += n;
if (pthread_mutex_unlock(&logLock) != 0)
perror("log pthread_mutex_unlock");
} else
perror("log pthread_mutex_lock");
}