Deleted Added
full compact
scsi_target.c (141713) scsi_target.c (144389)
1/*-
2 * Generic SCSI Target Kernel Mode Driver
3 *
4 * Copyright (c) 2002 Nate Lawson.
5 * Copyright (c) 1998, 1999, 2001, 2002 Justin T. Gibbs.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

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
30#include <sys/cdefs.h>
1/*-
2 * Generic SCSI Target Kernel Mode Driver
3 *
4 * Copyright (c) 2002 Nate Lawson.
5 * Copyright (c) 1998, 1999, 2001, 2002 Justin T. Gibbs.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

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
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_target.c 141713 2005-02-12 04:51:19Z scottl $");
31__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_target.c 144389 2005-03-31 12:19:44Z phk $");
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/conf.h>
37#include <sys/malloc.h>
38#include <sys/poll.h>
39#include <sys/vnode.h>

--- 990 unchanged lines hidden (view full) ---

1030 int u;
1031
1032 if (*dev != NULL)
1033 return;
1034 if (dev_stdclone(name, NULL, "targ", &u) != 1)
1035 return;
1036 *dev = make_dev(&targ_cdevsw, unit2minor(u), UID_ROOT, GID_WHEEL,
1037 0600, "targ%d", u);
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/conf.h>
37#include <sys/malloc.h>
38#include <sys/poll.h>
39#include <sys/vnode.h>

--- 990 unchanged lines hidden (view full) ---

1030 int u;
1031
1032 if (*dev != NULL)
1033 return;
1034 if (dev_stdclone(name, NULL, "targ", &u) != 1)
1035 return;
1036 *dev = make_dev(&targ_cdevsw, unit2minor(u), UID_ROOT, GID_WHEEL,
1037 0600, "targ%d", u);
1038 dev_ref(*dev);
1038 (*dev)->si_flags |= SI_CHEAPCLONE;
1039}
1040
1041static void
1042targasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
1043{
1044 /* All events are handled in usermode by INOTs */
1045 panic("targasync() called, should be an INOT instead");

--- 141 unchanged lines hidden ---
1039 (*dev)->si_flags |= SI_CHEAPCLONE;
1040}
1041
1042static void
1043targasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
1044{
1045 /* All events are handled in usermode by INOTs */
1046 panic("targasync() called, should be an INOT instead");

--- 141 unchanged lines hidden ---