action_wabi.c revision 18c2aff776a775d34a4c9893a4c72e0434d68e36
/*
* 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 2000 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef lint
#pragma ident "%Z%%M% %I% %E% SMI"
#endif lint
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <dirent.h>
#include <rmmount.h>
#include <signal.h>
/*
* Do good stuff for wabi.
*/
/*
* volmgt related ioctls. common for wabi and sunpc
*/
struct devpid_pkt {
};
/* for debug messages */
extern char *prog_name;
extern int prog_pid;
#define TRUE (-1)
#define FALSE (0)
int
{
char *devname;
struct devpid_pkt dp;
int fd;
int flag = 0;
return (FALSE);
}
dprintf("action_wabi: isrunning failed; %m\n");
return (FALSE);
}
if (!flag) {
dprintf("action_wabi: wabi is not running\n");
return (FALSE);
}
dprintf("action_wabi: wabi is alive\n");
/* insert case is simple, so we just get that out of the way */
return (TRUE);
}
/* well, if it's not insert or eject, we'll just leave right here */
return (FALSE);
}
dprintf("action_wabi: no /dev name for %s\n",
getenv("VOLUME_SYMDEV"));
return (FALSE);
}
return (FALSE);
}
dprintf("action_wabi: getdevpid failed; %m\n");
return (FALSE);
}
/*
* wabi's got the device.
*/
dprintf("action_wabi: wabi is pid %d, dev_t is 0x%x\n",
dprintf("action_wabi: setchange failed; %m\n");
}
dprintf("action_wabi: kill of pid %d failed; %m\n");
}
}
return (TRUE);
}