Added some cosmetical fixes.
[reactos.git] / reactos / subsys / system / usetup / partlist.h
1 /*
2 * ReactOS kernel
3 * Copyright (C) 2002, 2003 ReactOS Team
4 *
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.
9 *
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.
14 *
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.
18 */
19 /* $Id: partlist.h,v 1.14 2003/08/05 20:39:24 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
25 */
26
27 #ifndef __PARTLIST_H__
28 #define __PARTLIST_H__
29
30
31 typedef struct _PARTENTRY
32 {
33 LIST_ENTRY ListEntry;
34
35 CHAR DriveLetter;
36 CHAR VolumeLabel[17];
37 CHAR FileSystemName[9];
38
39 /* Partition is unused disk space */
40 BOOLEAN Unpartitioned;
41
42 /* Partition is new. Table does not exist on disk yet */
43 BOOLEAN New;
44
45 /*
46 * Raw offset and length of the unpartitioned disk space.
47 * Includes the leading, not yet existing, partition table.
48 */
49 ULONGLONG UnpartitionedOffset;
50 ULONGLONG UnpartitionedLength;
51
52 PARTITION_INFORMATION PartInfo[4];
53
54 } PARTENTRY, *PPARTENTRY;
55
56
57 typedef struct _DISKENTRY
58 {
59 LIST_ENTRY ListEntry;
60
61 ULONGLONG Cylinders;
62 ULONGLONG TracksPerCylinder;
63 ULONGLONG SectorsPerTrack;
64 ULONGLONG BytesPerSector;
65
66 ULONGLONG DiskSize;
67 ULONGLONG CylinderSize;
68 ULONGLONG TrackSize;
69
70 ULONG DiskNumber;
71 USHORT Port;
72 USHORT Bus;
73 USHORT Id;
74
75 UNICODE_STRING DriverName;
76
77 LIST_ENTRY PartListHead;
78
79 } DISKENTRY, *PDISKENTRY;
80
81
82 typedef struct _PARTLIST
83 {
84 SHORT Left;
85 SHORT Top;
86 SHORT Right;
87 SHORT Bottom;
88
89 SHORT Line;
90
91 ULONG TopDisk;
92 ULONG TopPartition;
93
94 PDISKENTRY CurrentDisk;
95 PPARTENTRY CurrentPartition;
96
97 #if 0
98 /* Not used yet! */
99 PDISKENTRY ActiveBootDisk;
100 PPARTENTRY ActiveBootPartition;
101 #endif
102
103 LIST_ENTRY DiskListHead;
104
105 } PARTLIST, *PPARTLIST;
106
107
108
109 PPARTLIST
110 CreatePartitionList(SHORT Left,
111 SHORT Top,
112 SHORT Right,
113 SHORT Bottom);
114
115 VOID
116 DestroyPartitionList(PPARTLIST List);
117
118 VOID
119 DrawPartitionList(PPARTLIST List);
120
121 VOID
122 ScrollDownPartitionList(PPARTLIST List);
123
124 VOID
125 ScrollUpPartitionList(PPARTLIST List);
126
127 VOID
128 GetActiveBootPartition(PPARTLIST List,
129 PDISKENTRY *DiskEntry,
130 PPARTENTRY *PartEntry);
131
132 BOOLEAN
133 CreateSelectedPartition(PPARTLIST List,
134 ULONG PartType,
135 ULONGLONG NewPartSize);
136
137 BOOLEAN
138 DeleteSelectedPartition(PPARTLIST List);
139
140 #if 0
141 BOOLEAN
142 MarkPartitionActive(ULONG DiskNumber,
143 ULONG PartitionNumber,
144 PPARTDATA ActivePartition);
145 #endif
146
147 #endif /* __PARTLIST_H__ */
148
149 /* EOF */