Deleted Added
full compact
msdosfs_fat.c (11921) msdosfs_fat.c (12144)
1/* $Id: msdosfs_fat.c,v 1.7 1995/05/30 08:07:40 rgrimes Exp $ */
1/* $Id: msdosfs_fat.c,v 1.8 1995/10/29 15:31:49 phk Exp $ */
2/* $NetBSD: msdosfs_fat.c,v 1.12 1994/08/21 18:44:04 ws Exp $ */
3
4/*-
5 * Copyright (C) 1994 Wolfgang Solfrank.
6 * Copyright (C) 1994 TooLs GmbH.
7 * All rights reserved.
8 * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below).
9 *

--- 54 unchanged lines hidden (view full) ---

64 * msdosfs include files.
65 */
66#include <msdosfs/bpb.h>
67#include <msdosfs/msdosfsmount.h>
68#include <msdosfs/direntry.h>
69#include <msdosfs/denode.h>
70#include <msdosfs/fat.h>
71
2/* $NetBSD: msdosfs_fat.c,v 1.12 1994/08/21 18:44:04 ws Exp $ */
3
4/*-
5 * Copyright (C) 1994 Wolfgang Solfrank.
6 * Copyright (C) 1994 TooLs GmbH.
7 * All rights reserved.
8 * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below).
9 *

--- 54 unchanged lines hidden (view full) ---

64 * msdosfs include files.
65 */
66#include <msdosfs/bpb.h>
67#include <msdosfs/msdosfsmount.h>
68#include <msdosfs/direntry.h>
69#include <msdosfs/denode.h>
70#include <msdosfs/fat.h>
71
72static void fc_lookup __P((struct denode *dep, u_long findcn, u_long *frcnp, u_long *fsrcnp));
72/*
73 * Fat cache stats.
74 */
75int fc_fileextends; /* # of file extends */
76int fc_lfcempty; /* # of time last file cluster cache entry
77 * was empty */
78int fc_bmapcalls; /* # of times pcbmap was called */
79

--- 166 unchanged lines hidden (view full) ---

246 fc_setcache(dep, FC_LASTFC, i - 1, prevcn);
247 return E2BIG;
248}
249
250/*
251 * Find the closest entry in the fat cache to the cluster we are looking
252 * for.
253 */
73/*
74 * Fat cache stats.
75 */
76int fc_fileextends; /* # of file extends */
77int fc_lfcempty; /* # of time last file cluster cache entry
78 * was empty */
79int fc_bmapcalls; /* # of times pcbmap was called */
80

--- 166 unchanged lines hidden (view full) ---

247 fc_setcache(dep, FC_LASTFC, i - 1, prevcn);
248 return E2BIG;
249}
250
251/*
252 * Find the closest entry in the fat cache to the cluster we are looking
253 * for.
254 */
254void
255static void
255fc_lookup(dep, findcn, frcnp, fsrcnp)
256 struct denode *dep;
257 u_long findcn;
258 u_long *frcnp;
259 u_long *fsrcnp;
260{
261 int i;
262 u_long cn;

--- 308 unchanged lines hidden (view full) ---

571
572/*
573 * Check the length of a free cluster chain starting at start.
574 *
575 * pmp - mount point
576 * start - start of chain
577 * count - maximum interesting length
578 */
256fc_lookup(dep, findcn, frcnp, fsrcnp)
257 struct denode *dep;
258 u_long findcn;
259 u_long *frcnp;
260 u_long *fsrcnp;
261{
262 int i;
263 u_long cn;

--- 308 unchanged lines hidden (view full) ---

572
573/*
574 * Check the length of a free cluster chain starting at start.
575 *
576 * pmp - mount point
577 * start - start of chain
578 * count - maximum interesting length
579 */
579int
580static int
580chainlength(pmp, start, count)
581 struct msdosfsmount *pmp;
582 u_long start;
583 u_long count;
584{
585 u_long idx, max_idx;
586 u_int map;
587 u_long len;

--- 29 unchanged lines hidden (view full) ---

617 * pmp - mount point.
618 * start - start of cluster chain.
619 * count - number of clusters to allocate.
620 * fillwith - put this value into the fat entry for the
621 * last allocated cluster.
622 * retcluster - put the first allocated cluster's number here.
623 * got - how many clusters were actually allocated.
624 */
581chainlength(pmp, start, count)
582 struct msdosfsmount *pmp;
583 u_long start;
584 u_long count;
585{
586 u_long idx, max_idx;
587 u_int map;
588 u_long len;

--- 29 unchanged lines hidden (view full) ---

618 * pmp - mount point.
619 * start - start of cluster chain.
620 * count - number of clusters to allocate.
621 * fillwith - put this value into the fat entry for the
622 * last allocated cluster.
623 * retcluster - put the first allocated cluster's number here.
624 * got - how many clusters were actually allocated.
625 */
625int
626static int
626chainalloc(pmp, start, count, fillwith, retcluster, got)
627 struct msdosfsmount *pmp;
628 u_long start;
629 u_long count;
630 u_long fillwith;
631 u_long *retcluster;
632 u_long *got;
633{

--- 351 unchanged lines hidden ---
627chainalloc(pmp, start, count, fillwith, retcluster, got)
628 struct msdosfsmount *pmp;
629 u_long start;
630 u_long count;
631 u_long fillwith;
632 u_long *retcluster;
633 u_long *got;
634{

--- 351 unchanged lines hidden ---