scsi_cd.c (210471) | scsi_cd.c (219056) |
---|---|
1/*- 2 * Copyright (c) 1997 Justin T. Gibbs. 3 * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Kenneth D. Merry. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 32 unchanged lines hidden (view full) --- 41 * functioning of this software in any circumstances. 42 * 43 * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 44 * 45 * from: cd.c,v 1.83 1997/05/04 15:24:22 joerg Exp $ 46 */ 47 48#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997 Justin T. Gibbs. 3 * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Kenneth D. Merry. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 32 unchanged lines hidden (view full) --- 41 * functioning of this software in any circumstances. 42 * 43 * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 44 * 45 * from: cd.c,v 1.83 1997/05/04 15:24:22 joerg Exp $ 46 */ 47 48#include <sys/cdefs.h> |
49__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_cd.c 210471 2010-07-25 15:43:52Z mav $"); | 49__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_cd.c 219056 2011-02-26 14:58:54Z nwhitehorn $"); |
50 51#include "opt_cd.h" 52 53#include <sys/param.h> 54#include <sys/systm.h> 55#include <sys/kernel.h> 56#include <sys/bio.h> 57#include <sys/conf.h> --- 661 unchanged lines hidden (view full) --- 719 DEVSTAT_BS_UNAVAILABLE, 720 DEVSTAT_TYPE_CDROM | DEVSTAT_TYPE_IF_SCSI, 721 DEVSTAT_PRIORITY_CD); 722 softc->disk->d_open = cdopen; 723 softc->disk->d_close = cdclose; 724 softc->disk->d_strategy = cdstrategy; 725 softc->disk->d_ioctl = cdioctl; 726 softc->disk->d_name = "cd"; | 50 51#include "opt_cd.h" 52 53#include <sys/param.h> 54#include <sys/systm.h> 55#include <sys/kernel.h> 56#include <sys/bio.h> 57#include <sys/conf.h> --- 661 unchanged lines hidden (view full) --- 719 DEVSTAT_BS_UNAVAILABLE, 720 DEVSTAT_TYPE_CDROM | DEVSTAT_TYPE_IF_SCSI, 721 DEVSTAT_PRIORITY_CD); 722 softc->disk->d_open = cdopen; 723 softc->disk->d_close = cdclose; 724 softc->disk->d_strategy = cdstrategy; 725 softc->disk->d_ioctl = cdioctl; 726 softc->disk->d_name = "cd"; |
727 cam_strvis(softc->disk->d_descr, cgd->inq_data.vendor, 728 sizeof(cgd->inq_data.vendor), sizeof(softc->disk->d_descr)); 729 strlcat(softc->disk->d_descr, " ", sizeof(softc->disk->d_descr)); 730 cam_strvis(&softc->disk->d_descr[strlen(softc->disk->d_descr)], 731 cgd->inq_data.product, sizeof(cgd->inq_data.product), 732 sizeof(softc->disk->d_descr) - strlen(softc->disk->d_descr)); |
|
727 softc->disk->d_unit = periph->unit_number; 728 softc->disk->d_drv1 = periph; 729 if (cpi.maxio == 0) 730 softc->disk->d_maxsize = DFLTPHYS; /* traditional default */ 731 else if (cpi.maxio > MAXPHYS) 732 softc->disk->d_maxsize = MAXPHYS; /* for safety */ 733 else 734 softc->disk->d_maxsize = cpi.maxio; --- 3507 unchanged lines hidden --- | 733 softc->disk->d_unit = periph->unit_number; 734 softc->disk->d_drv1 = periph; 735 if (cpi.maxio == 0) 736 softc->disk->d_maxsize = DFLTPHYS; /* traditional default */ 737 else if (cpi.maxio > MAXPHYS) 738 softc->disk->d_maxsize = MAXPHYS; /* for safety */ 739 else 740 softc->disk->d_maxsize = cpi.maxio; --- 3507 unchanged lines hidden --- |