scsi_target.c (130585) | scsi_target.c (130640) |
---|---|
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 130585 2004-06-16 09:47:26Z phk $"); | 31__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_target.c 130640 2004-06-17 17:16:53Z 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 EVENTHANDLER_REGISTER(dev_clone, targclone, 0, 1000); 1031} 1032 1033static void 1034targclone(void *arg, char *name, int namelen, struct cdev **dev) 1035{ 1036 int u; 1037 | 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 EVENTHANDLER_REGISTER(dev_clone, targclone, 0, 1000); 1031} 1032 1033static void 1034targclone(void *arg, char *name, int namelen, struct cdev **dev) 1035{ 1036 int u; 1037 |
1038 if (*dev != NODEV) | 1038 if (*dev != NULL) |
1039 return; 1040 if (dev_stdclone(name, NULL, "targ", &u) != 1) 1041 return; 1042 *dev = make_dev(&targ_cdevsw, unit2minor(u), UID_ROOT, GID_WHEEL, 1043 0600, "targ%d", u); 1044 (*dev)->si_flags |= SI_CHEAPCLONE; 1045} 1046 --- 157 unchanged lines hidden --- | 1039 return; 1040 if (dev_stdclone(name, NULL, "targ", &u) != 1) 1041 return; 1042 *dev = make_dev(&targ_cdevsw, unit2minor(u), UID_ROOT, GID_WHEEL, 1043 0600, "targ%d", u); 1044 (*dev)->si_flags |= SI_CHEAPCLONE; 1045} 1046 --- 157 unchanged lines hidden --- |