⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lilo.h

📁 LINUX lilo-22.7 源代码。
💻 H
📖 第 1 页 / 共 2 页
字号:
/* lilo.h  -  LILO constantsCopyright 1992-1998 Werner Almesberger.Copyright 1999-2004 John Coffman.All rights reserved.Licensed under the terms contained in the file 'COPYING' in the source directory.*//* This file is also included by the boot loader assembler code. Put   everything that isn't legal C syntax or isn't swallowed by the   preprocessor into #ifdef LILO_ASM ... #endif */#ifndef LILO_H#define LILO_H#if !__MSDOS__#define INT4 int#else#define INT4 long#endif /* !__MSDOS__ *//* This is the stuff to check the configuration: */#if defined(LCF_READONLY) && defined(LCF_REWRITE_TABLE)#error "Incompatible Makefile options: READONLY and REWRITE_TABLE"#endif/* * Starting with 2.1.something, Linux kernels put VGA constants and segment * definitions into asm/boot.h instead of linux/config.h */#if 0#ifdef HAS_BOOT_H#include <asm/boot.h>#else#include <linux/config.h>#endif#else/* Don't touch these, unless you really know what you're doing. */#define DEF_INITSEG	0x9000#define DEF_SYSSEG	0x1000#define DEF_SETUPSEG	0x9020#define DEF_SYSSIZE	0x7F00/* Internal svga startup constants */#define NORMAL_VGA	0xffff		/* 80x25 mode */#define EXTENDED_VGA	0xfffe		/* 80x50 mode */#define ASK_VGA		0xfffd		/* ask for it at bootup */#endif#if defined(HAS_VERSION_H) && !__MSDOS__#include <linux/version.h>#endif /* !__MSDOS__ */#ifndef LINUX_VERSION_CODE#define LINUX_VERSION_CODE 0#endif#ifndef KERNEL_VERSION#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))#endif#define nelem(a) (sizeof(a)/sizeof((a)[0]))#define S2(x) #x#define S(x) S2(x)#include "version.h"#define VERSION 256*VERSION_MINOR+VERSION_MAJOR#if VERSION_MINOR >= 50# define BETA_TEST 1#else# define BETA_TEST 0#endif/* definitions for pf_hard_disk_scan in device.c  */#if VERSION_MINOR>50 && DEBUG#define PARTITIONS "./devfs_partitions"#else#define PARTITIONS "/proc/partitions"#endif/* the known major device numbers */#define MAJMIN_RAM	0x101 /* RAM disk */#define MAJOR_FD	2 /* floppy disks */#define MAJOR_HPT370_SORT  MAJOR_FD	/* 114->2 for sorting HPT370 controller */#define MAJOR_HD	3 /* IDE-type hard disks */#define MAJOR_LOOP	7 /* Loopback devices 0-15 */#define MAJOR_SD	8 /* SCSI disks 0-15 */#define MAJOR_MD	9 /* multi-disk RAID sets */#define MAJOR_XT	13 /* XT-type hard disks */#define MAJOR_ACORN	21 /* Acorn MFM controller */#define MAJOR_IDE2	22 /* IDE on second interface */#define MAJOR_IDE3	33 /* IDE on third interface */#define MAJOR_IDE4	34 /* IDE on fourth interface */#define MAJOR_ESDI	36 /* PS/2 ESDI drives */#define MAJOR_FTL	44 /* Flash Transition Layer on Memory Technology Device */#define MAJOR_PP	45 /* Parallel Port IDE drive */#define MAJOR_PPFD	47 /* Parallel Port floppy drive */#define MAJOR_DAC960	48 /* First Mylex DAC960 PCI RAID controller */#if !BETA_TEST || 1#define MAJOR_IDE5	56 /* IDE on fifth interface */#endif#define MAJOR_IDE6	57 /* IDE on sixth interface */#define MAJOR_LVM	58 /* Logical Volume Manager block device */#define MAJOR_EXPR	60 /* Experimental devices 60..63 *//*#define MAJOR_FL	62 / M-Systems Disk-On-Chip 2000 ***experimental*** */#define MAJOR_SD_SORT	64 /*** MAJOR_SD converted to this for sorting ***/#define MAJOR_SD2	65 /* SCSI disks 16-31 */#define MAJOR_SD3	66 /* SCSI disks 32-47 */#define MAJOR_SD4	67 /* SCSI disks 48-63 */#define MAJOR_SD5	68 /* SCSI disks 64-79 */#define MAJOR_SD6	69 /* SCSI disks 80-95 */#define MAJOR_SD7	70 /* SCSI disks 96-111 */#define MAJOR_SD8	71 /* SCSI disks 112-127 */#define MAJOR_SMART2	72 /* First Compaq Smart/2 Major 72-79 */#define MAJOR_I2O	80  /* First I2O block device 80-87 */#define MAJOR_IDE7	88 /* IDE on seventh interface */#define MAJOR_IDE8	89 /* IDE on eighth interface */#define MAJOR_IDE9	90 /* IDE on ninth interface */#define MAJOR_IDE10	91 /* IDE on tenth interface */#define MAJOR_PPDD	92 /* PPDD encrypted disks - not supported */#define MAJOR_NFTL	93 /* NAND Flash Translation Layer (Disk-On-Chip) */#define MAJOR_DOC	100 /* Disk-On-Chip driver */#define MAJOR_AMI_HYP	101 /* AMI Hyper Disk RAID controller */#define MAJOR_CISS	104 /* First CCISS Major 104-111 */#define MAJOR_IBM_iSER	112 /* IBM iSeries virtual disk */#define MAJOR_HPT370	114 /* HPT370 controller */#define MAJOR_EVMS	117 /* Enterprise Volume Management System */#define MAJOR_SD9	128 /* SCSI disks 129     */#define MAJOR_SD16	135 /* SCSI disks    -255 */#define MAJOR_DAC960_8	136 /* Ninth Mylex DAC960 PCI RAID controller */#define MAJOR_EMD	153 /* Enhanced multi-disk RAID sets */#define MAJOR_SATA	160 /* Carmel SATA Disk on first 8-port controller */#define MAJOR_SATA2	161 /* Carmel SATA Disk on 2nd 8-port controller */#define MAX_TOKEN	1023 /* max device Token length */#define MAX_IMAGE_NAME	15 /* maximum name length (w/o terminating NUL) */#define MAX_DESCR_SECTORS  12  /* upper limit on MAX_DESCR_SECS */#ifdef LCF_PASS160#undef SHS_PASSWORDS#define SHS_PASSWORDS		/* use this one if SHS passwords are in use */#define MAX_PW_CRC	5  	/* max # of longwords in password digest */#define PW_FILE_SUFFIX ".shs"  	/* suffix for the file that saves password digest */#else#define CRC_PASSWORDS		/* use this one if CRC passwords are in use */#define MAX_PW_CRC	2  	/* max # of CRC-32's in password */#define PW_FILE_SUFFIX ".crc"  	/* suffix for the file that saves password CRC's */#endif#ifdef LCF_DSECS#define MAX_DESCR_SECS LCF_DSECS#else#define MAX_DESCR_SECS 2	/* maximum # of descriptor sectors */#endif#if MAX_DESCR_SECS > MAX_DESCR_SECTORS# error "Maximum DSECS=x exceeded."#endif#define MAX_IMAGES      ((int)((SECTOR_SIZE*MAX_DESCR_SECS-sizeof(INT4)-1)/sizeof(IMAGE_DESCR)))			  /* maximum number of images */#define COMMAND_LINE_SIZE	256	/* CL_LENGTH */#define SECTOR_SIZE	512 /* disk sector size */#ifndef BLOCK_SIZE /* may also come from linux/fs.h */#define BLOCK_SIZE	1024 /* disk block size */#endif#define PARTITION_ENTRY	   16	/* size of one partition entry */#define PARTITION_ENTRIES  4    /* number of partition entries */#define PART_TABLE_SIZE    (PARTITION_ENTRY*PARTITION_ENTRIES)#define PART_TABLE_OFFSET  0x1be /* offset in the master boot sector */#define PART_ACT_ENT_OFF   0	/* offset in entry for active flag */#define PART_TYPE_ENT_OFF  4	/* offset in entry for partition type */#define P_MASK(x) ((~has_partitions(x))&0xFFFF)#define D_MASK(x) (has_partitions(x))#define PART_MAX PARTITION_ENTRIES /* biggest primary partition number */#define PART_MAX_MAX	63	/* max. partition number (on IDE disks) */#define MAX_BOOT_SIZE	0x1b6	/* (leave some space for NT's and DR DOS' dirty				   hacks) scream if the boot sector gets any				   bigger -- (22.5 - we now use those hacks) */#define BOOT_SIGNATURE	0xAA55	/* boot signature */#define BOOT_SIG_OFFSET	510	/* boot signature offset */#define MAGIC_SERIAL	0xC9CF	/* LILO installed serial number */#define PRIME		271	/* prime number used for serial no generation */#define SMALL_PRIME     17	/* another prime, but a small one */#if VERSION_MINOR>90#define MAX_BIOS_DEVICES  2	/* max hard disk devices used by BIOS */#define MAX_DEVICES	4	/* max hard disk devices, total */#else#define MAX_BIOS_DEVICES  16	/* max hard disk devices used by BIOS */#define MAX_DEVICES	64	/* max hard disk devices, total */#endif#define MAX_RAID	30	/* max number of RAID disks in a set */#if 0#define MAX_RAID_DEVICES  6	/* max raid devices reported to second.S */#else#define MAX_RAID_DEVICES MAX_DESCR_SECTORS-MAX_DESCR_SECS+6	/* max raid devices reported to second.S */#endif#define PART_LINUX_MINIX  0x81	/* Linux/MINIX partition */#define PART_LINUX_SWAP	  0x82	/* Linux swap partition */#define PART_LINUX_NATIVE 0x83	/* Linux native (file system) */#define PART_DOS_EXTD 	  5	/* DOS Extended partition */#define PART_WIN_EXTD_LBA 0xF	/* Win95/98 Extended partition */#define PART_LINUX_EXTD   0x85	/* Linux Extended partition */#define PART_OS2_BOOTMGR  0xA	/* OS/2 Boot Manager */#define PART_DOS12	  1	/* DOS 12 bit FAT partition type */#define PART_DOS16_SMALL  4	/* DOS 16 bit FAT partition type, < 32 MB */#define PART_DOS16_BIG	  6	/* DOS 16 bit FAT partition type, >= 32 MB */#define PART_HPFS	  7	/* OS/2 High Performance File System */#define PART_NTFS	  7	/* WinNT File System */#define PART_FAT32	  0xB	/* Win95/98 FAT32 partition on small disk */#define PART_FAT32_LBA	  0xC	/* Win95/98 FAT32 partition on large disk */#define PART_FAT16_LBA	  0xE	/* Win95/98 FAT16 partition on large disk */#define PART_INVALID	  98	/* invalid partition type */#define HIDDEN_OFF	0x10	/* type offset to hide partition (OS/2 BM) */#define PART_HDOS12	PART_DOS12+HIDDEN_OFF#define PART_HDOS16_SMALL PART_DOS16_SMALL+HIDDEN_OFF#define PART_HDOS16_BIG	PART_DOS16_BIG+HIDDEN_OFF#define STAGE_FIRST	1	/* first stage loader code */#define STAGE_SECOND	2	/* second stage loader code */#define	STAGE_CHAIN	0x10	/* chain loader code */#define STAGE_DRIVE_MAP	0x11	/* chain loader drive mapper */#define STAGE_MBR	0x12	/* mbr loader */#define STAGE_MBR2	0x13	/* mbr2 loader (extended) */#define STAGE_FLAG_SERIAL  0x0100	/* boot loader supports serial i/o */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -