/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <strings.h>
#include <stdlib.h>
#include "rpcsvc/nfs_prot.h"
/*
* The waiting() function returns the value passed in, until something
* external modifies it. In this case, the D script tst.call.d will
* modify the value of *a, and thus break the while loop in dotest().
*
* This serves the purpose of not making the RPC calls until tst.call.d
* is active. Thus, the probes in tst.call.d can fire as a result of
* the RPC call in dotest().
*/
int
waiting(volatile int *a)
{
return (*a);
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
typedef void (*call3_arginit_t)(void *);
typedef struct {
} call3_test_t;
/*
* NULL proc is special. Rather than special case its zero-sized
* make realloc() do the wrong thing.
*/
sizeof (int)},
sizeof (READDIRPLUS3args), xdr_READDIRPLUS3res,
sizeof (READDIRPLUS3res)},
{NULL}
};
int
dotest(void)
{
char *sp;
volatile int a = 0;
while (waiting(&a) == 0)
continue;
if (mountclient == NULL) {
clnt_pcreateerror("clnt_create mount");
return (1);
}
sp = sharedpath;
xdr_dirpath, (char *)&sp,
xdr_mountres3, (char *)&mountres3,
timeout);
if (status != RPC_SUCCESS) {
return (1);
}
if (mountres3.fhs_status != 0) {
return (1);
}
clnt_pcreateerror("clnt_create");
return (1);
}
perror("realloc() failed");
return (1);
}
timeout);
if (status != RPC_SUCCESS)
}
xdr_dirpath, (char *)&sp,
timeout);
if (status != RPC_SUCCESS)
return (0);
}
/*ARGSUSED*/
int
{
int rc;
(void) system(unshareline);
return (rc);
}