scsi_pass.c (39213) | scsi_pass.c (39317) |
---|---|
1/* 2 * Copyright (c) 1997, 1998 Justin T. Gibbs. 3 * Copyright (c) 1997, 1998 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: --- 10 unchanged lines hidden (view full) --- 19 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/* 2 * Copyright (c) 1997, 1998 Justin T. Gibbs. 3 * Copyright (c) 1997, 1998 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: --- 10 unchanged lines hidden (view full) --- 19 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $Id$ | 27 * $Id: scsi_pass.c,v 1.1 1998/09/15 06:36:34 gibbs Exp $ |
28 */ 29 30#include <sys/param.h> 31#include <sys/queue.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/types.h> 35#include <sys/buf.h> --- 349 unchanged lines hidden (view full) --- 385 return (ENXIO); 386 387 softc = (struct pass_softc *)periph->softc; 388 389 if (softc->flags & PASS_FLAG_INVALID) 390 return(ENXIO); 391 392 /* | 28 */ 29 30#include <sys/param.h> 31#include <sys/queue.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/types.h> 35#include <sys/buf.h> --- 349 unchanged lines hidden (view full) --- 385 return (ENXIO); 386 387 softc = (struct pass_softc *)periph->softc; 388 389 if (softc->flags & PASS_FLAG_INVALID) 390 return(ENXIO); 391 392 /* |
393 * Only allow read-write access. 394 */ 395 if (((flags & FWRITE) == 0) || ((flags & FREAD) == 0)) 396 return(EPERM); 397 398 /* |
|
393 * We don't allow nonblocking access. 394 */ 395 if ((flags & O_NONBLOCK) != 0) { 396 printf("%s%d: can't do nonblocking accesss\n", 397 periph->periph_name, 398 periph->unit_number); 399 return(ENODEV); 400 } --- 387 unchanged lines hidden --- | 399 * We don't allow nonblocking access. 400 */ 401 if ((flags & O_NONBLOCK) != 0) { 402 printf("%s%d: can't do nonblocking accesss\n", 403 periph->periph_name, 404 periph->unit_number); 405 return(ENODEV); 406 } --- 387 unchanged lines hidden --- |