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.19 2003/08/19 15:54:47 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__
31 typedef struct _PARTENTRY
37 CHAR FileSystemName
[9];
39 /* Partition is unused disk space */
40 BOOLEAN Unpartitioned
;
42 /* Partition is new. Table does not exist on disk yet */
45 /* Partition was created automatically. */
49 * Raw offset and length of the unpartitioned disk space.
50 * Includes the leading, not yet existing, partition table.
52 ULONGLONG UnpartitionedOffset
;
53 ULONGLONG UnpartitionedLength
;
55 PARTITION_INFORMATION PartInfo
[4];
57 } PARTENTRY
, *PPARTENTRY
;
60 typedef struct _DISKENTRY
65 ULONGLONG TracksPerCylinder
;
66 ULONGLONG SectorsPerTrack
;
67 ULONGLONG BytesPerSector
;
70 ULONGLONG CylinderSize
;
81 /* Has the partition list been modified? */
86 UNICODE_STRING DriverName
;
88 LIST_ENTRY PartListHead
;
90 } DISKENTRY
, *PDISKENTRY
;
93 typedef struct _PARTLIST
105 PDISKENTRY CurrentDisk
;
106 PPARTENTRY CurrentPartition
;
108 PDISKENTRY ActiveBootDisk
;
109 PPARTENTRY ActiveBootPartition
;
111 LIST_ENTRY DiskListHead
;
113 } PARTLIST
, *PPARTLIST
;
118 CreatePartitionList (SHORT Left
,
124 DestroyPartitionList (PPARTLIST List
);
127 DrawPartitionList (PPARTLIST List
);
130 ScrollDownPartitionList (PPARTLIST List
);
133 ScrollUpPartitionList (PPARTLIST List
);
136 CreateNewPartition (PPARTLIST List
,
137 ULONGLONG PartitionSize
,
141 DeleteCurrentPartition (PPARTLIST List
);
144 CheckActiveBootPartition (PPARTLIST List
);
147 WritePartitionsToDisk (PPARTLIST List
);
149 #endif /* __PARTLIST_H__ */