/*
* 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
*/
/*
*/
#include <priv.h>
#include "libzfs_jni_main.h"
#include "libzfs_jni_util.h"
#include "libzfs_jni_dataset.h"
#include "libzfs_jni_property.h"
#include "libzfs_jni_pool.h"
#include "libzfs_jni_diskmgt.h"
#include "libzfs_jni_disk.h"
/*
* Function prototypes
*/
static void handle_error(const char *, va_list);
static void init();
/*
* Static functions
*/
static void
{
/* Save the error message in case it's needed */
#ifdef DEBUG
#endif
}
/*
* Initialize the library. Sets the error handler.
*/
static void
init()
{
abort();
/* diskmgt.o error handler */
}
/*
* JNI functions
*/
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getImportablePools
*/
/* ARGSUSED */
int error;
int argc = 0;
if (!priv_ineffect(PRIV_SYS_CONFIG)) {
"cannot discover pools: permission denied\n");
return (NULL);
}
return (NULL);
}
/* Count elements */
}
/* Create an array list to hold each ImportablePoolBean */
/* Iterate through all importable pools, building list */
if (error) {
return (NULL);
}
ZFSJNI_PACKAGE_DATA "ImportablePool"));
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getPools
*/
/* ARGSUSED */
{
int result;
/* Create an array list */
/* Must not call any more Java methods to preserve exception */
return (NULL);
}
ZFSJNI_PACKAGE_DATA "Pool"));
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getPool
*/
/* ARGSUSED */
{
/* Verify that object is Pool, not some other Dataset */
}
return (pool);
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getFileSystems
*/
/* ARGSUSED */
{
if (containerUTF == NULL) {
}
ZFSJNI_PACKAGE_DATA "FileSystem"));
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getFileSystem
*/
/* ARGSUSED */
{
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getVolumes
*/
/* ARGSUSED */
{
ZFSJNI_PACKAGE_DATA "Volume"));
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getVolume
*/
/* ARGSUSED */
{
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getSnapshots
*/
/* ARGSUSED */
{
ZFSJNI_PACKAGE_DATA "Snapshot"));
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getSnapshot
*/
/* ARGSUSED */
{
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getDatasets
*/
/* ARGSUSED */
{
if (containerUTF == NULL) {
}
ZFSJNI_PACKAGE_DATA "Dataset"));
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getDataset
*/
/* ARGSUSED */
{
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getVirtualDevice
*/
/* ARGSUSED */
{
NULL);
}
}
}
return (vdev);
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getVirtualDevices
*/
/* ARGSUSED */
/* CSTYLED */
{
NULL);
/* Is the pool valid? */
}
}
}
return (vdevs);
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getVirtualDevices
*/
/* ARGSUSED */
/* CSTYLED */
{
/* Is the pool valid? */
}
}
return (vdevs);
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getAvailableDisks
*/
/* ARGSUSED */
{
int error;
/* Create an array list */
if (error) {
} else {
ZFSJNI_PACKAGE_DATA "DiskDevice");
}
return (array);
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getDependents
*/
/* ARGSUSED */
{
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getPropertyDefault
*/
/* ARGSUSED */
{
if (prop != ZPROP_INVAL) {
}
return (defProperty);
}
typedef struct zjni_class_type_map {
char *class;
typedef struct mapping_data {
static int
{
/* Add name of property to list */
}
return (ZPROP_CONT);
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getValidPropertyNames
*/
/* ARGSUSED */
{
int i;
/* Mappings of class names to zfs_type_t */
};
/* Create an array list for the property names */
/* For each mapping... */
for (i = 0; i < nmappings; i++) {
/*
* Is the given class an instance of the class in the mapping?
*/
if (isInstance == JNI_TRUE) {
break;
}
}
return (zjni_Collection_to_array(
}
/*
* Class: com_sun_zfs_common_model_SystemDataModel
* Method: getPoolCurrentVersion
* Signature: ()J;
*/
/* ARGSUSED */
{
return (pool_current_version);
}