|
|
1.1 ! root 1: /* ! 2: * Mach Operating System ! 3: * Copyright (c) 1991,1990 Carnegie Mellon University ! 4: * All Rights Reserved. ! 5: * ! 6: * Permission to use, copy, modify and distribute this software and its ! 7: * documentation is hereby granted, provided that both the copyright ! 8: * notice and this permission notice appear in all copies of the ! 9: * software, derivative works or modified versions, and any portions ! 10: * thereof, and that both notices appear in supporting documentation. ! 11: * ! 12: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" ! 13: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR ! 14: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. ! 15: * ! 16: * Carnegie Mellon requests users of this software to return to ! 17: * ! 18: * Software Distribution Coordinator or [email protected] ! 19: * School of Computer Science ! 20: * Carnegie Mellon University ! 21: * Pittsburgh PA 15213-3890 ! 22: * ! 23: * any improvements or extensions that they make and grant Carnegie Mellon ! 24: * the rights to redistribute these changes. ! 25: */ ! 26: /* ! 27: * Common definitions for Berkeley Fast File System. ! 28: */ ! 29: ! 30: /* ! 31: * Compatibility definitions for disk IO. ! 32: */ ! 33: ! 34: /* ! 35: * Disk devices do all IO in 512-byte blocks. ! 36: */ ! 37: #define DEV_BSIZE 512 ! 38: ! 39: /* ! 40: * Conversion between bytes and disk blocks. ! 41: */ ! 42: #define btodb(byte_offset) ((byte_offset) >> 9) ! 43: #define dbtob(block_number) ((block_number) << 9) ! 44: ! 45: typedef struct _quad_ ! 46: { ! 47: unsigned int val[2]; /* 2 int values make... */ ! 48: } ! 49: quad; /* an 8-byte item */ ! 50: ! 51: typedef unsigned int mach_time_t; /* an unsigned int */ ! 52: typedef unsigned int mach_daddr_t; /* an unsigned int */ ! 53: typedef unsigned int mach_off_t; /* another unsigned int */ ! 54: ! 55: typedef unsigned short mach_uid_t; ! 56: typedef unsigned short mach_gid_t; ! 57: typedef unsigned int mach_ino_t; ! 58: ! 59: #define NBBY 8 ! 60: ! 61: /* ! 62: * The file system is made out of blocks of at most MAXBSIZE units, ! 63: * with smaller units (fragments) only in the last direct block. ! 64: * MAXBSIZE primarily determines the size of buffers in the buffer ! 65: * pool. It may be made larger without any effect on existing ! 66: * file systems; however, making it smaller may make some file ! 67: * systems unmountable. ! 68: * ! 69: * Note that the disk devices are assumed to have DEV_BSIZE "sectors" ! 70: * and that fragments must be some multiple of this size. ! 71: */ ! 72: #define MAXBSIZE 8192 ! 73: #define MAXFRAG 8 ! 74: ! 75: /* ! 76: * MAXPATHLEN defines the longest permissible path length ! 77: * after expanding symbolic links. ! 78: * ! 79: * MAXSYMLINKS defines the maximum number of symbolic links ! 80: * that may be expanded in a path name. It should be set ! 81: * high enough to allow all legitimate uses, but halt infinite ! 82: * loops reasonably quickly. ! 83: */ ! 84: ! 85: #define MAXPATHLEN 1024 ! 86: #define MAXSYMLINKS 8
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.