From d75f204b28cb3135261b939394bff5ad4151818f Mon Sep 17 00:00:00 2001 From: nyan Date: Thu, 27 Jan 2000 14:43:07 +0000 Subject: Supported non-512 bytes/sector format. PR: misc/12992 Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata) and Dmitrij Tejblum Reviewed by: Dmitrij Tejblum --- sys/fs/msdosfs/msdosfsmount.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys/fs/msdosfs/msdosfsmount.h') diff --git a/sys/fs/msdosfs/msdosfsmount.h b/sys/fs/msdosfs/msdosfsmount.h index 4b6ade1..59cc7c9 100644 --- a/sys/fs/msdosfs/msdosfsmount.h +++ b/sys/fs/msdosfs/msdosfsmount.h @@ -68,6 +68,7 @@ struct msdosfsmount { mode_t pm_mask; /* mask to and with file protection bits */ struct vnode *pm_devvp; /* vnode for block device mntd */ struct bpb50 pm_bpb; /* BIOS parameter blk for this fs */ + u_long pm_BlkPerSec; /* How many DEV_BSIZE blocks fit inside a physical sector */ u_long pm_FATsecs; /* actual number of fat sectors */ u_long pm_fatblk; /* block # of first FAT */ u_long pm_rootdirblk; /* block # (cluster # for FAT32) of root directory number */ @@ -190,6 +191,12 @@ struct msdosfsmount { ? roottobn((pmp), (dirofs)) \ : cntobn((pmp), (dirclu))) +/* + * Calculate fsinfo block size + */ +#define fsi_size(pmp) \ + (1024 << ((pmp)->pm_BlkPerSec >> 2)) + int msdosfs_init __P((struct vfsconf *vfsp)); int msdosfs_mountroot __P((void)); -- cgit v1.1