mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
Replaced array of disk entries in partition list by doubley-linked list of disk entries.
Disabled create, delete and format partition until bugs are fixed. svn path=/trunk/; revision=5382
This commit is contained in:
parent
3ff6d5b32d
commit
0c6dca9836
4 changed files with 1022 additions and 985 deletions
File diff suppressed because it is too large
Load diff
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: partlist.h,v 1.10 2003/04/28 19:44:13 chorns Exp $
|
/* $Id: partlist.h,v 1.11 2003/08/02 16:49:36 ekohl Exp $
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS text-mode setup
|
* PROJECT: ReactOS text-mode setup
|
||||||
* FILE: subsys/system/usetup/partlist.h
|
* FILE: subsys/system/usetup/partlist.h
|
||||||
|
@ -66,8 +66,11 @@ typedef struct _PARTENTRY
|
||||||
BOOLEAN HidePartEntry;
|
BOOLEAN HidePartEntry;
|
||||||
} PARTENTRY, *PPARTENTRY;
|
} PARTENTRY, *PPARTENTRY;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _DISKENTRY
|
typedef struct _DISKENTRY
|
||||||
{
|
{
|
||||||
|
LIST_ENTRY ListEntry;
|
||||||
|
|
||||||
ULONGLONG DiskSize;
|
ULONGLONG DiskSize;
|
||||||
ULONGLONG Cylinders;
|
ULONGLONG Cylinders;
|
||||||
ULONGLONG TracksPerCylinder;
|
ULONGLONG TracksPerCylinder;
|
||||||
|
@ -77,7 +80,6 @@ typedef struct _DISKENTRY
|
||||||
USHORT Port;
|
USHORT Port;
|
||||||
USHORT Bus;
|
USHORT Bus;
|
||||||
USHORT Id;
|
USHORT Id;
|
||||||
BOOL FixedDisk;
|
|
||||||
|
|
||||||
UNICODE_STRING DriverName;
|
UNICODE_STRING DriverName;
|
||||||
|
|
||||||
|
@ -99,11 +101,10 @@ typedef struct _PARTLIST
|
||||||
ULONG TopDisk;
|
ULONG TopDisk;
|
||||||
ULONG TopPartition;
|
ULONG TopPartition;
|
||||||
|
|
||||||
ULONG CurrentDisk;
|
PDISKENTRY CurrentDisk;
|
||||||
ULONG CurrentPartition;
|
ULONG CurrentPartition;
|
||||||
|
|
||||||
ULONG DiskCount;
|
LIST_ENTRY DiskList;
|
||||||
PDISKENTRY DiskArray;
|
|
||||||
|
|
||||||
} PARTLIST, *PPARTLIST;
|
} PARTLIST, *PPARTLIST;
|
||||||
|
|
||||||
|
@ -133,20 +134,20 @@ ScrollDownPartitionList(PPARTLIST List);
|
||||||
VOID
|
VOID
|
||||||
ScrollUpPartitionList(PPARTLIST List);
|
ScrollUpPartitionList(PPARTLIST List);
|
||||||
|
|
||||||
BOOL
|
BOOLEAN
|
||||||
GetSelectedPartition(PPARTLIST List,
|
GetSelectedPartition(PPARTLIST List,
|
||||||
PPARTDATA Data);
|
PPARTDATA Data);
|
||||||
|
|
||||||
BOOL
|
BOOLEAN
|
||||||
GetActiveBootPartition(PPARTLIST List,
|
GetActiveBootPartition(PPARTLIST List,
|
||||||
PPARTDATA Data);
|
PPARTDATA Data);
|
||||||
|
|
||||||
BOOL
|
BOOLEAN
|
||||||
CreateSelectedPartition(PPARTLIST List,
|
CreateSelectedPartition(PPARTLIST List,
|
||||||
ULONG PartType,
|
ULONG PartType,
|
||||||
ULONGLONG NewPartSize);
|
ULONGLONG NewPartSize);
|
||||||
|
|
||||||
BOOL
|
BOOLEAN
|
||||||
DeleteSelectedPartition(PPARTLIST List);
|
DeleteSelectedPartition(PPARTLIST List);
|
||||||
|
|
||||||
#endif /* __PARTLIST_H__ */
|
#endif /* __PARTLIST_H__ */
|
||||||
|
|
|
@ -810,6 +810,7 @@ SelectPartitionPage(PINPUT_RECORD Ir)
|
||||||
return(SELECT_PARTITION_PAGE);
|
return(SELECT_PARTITION_PAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_C) /* C */
|
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_C) /* C */
|
||||||
{
|
{
|
||||||
/* Don't destroy the parition list here */;
|
/* Don't destroy the parition list here */;
|
||||||
|
@ -823,6 +824,7 @@ SelectPartitionPage(PINPUT_RECORD Ir)
|
||||||
}
|
}
|
||||||
return(SELECT_PARTITION_PAGE);
|
return(SELECT_PARTITION_PAGE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* FIXME: Update status text */
|
/* FIXME: Update status text */
|
||||||
|
|
||||||
|
@ -1016,6 +1018,7 @@ ShowPartitionSizeInputBox(ULONG MaxSize,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
static PAGE_NUMBER
|
static PAGE_NUMBER
|
||||||
CreatePartitionPage(PINPUT_RECORD Ir)
|
CreatePartitionPage(PINPUT_RECORD Ir)
|
||||||
{
|
{
|
||||||
|
@ -1076,7 +1079,7 @@ CreatePartitionPage(PINPUT_RECORD Ir)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(PartEntry->Unpartitioned == TRUE);
|
// assert(PartEntry->Unpartitioned == TRUE);
|
||||||
PartEntry->PartType = PARTITION_ENTRY_UNUSED;
|
PartEntry->PartType = PARTITION_ENTRY_UNUSED;
|
||||||
PartEntry->Used = TRUE;
|
PartEntry->Used = TRUE;
|
||||||
|
|
||||||
|
@ -1130,6 +1133,7 @@ CreatePartitionPage(PINPUT_RECORD Ir)
|
||||||
|
|
||||||
return(SELECT_PARTITION_PAGE);
|
return(SELECT_PARTITION_PAGE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static PFILE_SYSTEM_LIST
|
static PFILE_SYSTEM_LIST
|
||||||
|
@ -2032,6 +2036,7 @@ BootLoaderPage(PINPUT_RECORD Ir)
|
||||||
|
|
||||||
SetStatusText(" Please wait...");
|
SetStatusText(" Please wait...");
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (ActivePartitionValid == FALSE)
|
if (ActivePartitionValid == FALSE)
|
||||||
{
|
{
|
||||||
/* Mark the chosen partition as active since there is no active
|
/* Mark the chosen partition as active since there is no active
|
||||||
|
@ -2092,6 +2097,7 @@ BootLoaderPage(PINPUT_RECORD Ir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (ActivePartition.PartType == PARTITION_ENTRY_UNUSED)
|
if (ActivePartition.PartType == PARTITION_ENTRY_UNUSED)
|
||||||
{
|
{
|
||||||
|
@ -2812,9 +2818,11 @@ NtProcessStartup(PPEB Peb)
|
||||||
Page = SelectPartitionPage(&Ir);
|
Page = SelectPartitionPage(&Ir);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#if 0
|
||||||
case CREATE_PARTITION_PAGE:
|
case CREATE_PARTITION_PAGE:
|
||||||
Page = CreatePartitionPage(&Ir);
|
Page = CreatePartitionPage(&Ir);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case SELECT_FILE_SYSTEM_PAGE:
|
case SELECT_FILE_SYSTEM_PAGE:
|
||||||
Page = SelectFileSystemPage(&Ir);
|
Page = SelectFileSystemPage(&Ir);
|
||||||
|
|
|
@ -27,6 +27,11 @@
|
||||||
#ifndef __USETUP_H__
|
#ifndef __USETUP_H__
|
||||||
#define __USETUP_H__
|
#define __USETUP_H__
|
||||||
|
|
||||||
|
#ifdef assert
|
||||||
|
#undef assert
|
||||||
|
#endif
|
||||||
|
#define assert(x)
|
||||||
|
|
||||||
#define DPRINT1(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
|
#define DPRINT1(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
|
||||||
#define CHECKPOINT1 do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0);
|
#define CHECKPOINT1 do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue