Author: ekohl Date: Fri Jul 24 20:02:56 2015 New Revision: 68569
URL: http://svn.reactos.org/svn/reactos?rev=68569&view=rev Log: [DIKPART] Implement the RESCAN command.
Modified: trunk/reactos/base/system/diskpart/lang/en-US.rc trunk/reactos/base/system/diskpart/lang/ro-RO.rc trunk/reactos/base/system/diskpart/lang/ru-RU.rc trunk/reactos/base/system/diskpart/lang/sq-AL.rc trunk/reactos/base/system/diskpart/lang/tr-TR.rc trunk/reactos/base/system/diskpart/partlist.c trunk/reactos/base/system/diskpart/rescan.c trunk/reactos/base/system/diskpart/resource.h
Modified: trunk/reactos/base/system/diskpart/lang/en-US.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/lang/e... ============================================================================== --- trunk/reactos/base/system/diskpart/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/lang/en-US.rc [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -43,8 +43,15 @@ IDS_LIST_PARTITION_HEAD "\n Partition Type Size Offset\n" IDS_LIST_PARTITION_LINE " ------------- ---------------- ------- -------\n" IDS_LIST_PARTITION_FORMAT "%c Partition %2lu %-16s %4I64u %-2s %4I64u %-2s\n" - IDS_LIST_PARTITION_NO_DISK "\nThere is no disk for listing partitions.\nPlease select a disk and try again.\n\n" + IDS_LIST_PARTITION_NO_DISK "\nThere is no disk to list partitions.\nPlease select a disk and try again.\n\n" IDS_LIST_VOLUME_HEAD " Volume ### Ltr Label\n" +END + +/* RESCAN command string */ +STRINGTABLE +BEGIN + IDS_RESCAN_START "\nPlease wait while DiskPart scans your configuration...\n" + IDS_RESCAN_END "\nDiskPart has finished scanning your configuration.\n\n" END
/* Select command strings */
Modified: trunk/reactos/base/system/diskpart/lang/ro-RO.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/lang/r... ============================================================================== --- trunk/reactos/base/system/diskpart/lang/ro-RO.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/lang/ro-RO.rc [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -44,11 +44,18 @@ IDS_LIST_PARTITION_HEAD "\n Partition Type Size Offset\n" IDS_LIST_PARTITION_LINE " ------------- ---------------- ------- -------\n" IDS_LIST_PARTITION_FORMAT "%c Partition %2lu %-16s %4I64u %-2s %4I64u %-2s\n" - IDS_LIST_PARTITION_NO_DISK "\nThere is no disk for listing partitions.\nPlease select a disk and try again.\n\n" + IDS_LIST_PARTITION_NO_DISK "\nThere is no disk to list partitions.\nPlease select a disk and try again.\n\n" IDS_LIST_VOLUME_HEAD "Volum ###\tLtr\tEtichetÄ\n" END
-/* Select command strings */ +/* RESCAN command string */ +STRINGTABLE +BEGIN + IDS_RESCAN_START "\nPlease wait while DiskPart scans your configuration...\n" + IDS_RESCAN_END "\nDiskPart has finished scanning your configuration.\n\n" +END + +/* SELECT command strings */ STRINGTABLE BEGIN IDS_SELECT_NO_DISK "\nThere is no disk currently selected.\nPlease select a disk and try again.\n\n"
Modified: trunk/reactos/base/system/diskpart/lang/ru-RU.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/lang/r... ============================================================================== --- trunk/reactos/base/system/diskpart/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/lang/ru-RU.rc [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -45,11 +45,18 @@ IDS_LIST_PARTITION_HEAD "\n Partition Type Size Offset\n" IDS_LIST_PARTITION_LINE " ------------- ---------------- ------- -------\n" IDS_LIST_PARTITION_FORMAT "%c Partition %2lu %-16s %4I64u %-2s %4I64u %-2s\n" - IDS_LIST_PARTITION_NO_DISK "\nThere is no disk for listing partitions.\nPlease select a disk and try again.\n\n" + IDS_LIST_PARTITION_NO_DISK "\nThere is no disk to list partitions.\nPlease select a disk and try again.\n\n" IDS_LIST_VOLUME_HEAD "Том ###\tÐмÑ\tÐеÑка\n" END
-/* Select command strings */ +/* RESCAN command string */ +STRINGTABLE +BEGIN + IDS_RESCAN_START "\nPlease wait while DiskPart scans your configuration...\n" + IDS_RESCAN_END "\nDiskPart has finished scanning your configuration.\n\n" +END + +/* SELECT command strings */ STRINGTABLE BEGIN IDS_SELECT_NO_DISK "\nThere is no disk currently selected.\nPlease select a disk and try again.\n\n"
Modified: trunk/reactos/base/system/diskpart/lang/sq-AL.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/lang/s... ============================================================================== --- trunk/reactos/base/system/diskpart/lang/sq-AL.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/lang/sq-AL.rc [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -47,11 +47,18 @@ IDS_LIST_PARTITION_HEAD "\n Partition Type Size Offset\n" IDS_LIST_PARTITION_LINE "%c ------------- ---------------- ------- -------\n" IDS_LIST_PARTITION_FORMAT " Partition %2lu %-16s %4I64u %-2s %4I64u %-2s\n" - IDS_LIST_PARTITION_NO_DISK "\nThere is no disk for listing partitions.\nPlease select a disk and try again.\n\n" + IDS_LIST_PARTITION_NO_DISK "\nThere is no disk to list partitions.\nPlease select a disk and try again.\n\n" IDS_LIST_VOLUME_HEAD "Volume ###\tLtr\tLabel\n" END
-/* Select command strings */ +/* RESCAN command string */ +STRINGTABLE +BEGIN + IDS_RESCAN_START "\nPlease wait while DiskPart scans your configuration...\n" + IDS_RESCAN_END "\nDiskPart has finished scanning your configuration.\n\n" +END + +/* SELECT command strings */ STRINGTABLE BEGIN IDS_SELECT_NO_DISK "\nThere is no disk currently selected.\nPlease select a disk and try again.\n\n"
Modified: trunk/reactos/base/system/diskpart/lang/tr-TR.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/lang/t... ============================================================================== --- trunk/reactos/base/system/diskpart/lang/tr-TR.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/lang/tr-TR.rc [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -45,11 +45,18 @@ IDS_LIST_PARTITION_HEAD "\n Partition Type Size Offset\n" IDS_LIST_PARTITION_LINE " ------------- ---------------- ------- -------\n" IDS_LIST_PARTITION_FORMAT "%c Partition %2lu %-16s %4I64u %-2s %4I64u %-2s\n" - IDS_LIST_PARTITION_NO_DISK "\nThere is no disk for listing partitions.\nPlease select a disk and try again.\n\n" + IDS_LIST_PARTITION_NO_DISK "\nThere is no disk to list partitions.\nPlease select a disk and try again.\n\n" IDS_LIST_VOLUME_HEAD "Birim ###\tHarf\tEtiket\n" END
-/* Select command strings */ +/* RESCAN command string */ +STRINGTABLE +BEGIN + IDS_RESCAN_START "\nPlease wait while DiskPart scans your configuration...\n" + IDS_RESCAN_END "\nDiskPart has finished scanning your configuration.\n\n" +END + +/* SELECT command strings */ STRINGTABLE BEGIN IDS_SELECT_NO_DISK "\nThere is no disk currently selected.\nPlease select a disk and try again.\n\n"
Modified: trunk/reactos/base/system/diskpart/partlist.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/partli... ============================================================================== --- trunk/reactos/base/system/diskpart/partlist.c [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/partlist.c [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -1137,6 +1137,9 @@ PPARTENTRY PartEntry; PLIST_ENTRY Entry;
+ CurrentDisk = NULL; + CurrentPartition = NULL; + /* Release disk and partition info */ while (!IsListEmpty(&DiskListHead)) {
Modified: trunk/reactos/base/system/diskpart/rescan.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/rescan... ============================================================================== --- trunk/reactos/base/system/diskpart/rescan.c [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/rescan.c [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -2,8 +2,7 @@ * PROJECT: ReactOS DiskPart * LICENSE: GPL - See COPYING in the top level directory * FILE: base/system/diskpart/rescan.c - * PURPOSE: Manages all the partitions of the OS in - * an interactive way + * PURPOSE: Manages all the partitions of the OS in an interactive way * PROGRAMMERS: Lee Schroeder */
@@ -11,5 +10,10 @@
BOOL rescan_main(INT argc, LPWSTR *argv) { + PrintResourceString(IDS_RESCAN_START); + DestroyPartitionList(); + CreatePartitionList(); + PrintResourceString(IDS_RESCAN_END); + return TRUE; }
Modified: trunk/reactos/base/system/diskpart/resource.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/resour... ============================================================================== --- trunk/reactos/base/system/diskpart/resource.h [iso-8859-1] (original) +++ trunk/reactos/base/system/diskpart/resource.h [iso-8859-1] Fri Jul 24 20:02:56 2015 @@ -40,6 +40,9 @@ #define IDS_LIST_PARTITION_FORMAT 3305 #define IDS_LIST_PARTITION_NO_DISK 3306 #define IDS_LIST_VOLUME_HEAD 3307 + +#define IDS_RESCAN_START 4100 +#define IDS_RESCAN_END 4101
#define IDS_SELECT_NO_DISK 4400 #define IDS_SELECT_DISK 4401