DataMuseum.dk

Presents historical artifacts from the history of:

Regnecentalen RC-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Regnecentalen RC-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦46671e1fd⟧ TextFile

    Length: 3385 (0xd39)
    Types: TextFile
    Notes: UNIX file
    Names: »dosfilsys.h«

Derivation

└─⟦a6ab2eb36⟧ Bits:30004042/kconfig3.imd SW95705I 386/ix Multi-user Release 1.2
└─⟦a6ab2eb36⟧ UNIX Filesystem
    └─⟦this⟧ »kc/new/usr/include/sys/fs/dosfilsys.h« 

TextFile

/*
 * Copyrighted as an unpublished work.
 * (c) Copyright 1987 INTERACTIVE Systems Corporation
 * All rights reserved.
 *
 * RESTRICTED RIGHTS
 *
 * These programs are supplied under a license.  They may be used,
 * disclosed, and/or copied only as permitted under such license
 * agreement.  Any copy must contain the above copyright notice and
 * this restricted rights notice.  Use, copying, and/or disclosure
 * of the programs is strictly prohibited unless otherwise provided
 * in the license agreement.
 *
 */

#ident "@(#)dosfilsys.h	1.2 - 87/07/31"
#ident "@(#) (c) Copyright INTERACTIVE Systems Corporation 1987"

/*
 * DOS file system super-block structure.
 * Contains information derived from the BIOS Parameter Block (BPB).
 *
 */

struct dosfilsys {
	unchar  s_flag;         /* Super block flags                    */

	/* the following are taken directly from the BPB                */
	ushort  s_sctrsz;       /* size of sector in bytes              */
	ushort  s_nrsrvd;       /* number of reserved sectors           */
	ushort  s_nrootdirent;  /* number of root directory entries     */
	ushort  s_nsctr;        /* number of sectors in logical volume  */
	ushort  s_fatsz;        /* FAT size in sectors                  */
	ushort  s_sctrpertrk;   /* sectors per track                    */
	ushort  s_nheads;       /* number of heads                      */
	ushort  s_nhidden;      /* number of hidden sectors             */
	unchar  s_sctrperclstr; /* sectors per cluster                  */
	unchar  s_nfat;         /* number of FATs                       */
	unchar  s_mediadscr;    /* media descriptor (FAT id byte)       */

	/* the following are derived from the BPB                       */
	unchar  s_writethru;    /* write through flag for floppies      */
	unchar  s_sctrshft;     /* bytes per sector shift               */
	unchar  s_sctrperclstrshft;     /* sectors per cluster shift    */
	unchar  s_clstrshft;    /* bytes per cluster shift              */
	unchar  s_sctrperbufshft;       /* sectors per buffer shft      */
	long    s_clstrsz;      /* bytes per cluster                    */
	ushort  s_rootdirstart; /* starting sector of root directory    */
	ushort  s_datastart;    /* starting sector of data/files area   */
	ushort  s_lastclstr;    /* last cluster in file flag in FAT     */
	ushort  s_nfatent;      /* number of entries in FAT             */

	/* other variables                                              */
	dev_t   s_dev;          /* device the superblock resides on     */
	long    s_tfree;        /* total free clusters                  */
};

/* Definition for the member "s_flag" */

#define SBLKFAT16       0001    /* FAT entries are 16 bits              */
#define SBLKFATLOCK     0002    /* FAT locked by process for write      */
#define SBLKFATWANT     0004    /* FAT wanted for exclusive access      */

/* Definitions for "dosalloc". NOTE: FAT_ALLOC is assumed if not others */

#define FAT_ALLOC       001     /* Allocate a cluster of the FAT        */
#define FAT_FREECNT     002     /* Count the free clusters in the FAT   */

extern struct dosfilsys dosfilsys[];    /* DOS fs super-block table     */
extern int ndosfilsys;                  /* size of table                */

#define getdosfs(mp)            ((struct dosfilsys *)(mp->m_bufp))
#define dosfatrelease(bp) \
{\
	if (bp != NULL) brelse(bp);\
}