if_zfs.c revision ecd6cf800b63704be73fb264c3f5b6e0dafc068d
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Methods for ZFS to notify the iSCSI Target about which ZVOLs
* need to be made available.
*/
#include <libiscsitgt.h>
#include <strings.h>
#include <errno.h>
#include <libscf.h>
#include <errcode.h>
#include "iscsitgt_impl.h"
/*
* iscsitgt_zfs_share -- share a ZFS volume as an iSCSI target
*/
int
iscsitgt_zfs_share(const char *dataset)
{
tgt_node_t *n;
int code;
if (iscsitgt_svc_online() != 0) {
} else {
}
return (-1);
}
if (code == 1000) {
tgt_node_free(n);
return (0);
} else {
}
} else {
}
tgt_node_free(n);
return (-1);
}
/*
* iscsitgt_zfs_unshare -- unshare a ZFS volume
*/
int
iscsitgt_zfs_unshare(const char *dataset)
{
tgt_node_t *n;
int code;
return (-1);
}
if (code == 1000) {
tgt_node_free(n);
return (0);
} else {
}
} else {
}
tgt_node_free(n);
return (-1);
}
int
iscsitgt_zfs_is_shared(const char *dataset)
{
tgt_node_t *n;
int code;
return (-1);
}
code == 1000) {
tgt_node_free(n);
return (1);
}
tgt_node_free(n);
return (0);
}