fdc.c (11375) | fdc.c (11872) |
---|---|
1/*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Don Ahn. 7 * 8 * Copyright (c) 1993, 1994 by --- 29 unchanged lines hidden (view full) --- 38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 43 * SUCH DAMAGE. 44 * 45 * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 | 1/*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Don Ahn. 7 * 8 * Copyright (c) 1993, 1994 by --- 29 unchanged lines hidden (view full) --- 38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 43 * SUCH DAMAGE. 44 * 45 * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 |
46 * $Id: fd.c,v 1.65 1995/10/04 07:01:23 joerg Exp $ | 46 * $Id: fd.c,v 1.66 1995/10/09 15:00:36 joerg Exp $ |
47 * 48 */ 49 50#include "ft.h" 51#if NFT < 1 52#undef NFDC 53#endif 54#include "fd.h" --- 918 unchanged lines hidden (view full) --- 973/* fdopen/fdclose */ 974/****************************************************************************/ 975int 976Fdopen(dev_t dev, int flags, int mode, struct proc *p) 977{ 978 fdu_t fdu = FDUNIT(minor(dev)); 979 int type = FDTYPE(minor(dev)); 980 fdc_p fdc; | 47 * 48 */ 49 50#include "ft.h" 51#if NFT < 1 52#undef NFDC 53#endif 54#include "fd.h" --- 918 unchanged lines hidden (view full) --- 973/* fdopen/fdclose */ 974/****************************************************************************/ 975int 976Fdopen(dev_t dev, int flags, int mode, struct proc *p) 977{ 978 fdu_t fdu = FDUNIT(minor(dev)); 979 int type = FDTYPE(minor(dev)); 980 fdc_p fdc; |
981 int st3; | |
982 983#if NFT > 0 984 /* check for a tape open */ 985 if (type & F_TAPE_TYPE) 986 return(ftopen(dev, flags)); 987#endif 988 /* check bounds */ 989 if (fdu >= NFD) --- 265 unchanged lines hidden (view full) --- 1255 1256/***********************************************************************\ 1257* The controller state machine. * 1258* if it returns a non zero value, it should be called again immediatly * 1259\***********************************************************************/ 1260static int 1261fdstate(fdcu_t fdcu, fdc_p fdc) 1262{ | 981 982#if NFT > 0 983 /* check for a tape open */ 984 if (type & F_TAPE_TYPE) 985 return(ftopen(dev, flags)); 986#endif 987 /* check bounds */ 988 if (fdu >= NFD) --- 265 unchanged lines hidden (view full) --- 1254 1255/***********************************************************************\ 1256* The controller state machine. * 1257* if it returns a non zero value, it should be called again immediatly * 1258\***********************************************************************/ 1259static int 1260fdstate(fdcu_t fdcu, fdc_p fdc) 1261{ |
1263 int read, format, head, sec = 0, i = 0, sectrac, st0, cyl, st3; | 1262 int read, format, head, sec = 0, sectrac, st0, cyl, st3; |
1264 unsigned long blknum; 1265 fdu_t fdu = fdc->fdu; 1266 fd_p fd; 1267 register struct buf *dp, *bp; 1268 struct fd_formb *finfo = NULL; 1269 size_t fdblk; 1270 1271 dp = &(fdc->head); --- 659 unchanged lines hidden --- | 1263 unsigned long blknum; 1264 fdu_t fdu = fdc->fdu; 1265 fd_p fd; 1266 register struct buf *dp, *bp; 1267 struct fd_formb *finfo = NULL; 1268 size_t fdblk; 1269 1270 dp = &(fdc->head); --- 659 unchanged lines hidden --- |