3 * Copyright (C) 2002, 2003 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 /* $Id: partlist.h,v 1.21 2003/08/25 11:56:07 ekohl Exp $
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS text-mode setup
22 * FILE: subsys/system/usetup/partlist.h
23 * PURPOSE: Partition list functions
24 * PROGRAMMER: Eric Kohl
27 #ifndef __PARTLIST_H__
28 #define __PARTLIST_H__
30 typedef enum _FORMATSTATE
37 } FORMATSTATE
, *PFORMATSTATE
;
40 typedef struct _PARTENTRY
46 CHAR FileSystemName
[9];
48 /* Partition is unused disk space */
49 BOOLEAN Unpartitioned
;
51 /* Partition is new. Table does not exist on disk yet */
54 /* Partition was created automatically. */
57 FORMATSTATE FormatState
;
60 * Raw offset and length of the unpartitioned disk space.
61 * Includes the leading, not yet existing, partition table.
63 ULONGLONG UnpartitionedOffset
;
64 ULONGLONG UnpartitionedLength
;
66 PARTITION_INFORMATION PartInfo
[4];
68 } PARTENTRY
, *PPARTENTRY
;
71 typedef struct _DISKENTRY
76 ULONGLONG TracksPerCylinder
;
77 ULONGLONG SectorsPerTrack
;
78 ULONGLONG BytesPerSector
;
81 ULONGLONG CylinderSize
;
89 /* Has the partition list been modified? */
94 UNICODE_STRING DriverName
;
96 LIST_ENTRY PartListHead
;
98 } DISKENTRY
, *PDISKENTRY
;
101 typedef struct _PARTLIST
113 PDISKENTRY CurrentDisk
;
114 PPARTENTRY CurrentPartition
;
116 PDISKENTRY ActiveBootDisk
;
117 PPARTENTRY ActiveBootPartition
;
119 LIST_ENTRY DiskListHead
;
121 } PARTLIST
, *PPARTLIST
;
126 CreatePartitionList (SHORT Left
,
132 DestroyPartitionList (PPARTLIST List
);
135 DrawPartitionList (PPARTLIST List
);
138 ScrollDownPartitionList (PPARTLIST List
);
141 ScrollUpPartitionList (PPARTLIST List
);
144 CreateNewPartition (PPARTLIST List
,
145 ULONGLONG PartitionSize
,
149 DeleteCurrentPartition (PPARTLIST List
);
152 CheckActiveBootPartition (PPARTLIST List
);
155 CheckForLinuxFdiskPartitions (PPARTLIST List
);
158 WritePartitionsToDisk (PPARTLIST List
);
160 #endif /* __PARTLIST_H__ */