mcd.c (37389) | mcd.c (37618) |
---|---|
1/* 2 * Copyright 1993 by Holger Veit (data part) 3 * Copyright 1993 by Brian Moore (audio part) 4 * Changes Copyright 1993 by Gary Clark II 5 * Changes Copyright (C) 1994-1995 by Andrey A. Chernov, Moscow, Russia 6 * 7 * Rewrote probe routine to work on newer Mitsumi drives. 8 * Additional changes (C) 1994 by Jordan K. Hubbard --- 26 unchanged lines hidden (view full) --- 35 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 36 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 37 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 38 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 39 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 40 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 41 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 42 * | 1/* 2 * Copyright 1993 by Holger Veit (data part) 3 * Copyright 1993 by Brian Moore (audio part) 4 * Changes Copyright 1993 by Gary Clark II 5 * Changes Copyright (C) 1994-1995 by Andrey A. Chernov, Moscow, Russia 6 * 7 * Rewrote probe routine to work on newer Mitsumi drives. 8 * Additional changes (C) 1994 by Jordan K. Hubbard --- 26 unchanged lines hidden (view full) --- 35 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 36 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 37 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 38 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 39 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 40 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 41 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 42 * |
43 * $Id: mcd.c,v 1.98 1998/06/07 17:10:46 dfr Exp $ | 43 * $Id: mcd.c,v 1.99 1998/07/04 22:30:17 julian Exp $ |
44 */ 45static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; 46 47#include "mcd.h" 48#if NMCD > 0 49#include "opt_devfs.h" 50 51#include <sys/param.h> --- 358 unchanged lines hidden (view full) --- 410 411 cd = mcd_data + unit; 412 413 /* test validity */ 414/*MCD_TRACE("strategy: buf=0x%lx, unit=%ld, block#=%ld bcount=%ld\n", 415 bp,unit,bp->b_blkno,bp->b_bcount);*/ 416 if (unit >= NMCD || bp->b_blkno < 0) { 417 printf("mcdstrategy: unit = %d, blkno = %ld, bcount = %ld\n", | 44 */ 45static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; 46 47#include "mcd.h" 48#if NMCD > 0 49#include "opt_devfs.h" 50 51#include <sys/param.h> --- 358 unchanged lines hidden (view full) --- 410 411 cd = mcd_data + unit; 412 413 /* test validity */ 414/*MCD_TRACE("strategy: buf=0x%lx, unit=%ld, block#=%ld bcount=%ld\n", 415 bp,unit,bp->b_blkno,bp->b_bcount);*/ 416 if (unit >= NMCD || bp->b_blkno < 0) { 417 printf("mcdstrategy: unit = %d, blkno = %ld, bcount = %ld\n", |
418 unit, bp->b_blkno, bp->b_bcount); | 418 unit, (long)bp->b_blkno, bp->b_bcount); |
419 printf("mcd: mcdstratregy failure"); 420 bp->b_error = EINVAL; 421 bp->b_flags |= B_ERROR; 422 goto bad; 423 } 424 425 /* if device invalidated (e.g. media change, door open), error */ 426 if (!(cd->flags & MCDVALID)) { --- 97 unchanged lines hidden (view full) --- 524 int unit,part,retry,r; 525 526 unit = mcd_unit(dev); 527 part = mcd_part(dev); 528 cd = mcd_data + unit; 529 530 if (mcd_getstat(unit, 1) == -1) /* detect disk change too */ 531 return EIO; | 419 printf("mcd: mcdstratregy failure"); 420 bp->b_error = EINVAL; 421 bp->b_flags |= B_ERROR; 422 goto bad; 423 } 424 425 /* if device invalidated (e.g. media change, door open), error */ 426 if (!(cd->flags & MCDVALID)) { --- 97 unchanged lines hidden (view full) --- 524 int unit,part,retry,r; 525 526 unit = mcd_unit(dev); 527 part = mcd_part(dev); 528 cd = mcd_data + unit; 529 530 if (mcd_getstat(unit, 1) == -1) /* detect disk change too */ 531 return EIO; |
532MCD_TRACE("ioctl called 0x%x\n", cmd); | 532MCD_TRACE("ioctl called 0x%lx\n", cmd); |
533 534 switch (cmd) { 535 case CDIOCSETPATCH: 536 case CDIOCGETVOL: 537 case CDIOCSETVOL: 538 case CDIOCSETMONO: 539 case CDIOCSETSTERIO: 540 case CDIOCSETMUTE: --- 1324 unchanged lines hidden --- | 533 534 switch (cmd) { 535 case CDIOCSETPATCH: 536 case CDIOCGETVOL: 537 case CDIOCSETVOL: 538 case CDIOCSETMONO: 539 case CDIOCSETSTERIO: 540 case CDIOCSETMUTE: --- 1324 unchanged lines hidden --- |