2002-10-18 20:04:00 +00:00
|
|
|
/*
|
2002-10-29 18:40:02 +00:00
|
|
|
* ReactOS kernel
|
2003-08-04 15:54:05 +00:00
|
|
|
* Copyright (C) 2002, 2003 ReactOS Team
|
2002-10-29 18:40:02 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
2003-08-18 17:39:26 +00:00
|
|
|
/* $Id: partlist.h,v 1.18 2003/08/18 17:39:26 ekohl Exp $
|
2002-10-29 18:40:02 +00:00
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS text-mode setup
|
|
|
|
* FILE: subsys/system/usetup/partlist.h
|
|
|
|
* PURPOSE: Partition list functions
|
|
|
|
* PROGRAMMER: Eric Kohl
|
2002-10-18 20:04:00 +00:00
|
|
|
*/
|
|
|
|
|
2002-10-29 18:40:02 +00:00
|
|
|
#ifndef __PARTLIST_H__
|
|
|
|
#define __PARTLIST_H__
|
2002-10-18 20:04:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
typedef struct _PARTENTRY
|
|
|
|
{
|
2003-08-03 12:20:22 +00:00
|
|
|
LIST_ENTRY ListEntry;
|
2002-11-02 23:17:06 +00:00
|
|
|
|
2002-10-29 18:40:02 +00:00
|
|
|
CHAR DriveLetter;
|
2002-11-13 18:25:18 +00:00
|
|
|
CHAR VolumeLabel[17];
|
|
|
|
CHAR FileSystemName[9];
|
|
|
|
|
2003-08-05 20:39:24 +00:00
|
|
|
/* Partition is unused disk space */
|
2003-08-03 12:20:22 +00:00
|
|
|
BOOLEAN Unpartitioned;
|
|
|
|
|
2003-08-05 20:39:24 +00:00
|
|
|
/* Partition is new. Table does not exist on disk yet */
|
|
|
|
BOOLEAN New;
|
|
|
|
|
2003-08-09 16:32:26 +00:00
|
|
|
/* Partition was created automatically. */
|
|
|
|
BOOLEAN AutoCreate;
|
|
|
|
|
2003-08-03 12:20:22 +00:00
|
|
|
/*
|
|
|
|
* Raw offset and length of the unpartitioned disk space.
|
|
|
|
* Includes the leading, not yet existing, partition table.
|
|
|
|
*/
|
|
|
|
ULONGLONG UnpartitionedOffset;
|
|
|
|
ULONGLONG UnpartitionedLength;
|
2002-11-13 18:25:18 +00:00
|
|
|
|
2003-08-03 12:20:22 +00:00
|
|
|
PARTITION_INFORMATION PartInfo[4];
|
2003-04-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* subsys/system/usetup/partlist.c (AddPartitionList): Create
unpartitioned areas.
(CreatePartitionListNoGUI): Save disk geometry.
(PrintDiskData): Do not print hidden partition list entries.
(ScrollDownPartitionList, ScrollUpPartitionList): Skip hidden partition
list entries.
(GetActiveBootPartition): Use CurrentDisk as index.
(CreateSelectedPartition): New function.
* subsys/system/usetup/partlist.h (PARTDATA): Add field NewPartSize.
(PARTENTRY): Add fields StartingOffset and HidePartEntry.
(DISKENTRY): Add fields Cylinders, TracksPerCylinder, SectorsPerTrack,
and BytesPerSector;
(CreateSelectedPartition): Add Prototype.
* subsys/system/usetup/usetup.c (PAGE_NUMBER): Add CREATE_PARTITION_PAGE
and FORMAT_PARTITION_PAGE
(CurrentPartitionList, CurrentFileSystemList): New globals.
(SelectPartitionPage): Set CurrentPartitionList.
(PARTITION_SIZE_INPUT_FIELD_LENGTH): Define as 6.
(DrawInputField, ShowPartitionSizeInputBox, CreatePartitionPage,
CreateFileSystemList, DestroyFileSystemList, DrawFileSystemList,
ScrollDownFileSystemList, ScrollUpFileSystemList, FormatPartitionPage):
New functions.
(SelectFileSystemPage): Draw partition screen.
(CheckFileSystemPage): Handle CREATE_PARTITION_PAGE and
FORMAT_PARTITION_PAGE.
* subsys/system/usetup/usetup.h (FILE_SYSTEM, FILE_SYSTEM_LIST): Add enums.
svn path=/trunk/; revision=4552
2003-04-18 14:00:17 +00:00
|
|
|
|
2002-10-18 20:04:00 +00:00
|
|
|
} PARTENTRY, *PPARTENTRY;
|
|
|
|
|
2003-08-02 16:49:36 +00:00
|
|
|
|
2002-10-18 20:04:00 +00:00
|
|
|
typedef struct _DISKENTRY
|
|
|
|
{
|
2003-08-02 16:49:36 +00:00
|
|
|
LIST_ENTRY ListEntry;
|
|
|
|
|
2003-04-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* subsys/system/usetup/partlist.c (AddPartitionList): Create
unpartitioned areas.
(CreatePartitionListNoGUI): Save disk geometry.
(PrintDiskData): Do not print hidden partition list entries.
(ScrollDownPartitionList, ScrollUpPartitionList): Skip hidden partition
list entries.
(GetActiveBootPartition): Use CurrentDisk as index.
(CreateSelectedPartition): New function.
* subsys/system/usetup/partlist.h (PARTDATA): Add field NewPartSize.
(PARTENTRY): Add fields StartingOffset and HidePartEntry.
(DISKENTRY): Add fields Cylinders, TracksPerCylinder, SectorsPerTrack,
and BytesPerSector;
(CreateSelectedPartition): Add Prototype.
* subsys/system/usetup/usetup.c (PAGE_NUMBER): Add CREATE_PARTITION_PAGE
and FORMAT_PARTITION_PAGE
(CurrentPartitionList, CurrentFileSystemList): New globals.
(SelectPartitionPage): Set CurrentPartitionList.
(PARTITION_SIZE_INPUT_FIELD_LENGTH): Define as 6.
(DrawInputField, ShowPartitionSizeInputBox, CreatePartitionPage,
CreateFileSystemList, DestroyFileSystemList, DrawFileSystemList,
ScrollDownFileSystemList, ScrollUpFileSystemList, FormatPartitionPage):
New functions.
(SelectFileSystemPage): Draw partition screen.
(CheckFileSystemPage): Handle CREATE_PARTITION_PAGE and
FORMAT_PARTITION_PAGE.
* subsys/system/usetup/usetup.h (FILE_SYSTEM, FILE_SYSTEM_LIST): Add enums.
svn path=/trunk/; revision=4552
2003-04-18 14:00:17 +00:00
|
|
|
ULONGLONG Cylinders;
|
|
|
|
ULONGLONG TracksPerCylinder;
|
|
|
|
ULONGLONG SectorsPerTrack;
|
|
|
|
ULONGLONG BytesPerSector;
|
2003-08-03 12:20:22 +00:00
|
|
|
|
|
|
|
ULONGLONG DiskSize;
|
|
|
|
ULONGLONG CylinderSize;
|
|
|
|
ULONGLONG TrackSize;
|
|
|
|
|
2002-10-18 20:04:00 +00:00
|
|
|
ULONG DiskNumber;
|
|
|
|
USHORT Port;
|
|
|
|
USHORT Bus;
|
|
|
|
USHORT Id;
|
|
|
|
|
2003-08-09 16:32:26 +00:00
|
|
|
/* Use LBA or CHS? */
|
|
|
|
BOOLEAN UseLba;
|
|
|
|
|
2003-08-06 16:37:46 +00:00
|
|
|
/* Has the partition list been modified? */
|
|
|
|
BOOLEAN Modified;
|
|
|
|
|
2002-11-28 19:20:38 +00:00
|
|
|
UNICODE_STRING DriverName;
|
|
|
|
|
2003-08-03 12:20:22 +00:00
|
|
|
LIST_ENTRY PartListHead;
|
2002-10-18 20:04:00 +00:00
|
|
|
|
|
|
|
} DISKENTRY, *PDISKENTRY;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _PARTLIST
|
|
|
|
{
|
|
|
|
SHORT Left;
|
|
|
|
SHORT Top;
|
|
|
|
SHORT Right;
|
|
|
|
SHORT Bottom;
|
|
|
|
|
2002-10-29 18:40:02 +00:00
|
|
|
SHORT Line;
|
|
|
|
|
2002-10-18 20:04:00 +00:00
|
|
|
ULONG TopDisk;
|
|
|
|
ULONG TopPartition;
|
|
|
|
|
2003-08-02 16:49:36 +00:00
|
|
|
PDISKENTRY CurrentDisk;
|
2003-08-03 12:20:22 +00:00
|
|
|
PPARTENTRY CurrentPartition;
|
2002-10-18 20:04:00 +00:00
|
|
|
|
2003-08-04 15:54:05 +00:00
|
|
|
PDISKENTRY ActiveBootDisk;
|
|
|
|
PPARTENTRY ActiveBootPartition;
|
|
|
|
|
2003-08-03 12:20:22 +00:00
|
|
|
LIST_ENTRY DiskListHead;
|
2002-10-18 20:04:00 +00:00
|
|
|
|
|
|
|
} PARTLIST, *PPARTLIST;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PPARTLIST
|
2003-08-06 16:37:46 +00:00
|
|
|
CreatePartitionList (SHORT Left,
|
|
|
|
SHORT Top,
|
|
|
|
SHORT Right,
|
|
|
|
SHORT Bottom);
|
2002-10-18 20:04:00 +00:00
|
|
|
|
|
|
|
VOID
|
2003-08-06 16:37:46 +00:00
|
|
|
DestroyPartitionList (PPARTLIST List);
|
2002-10-18 20:04:00 +00:00
|
|
|
|
|
|
|
VOID
|
2003-08-06 16:37:46 +00:00
|
|
|
DrawPartitionList (PPARTLIST List);
|
2002-10-18 20:04:00 +00:00
|
|
|
|
|
|
|
VOID
|
2003-08-06 16:37:46 +00:00
|
|
|
ScrollDownPartitionList (PPARTLIST List);
|
2002-10-18 20:04:00 +00:00
|
|
|
|
|
|
|
VOID
|
2003-08-06 16:37:46 +00:00
|
|
|
ScrollUpPartitionList (PPARTLIST List);
|
2002-10-18 20:04:00 +00:00
|
|
|
|
2003-08-04 15:54:05 +00:00
|
|
|
VOID
|
2003-08-18 17:39:26 +00:00
|
|
|
SetActiveBootPartition (PPARTLIST List);
|
2002-10-18 20:04:00 +00:00
|
|
|
|
2003-08-06 16:37:46 +00:00
|
|
|
VOID
|
|
|
|
CreateNewPartition (PPARTLIST List,
|
2003-08-09 16:32:26 +00:00
|
|
|
ULONGLONG PartitionSize,
|
|
|
|
BOOLEAN AutoCreate);
|
2003-04-28 19:44:13 +00:00
|
|
|
|
2003-08-06 16:37:46 +00:00
|
|
|
VOID
|
|
|
|
DeleteCurrentPartition (PPARTLIST List);
|
2003-08-04 15:54:05 +00:00
|
|
|
|
2003-08-12 15:56:21 +00:00
|
|
|
BOOLEAN
|
|
|
|
WritePartitionsToDisk (PPARTLIST List);
|
|
|
|
|
2002-10-29 18:40:02 +00:00
|
|
|
#endif /* __PARTLIST_H__ */
|
|
|
|
|
2003-02-27 14:42:43 +00:00
|
|
|
/* EOF */
|