Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenpartlist.h
Go to the documentation of this file.
00001 /* 00002 * ReactOS kernel 00003 * Copyright (C) 2002, 2003 ReactOS Team 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along 00016 * with this program; if not, write to the Free Software Foundation, Inc., 00017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 */ 00019 /* COPYRIGHT: See COPYING in the top level directory 00020 * PROJECT: ReactOS text-mode setup 00021 * FILE: subsys/system/usetup/partlist.h 00022 * PURPOSE: Partition list functions 00023 * PROGRAMMER: Eric Kohl 00024 */ 00025 00026 #pragma once 00027 00028 /* We have to define it there, because it is not in the MS DDK */ 00029 #define PARTITION_EXT2 0x83 00030 00031 typedef enum _FORMATSTATE 00032 { 00033 Unformatted, 00034 UnformattedOrDamaged, 00035 UnknownFormat, 00036 Preformatted, 00037 Formatted 00038 } FORMATSTATE, *PFORMATSTATE; 00039 00040 00041 typedef struct _PARTENTRY 00042 { 00043 LIST_ENTRY ListEntry; 00044 00045 CHAR DriveLetter[4]; 00046 CHAR VolumeLabel[17]; 00047 CHAR FileSystemName[9]; 00048 00049 /* Partition is unused disk space */ 00050 BOOLEAN Unpartitioned; 00051 00052 /* Partition is new. Table does not exist on disk yet */ 00053 BOOLEAN New; 00054 00055 /* Partition was created automatically. */ 00056 BOOLEAN AutoCreate; 00057 00058 FORMATSTATE FormatState; 00059 00060 /* 00061 * Raw offset and length of the unpartitioned disk space. 00062 * Includes the leading, not yet existing, partition table. 00063 */ 00064 ULONGLONG UnpartitionedOffset; 00065 ULONGLONG UnpartitionedLength; 00066 00067 PARTITION_INFORMATION PartInfo[4]; 00068 00069 } PARTENTRY, *PPARTENTRY; 00070 00071 00072 typedef struct _BIOSDISKENTRY 00073 { 00074 LIST_ENTRY ListEntry; 00075 ULONG DiskNumber; 00076 ULONG Signature; 00077 ULONG Checksum; 00078 BOOLEAN Recognized; 00079 CM_DISK_GEOMETRY_DEVICE_DATA DiskGeometry; 00080 CM_INT13_DRIVE_PARAMETER Int13DiskData; 00081 } BIOSDISKENTRY, *PBIOSDISKENTRY; 00082 00083 00084 typedef struct _DISKENTRY 00085 { 00086 LIST_ENTRY ListEntry; 00087 00088 ULONGLONG Cylinders; 00089 ULONGLONG TracksPerCylinder; 00090 ULONGLONG SectorsPerTrack; 00091 ULONGLONG BytesPerSector; 00092 00093 ULONGLONG DiskSize; 00094 ULONGLONG CylinderSize; 00095 ULONGLONG TrackSize; 00096 00097 BOOLEAN BiosFound; 00098 ULONG BiosDiskNumber; 00099 ULONG Signature; 00100 ULONG Checksum; 00101 00102 ULONG DiskNumber; 00103 USHORT Port; 00104 USHORT Bus; 00105 USHORT Id; 00106 00107 /* Has the partition list been modified? */ 00108 BOOLEAN Modified; 00109 00110 BOOLEAN NewDisk; 00111 BOOLEAN NoMbr; /* MBR is absent */ 00112 00113 UNICODE_STRING DriverName; 00114 00115 LIST_ENTRY PartListHead; 00116 00117 } DISKENTRY, *PDISKENTRY; 00118 00119 00120 typedef struct _PARTLIST 00121 { 00122 SHORT Left; 00123 SHORT Top; 00124 SHORT Right; 00125 SHORT Bottom; 00126 00127 SHORT Line; 00128 SHORT Offset; 00129 00130 ULONG TopDisk; 00131 ULONG TopPartition; 00132 00133 PDISKENTRY CurrentDisk; 00134 PPARTENTRY CurrentPartition; 00135 UCHAR CurrentPartitionNumber; 00136 00137 PDISKENTRY ActiveBootDisk; 00138 PPARTENTRY ActiveBootPartition; 00139 UCHAR ActiveBootPartitionNumber; 00140 00141 LIST_ENTRY DiskListHead; 00142 LIST_ENTRY BiosDiskListHead; 00143 00144 } PARTLIST, *PPARTLIST; 00145 00146 #define PARTITION_TBL_SIZE 4 00147 00148 #include <pshpack1.h> 00149 00150 typedef struct _PARTITION 00151 { 00152 unsigned char BootFlags; /* bootable? 0=no, 128=yes */ 00153 unsigned char StartingHead; /* beginning head number */ 00154 unsigned char StartingSector; /* beginning sector number */ 00155 unsigned char StartingCylinder; /* 10 bit nmbr, with high 2 bits put in begsect */ 00156 unsigned char PartitionType; /* Operating System type indicator code */ 00157 unsigned char EndingHead; /* ending head number */ 00158 unsigned char EndingSector; /* ending sector number */ 00159 unsigned char EndingCylinder; /* also a 10 bit nmbr, with same high 2 bit trick */ 00160 unsigned int StartingBlock; /* first sector relative to start of disk */ 00161 unsigned int SectorCount; /* number of sectors in partition */ 00162 } PARTITION, *PPARTITION; 00163 00164 typedef struct _PARTITION_SECTOR 00165 { 00166 UCHAR BootCode[440]; /* 0x000 */ 00167 ULONG Signature; /* 0x1B8 */ 00168 UCHAR Reserved[2]; /* 0x1BC */ 00169 PARTITION Partition[PARTITION_TBL_SIZE]; /* 0x1BE */ 00170 USHORT Magic; /* 0x1FE */ 00171 } PARTITION_SECTOR, *PPARTITION_SECTOR; 00172 00173 #include <poppack.h> 00174 00175 typedef struct 00176 { 00177 LIST_ENTRY ListEntry; 00178 ULONG DiskNumber; 00179 ULONG Idendifier; 00180 ULONG Signature; 00181 } BIOS_DISK, *PBIOS_DISK; 00182 00183 PPARTLIST 00184 CreatePartitionList (SHORT Left, 00185 SHORT Top, 00186 SHORT Right, 00187 SHORT Bottom); 00188 00189 VOID 00190 DestroyPartitionList (PPARTLIST List); 00191 00192 VOID 00193 DrawPartitionList (PPARTLIST List); 00194 00195 DWORD 00196 SelectPartition(PPARTLIST List, ULONG DiskNumber, ULONG PartitionNumber); 00197 00198 BOOL 00199 SetMountedDeviceValues(PPARTLIST List); 00200 00201 VOID 00202 ScrollDownPartitionList (PPARTLIST List); 00203 00204 VOID 00205 ScrollUpPartitionList (PPARTLIST List); 00206 00207 VOID 00208 CreateNewPartition (PPARTLIST List, 00209 ULONGLONG PartitionSize, 00210 BOOLEAN AutoCreate); 00211 00212 VOID 00213 DeleteCurrentPartition (PPARTLIST List); 00214 00215 VOID 00216 CheckActiveBootPartition (PPARTLIST List); 00217 00218 BOOLEAN 00219 CheckForLinuxFdiskPartitions (PPARTLIST List); 00220 00221 BOOLEAN 00222 WritePartitionsToDisk (PPARTLIST List); 00223 00224 /* EOF */ Generated on Sun May 27 2012 04:18:08 for ReactOS by
1.7.6.1
|