ctl_frontend_iscsi.c (275310) | ctl_frontend_iscsi.c (275445) |
---|---|
1/*- 2 * Copyright (c) 2012 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Edward Tomasz Napierala under sponsorship 6 * from the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2012 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Edward Tomasz Napierala under sponsorship 6 * from the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 275310 2014-11-30 10:36:29Z trasz $ | 29 * $FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 275445 2014-12-03 08:22:13Z trasz $ |
30 */ 31 32/* 33 * CTL frontend for the iSCSI protocol. 34 */ 35 36#include <sys/cdefs.h> | 30 */ 31 32/* 33 * CTL frontend for the iSCSI protocol. 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 275310 2014-11-30 10:36:29Z trasz $"); | 37__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 275445 2014-12-03 08:22:13Z trasz $"); |
38 39#include <sys/param.h> 40#include <sys/capability.h> 41#include <sys/condvar.h> 42#include <sys/file.h> 43#include <sys/kernel.h> 44#include <sys/kthread.h> 45#include <sys/lock.h> --- 1939 unchanged lines hidden (view full) --- 1985 snprintf(req->error_str, sizeof(req->error_str), 1986 "failed to create target \"%s\"", target); 1987 ctl_free_opts(&opts); 1988 return; 1989 } 1990 if (ct->ct_state == CFISCSI_TARGET_STATE_ACTIVE) { 1991 req->status = CTL_LUN_ERROR; 1992 snprintf(req->error_str, sizeof(req->error_str), | 38 39#include <sys/param.h> 40#include <sys/capability.h> 41#include <sys/condvar.h> 42#include <sys/file.h> 43#include <sys/kernel.h> 44#include <sys/kthread.h> 45#include <sys/lock.h> --- 1939 unchanged lines hidden (view full) --- 1985 snprintf(req->error_str, sizeof(req->error_str), 1986 "failed to create target \"%s\"", target); 1987 ctl_free_opts(&opts); 1988 return; 1989 } 1990 if (ct->ct_state == CFISCSI_TARGET_STATE_ACTIVE) { 1991 req->status = CTL_LUN_ERROR; 1992 snprintf(req->error_str, sizeof(req->error_str), |
1993 "target \"%s\" already exist", target); | 1993 "target \"%s\" already exists", target); |
1994 cfiscsi_target_release(ct); 1995 ctl_free_opts(&opts); 1996 return; 1997 } 1998 port = &ct->ct_port; 1999 if (ct->ct_state == CFISCSI_TARGET_STATE_DYING) 2000 goto done; 2001 --- 938 unchanged lines hidden --- | 1994 cfiscsi_target_release(ct); 1995 ctl_free_opts(&opts); 1996 return; 1997 } 1998 port = &ct->ct_port; 1999 if (ct->ct_state == CFISCSI_TARGET_STATE_DYING) 2000 goto done; 2001 --- 938 unchanged lines hidden --- |