/*
* 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.
*/
#include <stdlib.h>
#include <stdio.h>
#include <strings.h>
#include <unistd.h>
#include <stropts.h>
#include <libintl.h>
#include <errno.h>
#include <time.h>
#include <string.h>
#include <assert.h>
#include <getopt.h>
#include <cmdparse.h>
#include <signal.h>
#include <pthread.h>
#include <fcntl.h>
#include <locale.h>
#include <sys/systeminfo.h>
#include <libiscsit.h>
static int it_enable(int, char **, cmdOptions_t *, void *);
static int it_disable(int, char **, cmdOptions_t *, void *);
/*
* MAJOR - This should only change when there is an incompatible change made
* to the interfaces or the output.
*
* MINOR - This should change whenever there is a new command or new feature
* with no incompatible change.
*/
/* 10 ms sleep in nanoseconds */
/* tables set up based on cmdparse instructions */
/* add new options here */
{NULL, 0, 0, 0}
};
/*
* Add new subcommands here
*/
};
/* globals */
char *cmdName;
/*
* Opens the iSCSI Target Node
*
* fd - Return the iscsit file descriptor
*/
static int
{
if (*fd < 0) {
ret = ITADM_PERM;
} else {
ret = ITADM_INVALID;
}
}
return (ret);
}
/*
* Enables the iSCSI Target
*/
/*ARGSUSED*/
static int
void *args)
{
int ret;
int fd;
char *fqhnp;
gettext("Requesting to enable iscsi target"));
/* Open the iscsi target node */
return (ret);
}
/* enable the iscsi target */
256 - sizeof (uint32_t));
}
return (ret);
}
return (ITADM_SUCCESS);
}
/*
* Disable the iSCSI target
*/
/* ARGSUSED */
static int
void *args)
{
int ret;
int fd;
gettext("Requesting to disable iscsi target"));
/* Open the iscsi target node */
return (ret);
}
/* disable the iSCSI target */
return (ret);
}
return (ITADM_SUCCESS);
}
/*
* input:
* execFullName - exec name of program (argv[0])
*
* (changed name to lowerCamelCase to keep consistent with this file)
*
* Returns:
* command name portion of execFullName
*/
static char *
{
/* guard against '/' at end of command invocation */
for (;;) {
break;
} else {
if (*execBasename == '\0') {
*lastSlash = '\0';
continue;
}
break;
}
}
return (execBasename);
}
int
{
int ret;
int funcRet;
/* set global command name */
if (ret != 0) {
return (ret);
}
return (funcRet);
} /* end main */