*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: worm | Section: 5 | Source: UNIX v10 | File: worm.5
WORM(5) File Formats Manual WORM(5) NAME worm - format of worm disks SYNOPSIS #include <worm.h> DESCRIPTION A WORM disk is a linked list of `superblocks', roughly one for every worm write on the WORM. The `governing' superblock is at block zero if it exists and has a valid magic number; otherwise the governing su- perblock is the last superblock in the linked list starting at block 1. (The link to the next superblock is preallocated and thus the last su- perblock in the list will be unwritten.) Each superblock has some sta- tus information and a pointer to a set of `inodes' describing a set of files. The status information for the WORM is that of the governing superblock; the set of files on the WORM is the accumulation of all the superblocks taken in order. The structure of a superblock as given in the include file is: #define SMAGIC 0x21746967 #define VLINK 1 /* linked list superblock */ #define VBTREE 2 /* cbt superblock */ typedef struct superblock { long magic; /* magic number for superblock */ unsigned short blocksize; /* physical size of blocks */ short version; /* type of superblock */ long nblocks; /* number of blocks on device */ long zero; /* first logical data block */ long nfree; /* number of free blocks */ long ninodes; /* number of inodes */ long ninochars; /* number of bytes of inode names */ long binodes; /* start of inodes */ long nextffree; /* next free file block */ long nextsb; /* next superblock */ short fd; /* fildes for device (in core) */ char vol_id[128]; /* name the disk can be mounted as */ char comment[128]; /* comments */ long myblock; /* where this superblock is */ long nF; /* bytes for .F (VBTREE) */ long nT; /* bytes for .T (VBTREE) */ long ctime; /* create time for this superblock */ } superblock; superblocks are padded with zeros to blocksize. Following each VLINK superblock is a set of inodes, a string table, and then the data blocks for the files described by the inodes. Following a (there is at most one) VBTREE superblock there is a set of inodes, a string table and the .F and .T files for a cbt(1) database where the keys are filenames and the data is an inode number. #define DMAGIC 0x3A746967 typedef struct Inode { long magic; /* magic number for Dirent */ long block; /* starting block of file */ long nbytes; /* bytes in file */ long ctime; /* creation time */ union { char *n; /* core - name */ long o; /* disk - offset into chars block */ } name; /* filename */ long pad1 /* to 32 bytes */ short mode /* as in stat(2) */ short uid /* owner */ short gid /* owner */ short pad2 /* to 32 bytes */ } Inode If the block field of an inode is negative, the file has been deleted. SEE ALSO worm(8) WORM(5)

Navigation Options