/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
#include <strings.h>
#include <libgen.h>
#include <libintl.h>
#include <errno.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <libhal.h>
#include <rmm_common.h>
char *progname;
static void usage();
static void nomem();
static void
usage()
{
if (!u_opt) {
"%s: [-dlu] [-o options] [nickname | device] "
"[mount_point]\n", progname);
} else {
"%s: [-dl] [nickname | device]\n", progname);
}
}
static int
{
int c;
LibHalDrive *d;
const char *default_name;
int num_opts = 0;
char **p;
int print_mask;
int ret = 0;
}
rmm_debug = 1;
}
switch (c) {
case 'd':
break;
case 'l':
break;
case 'o':
nomem();
}
num_opts++;
}
break;
case 'u':
break;
case '?':
usage();
return (0);
default:
usage();
return (1);
}
}
if (u_opt) {
} else if (closetray_opt) {
} else if (eject_opt) {
} else {
}
if ((rmm_error == RMM_EDBUS_CONNECT) ||
(rmm_error == RMM_EHAL_CONNECT)) {
return (99);
} else {
return (1);
}
}
if (d_opt) {
/* -d: print default name and exit */
default_name = "nothing inserted";
} else {
}
} else if (l_opt) {
/* -l: list volumes and exit */
if (eject_opt) {
}
/* no name provided, use default */
gettext("No default media available\n"));
ret = 1;
} else {
if (query_opt) {
B_TRUE) ? 0 : 1;
} else {
0, 0, 0, 0) ? 0 : 1;
}
}
} else {
}
if (query_opt) {
B_TRUE) ? 0 : 1;
} else {
}
}
return (ret);
}
static int
{
}
static int
{
} else {
}
}
static void
nomem(void)
{
exit(1);
}
/*
* get the name by which this program was called
*/
static char *
{
char *s;
char *p;
exit(1);
}
p = strrchr(s, '/');
if (p != NULL) {
strcpy(s, p + 1);
}
return (s);
}
int
{
} else {
}
} else {
ret = 1;
}
return (ret);
}