[DISKPART] Implements part of the FILESYSTEMS command

This commit is contained in:
Eric Kohl 2022-06-05 18:23:08 +02:00
parent d3d5eae19e
commit be88af54e7
13 changed files with 454 additions and 21 deletions

View file

@ -998,34 +998,266 @@ SymbolicName=MSG_COMMAND_DELETE_PARTITION
Severity=Informational
Facility=System
Language=English
<Add DELETE PARTITION command help text here>
Deletes the partition with focus.
Syntax: DELETE PARTITION [NOERR] [OVERRIDE]
NOERR For scripting only. When an error is encountered, DiskPart
continues to process commands as if the error did not occur.
Without the NOERR parameter, an error causes DiskPart to exit
with an error code.
OVERRIDE Enables DiskPart to delete any partition regardless of type.
Typically, DiskPart only permits you to delete known data
partitions.
You cannot delete the system partition, boot partition, or any partition
that contains the active paging file or crash dump (memory dump) filed.
A partition must be selected for this operation to succeed.
Partitions cannot be deleted from dynamic disks or created on dynamic
disks.
Example:
DELETE PARTITION
.
Language=German
<Add DELETE PARTITION command help text here>
Löscht die Partition, die den Fokus hat.
Syntax: DELETE PARTITION [NOERR] [OVERRIDE]
NOERR Nur für Skripting. Bei einem Fehler setzt DiskPart die
Verarbeitung von Befehlen fort, als sei der Fehler nicht
aufgetreten. Ohne den Parameter NOERR wird DiskPart bei
einem Fehler mit dem entsprechenden Fehlercode beendet.
OVERRIDE Ermöglicht DiskPart das Löschen einer beliebigen Partition
unabhängig von deren Typ. Normalerweise gestattet DiskPart
nur das Löschen bekannter Datenpartitionen.
Sie können keine Systempartition, Startpartition oder Partition löschen,
die eine aktive Auslagerungsdatei oder ein Absturzabbild (Speicherabbild)
enthält.
Damit dieser Vorgang erfolgreich ausgeführt werden kann, muss eine
Partition ausgewählt sein.
Partitionen könnnen nicht von dynamischen Datenträgern gelöscht oder auf
dynamischen Datenträgern erstellt werden.
Example:
DELETE PARTITION
.
Language=Polish
<Add DELETE PARTITION command help text here>
Deletes the partition with focus.
Syntax: DELETE PARTITION [NOERR] [OVERRIDE]
NOERR For scripting only. When an error is encountered, DiskPart
continues to process commands as if the error did not occur.
Without the NOERR parameter, an error causes DiskPart to exit
with an error code.
OVERRIDE Enables DiskPart to delete any partition regardless of type.
Typically, DiskPart only permits you to delete known data
partitions.
You cannot delete the system partition, boot partition, or any partition
that contains the active paging file or crash dump (memory dump) filed.
A partition must be selected for this operation to succeed.
Partitions cannot be deleted from dynamic disks or created on dynamic
disks.
Example:
DELETE PARTITION
.
Language=Portugese
<Add DELETE PARTITION command help text here>
Deletes the partition with focus.
Syntax: DELETE PARTITION [NOERR] [OVERRIDE]
NOERR For scripting only. When an error is encountered, DiskPart
continues to process commands as if the error did not occur.
Without the NOERR parameter, an error causes DiskPart to exit
with an error code.
OVERRIDE Enables DiskPart to delete any partition regardless of type.
Typically, DiskPart only permits you to delete known data
partitions.
You cannot delete the system partition, boot partition, or any partition
that contains the active paging file or crash dump (memory dump) filed.
A partition must be selected for this operation to succeed.
Partitions cannot be deleted from dynamic disks or created on dynamic
disks.
Example:
DELETE PARTITION
.
Language=Romanian
<Add DELETE PARTITION command help text here>
Deletes the partition with focus.
Syntax: DELETE PARTITION [NOERR] [OVERRIDE]
NOERR For scripting only. When an error is encountered, DiskPart
continues to process commands as if the error did not occur.
Without the NOERR parameter, an error causes DiskPart to exit
with an error code.
OVERRIDE Enables DiskPart to delete any partition regardless of type.
Typically, DiskPart only permits you to delete known data
partitions.
You cannot delete the system partition, boot partition, or any partition
that contains the active paging file or crash dump (memory dump) filed.
A partition must be selected for this operation to succeed.
Partitions cannot be deleted from dynamic disks or created on dynamic
disks.
Example:
DELETE PARTITION
.
Language=Russian
<Add DELETE PARTITION command help text here>
Deletes the partition with focus.
Syntax: DELETE PARTITION [NOERR] [OVERRIDE]
NOERR For scripting only. When an error is encountered, DiskPart
continues to process commands as if the error did not occur.
Without the NOERR parameter, an error causes DiskPart to exit
with an error code.
OVERRIDE Enables DiskPart to delete any partition regardless of type.
Typically, DiskPart only permits you to delete known data
partitions.
You cannot delete the system partition, boot partition, or any partition
that contains the active paging file or crash dump (memory dump) filed.
A partition must be selected for this operation to succeed.
Partitions cannot be deleted from dynamic disks or created on dynamic
disks.
Example:
DELETE PARTITION
.
Language=Albanian
<Add DELETE PARTITION command help text here>
Deletes the partition with focus.
Syntax: DELETE PARTITION [NOERR] [OVERRIDE]
NOERR For scripting only. When an error is encountered, DiskPart
continues to process commands as if the error did not occur.
Without the NOERR parameter, an error causes DiskPart to exit
with an error code.
OVERRIDE Enables DiskPart to delete any partition regardless of type.
Typically, DiskPart only permits you to delete known data
partitions.
You cannot delete the system partition, boot partition, or any partition
that contains the active paging file or crash dump (memory dump) filed.
A partition must be selected for this operation to succeed.
Partitions cannot be deleted from dynamic disks or created on dynamic
disks.
Example:
DELETE PARTITION
.
Language=Turkish
<Add DELETE PARTITION command help text here>
Deletes the partition with focus.
Syntax: DELETE PARTITION [NOERR] [OVERRIDE]
NOERR For scripting only. When an error is encountered, DiskPart
continues to process commands as if the error did not occur.
Without the NOERR parameter, an error causes DiskPart to exit
with an error code.
OVERRIDE Enables DiskPart to delete any partition regardless of type.
Typically, DiskPart only permits you to delete known data
partitions.
You cannot delete the system partition, boot partition, or any partition
that contains the active paging file or crash dump (memory dump) filed.
A partition must be selected for this operation to succeed.
Partitions cannot be deleted from dynamic disks or created on dynamic
disks.
Example:
DELETE PARTITION
.
Language=Chinese
<Add DELETE PARTITION command help text here>
Deletes the partition with focus.
Syntax: DELETE PARTITION [NOERR] [OVERRIDE]
NOERR For scripting only. When an error is encountered, DiskPart
continues to process commands as if the error did not occur.
Without the NOERR parameter, an error causes DiskPart to exit
with an error code.
OVERRIDE Enables DiskPart to delete any partition regardless of type.
Typically, DiskPart only permits you to delete known data
partitions.
You cannot delete the system partition, boot partition, or any partition
that contains the active paging file or crash dump (memory dump) filed.
A partition must be selected for this operation to succeed.
Partitions cannot be deleted from dynamic disks or created on dynamic
disks.
Example:
DELETE PARTITION
.
Language=Taiwanese
<Add DELETE PARTITION command help text here>
Deletes the partition with focus.
Syntax: DELETE PARTITION [NOERR] [OVERRIDE]
NOERR For scripting only. When an error is encountered, DiskPart
continues to process commands as if the error did not occur.
Without the NOERR parameter, an error causes DiskPart to exit
with an error code.
OVERRIDE Enables DiskPart to delete any partition regardless of type.
Typically, DiskPart only permits you to delete known data
partitions.
You cannot delete the system partition, boot partition, or any partition
that contains the active paging file or crash dump (memory dump) filed.
A partition must be selected for this operation to succeed.
Partitions cannot be deleted from dynamic disks or created on dynamic
disks.
Example:
DELETE PARTITION
.
@ -1380,34 +1612,126 @@ SymbolicName=MSG_COMMAND_FILESYSTEMS
Severity=Informational
Facility=System
Language=English
<Add FILESYSTEMS command help text here>
Displays information about the current file system for the selected
volume, and the supported file systems for formatting the volume.
Syntax: FILESYSTEMS
A volume must be selected for this operation to succeed.
Example:
FILESYSTEMS
.
Language=German
<Add FILESYSTEMS command help text here>
Zeigt Informationen zum aktuelle Dateisystem für das ausgewählte
Volume und die unterstützten Dateisysteme zum Formatieren des
Volumes an.
Syntax: FILESYSTEMS
Damit diesr Vorgang erfolgreich ausgeführt werden kann, muss ein
Volume ausgewählt sein.
Beispiel:
FILESYSTEMS
.
Language=Polish
<Add FILESYSTEMS command help text here>
Displays information about the current file system for the selected
volume, and the supported file systems for formatting the volume.
Syntax: FILESYSTEMS
A volume must be selected for this operation to succeed.
Example:
FILESYSTEMS
.
Language=Portugese
<Add FILESYSTEMS command help text here>
Displays information about the current file system for the selected
volume, and the supported file systems for formatting the volume.
Syntax: FILESYSTEMS
A volume must be selected for this operation to succeed.
Example:
FILESYSTEMS
.
Language=Romanian
<Add FILESYSTEMS command help text here>
Displays information about the current file system for the selected
volume, and the supported file systems for formatting the volume.
Syntax: FILESYSTEMS
A volume must be selected for this operation to succeed.
Example:
FILESYSTEMS
.
Language=Russian
<Add FILESYSTEMS command help text here>
Displays information about the current file system for the selected
volume, and the supported file systems for formatting the volume.
Syntax: FILESYSTEMS
A volume must be selected for this operation to succeed.
Example:
FILESYSTEMS
.
Language=Albanian
<Add FILESYSTEMS command help text here>
Displays information about the current file system for the selected
volume, and the supported file systems for formatting the volume.
Syntax: FILESYSTEMS
A volume must be selected for this operation to succeed.
Example:
FILESYSTEMS
.
Language=Turkish
<Add FILESYSTEMS command help text here>
Displays information about the current file system for the selected
volume, and the supported file systems for formatting the volume.
Syntax: FILESYSTEMS
A volume must be selected for this operation to succeed.
Example:
FILESYSTEMS
.
Language=Chinese
<Add FILESYSTEMS command help text here>
Displays information about the current file system for the selected
volume, and the supported file systems for formatting the volume.
Syntax: FILESYSTEMS
A volume must be selected for this operation to succeed.
Example:
FILESYSTEMS
.
Language=Taiwanese
<Add FILESYSTEMS command help text here>
Displays information about the current file system for the selected
volume, and the supported file systems for formatting the volume.
Syntax: FILESYSTEMS
A volume must be selected for this operation to succeed.
Example:
FILESYSTEMS
.

View file

@ -8,7 +8,30 @@
#include "diskpart.h"
BOOL filesystems_main(INT argc, LPWSTR *argv)
#define NDEBUG
#include <debug.h>
BOOL
filesystems_main(
_In_ INT argc,
_In_ PWSTR *argv)
{
if (CurrentVolume == NULL)
{
ConResPuts(StdOut, IDS_SELECT_NO_VOLUME);
return TRUE;
}
ConPuts(StdOut, L"\n");
ConResPuts(StdOut, IDS_FILESYSTEMS_CURRENT);
ConPuts(StdOut, L"\n");
ConResPrintf(StdOut, IDS_FILESYSTEMS_TYPE, (CurrentVolume->pszFilesystem == NULL) ? L"RAW" : CurrentVolume->pszFilesystem);
ConResPrintf(StdOut, IDS_FILESYSTEMS_CLUSTERSIZE);
ConPuts(StdOut, L"\n");
ConResPuts(StdOut, IDS_FILESYSTEMS_FORMATTING);
ConPuts(StdOut, L"\n");
return TRUE;
}

View file

@ -53,6 +53,14 @@ BEGIN
IDS_DETAIL_NO_VOLUME "\nThere is no volume associated with this partition.\n"
END
STRINGTABLE
BEGIN
IDS_FILESYSTEMS_CURRENT "Aktuelles Dateisystem\n"
IDS_FILESYSTEMS_FORMATTING "Zur Formatierung unterstützte Dateisysteme\n"
IDS_FILESYSTEMS_TYPE "Typ : %s\n"
IDS_FILESYSTEMS_CLUSTERSIZE "Größe der Zuordnungseinheit: \n"
END
STRINGTABLE
BEGIN
IDS_HELP_FORMAT_STRING "%-11.11s - %s"

View file

@ -53,6 +53,14 @@ BEGIN
IDS_DETAIL_NO_VOLUME "\nThere is no volume associated with this partition.\n"
END
STRINGTABLE
BEGIN
IDS_FILESYSTEMS_CURRENT "Current Filesystem\n"
IDS_FILESYSTEMS_FORMATTING "Filesystems available for formatting\n"
IDS_FILESYSTEMS_TYPE "Type : %s\n"
IDS_FILESYSTEMS_CLUSTERSIZE "Cluster size: \n"
END
STRINGTABLE
BEGIN
IDS_HELP_FORMAT_STRING "%-11.11s - %s"

View file

@ -53,6 +53,14 @@ BEGIN
IDS_DETAIL_NO_VOLUME "\nThere is no volume associated with this partition.\n"
END
STRINGTABLE
BEGIN
IDS_FILESYSTEMS_CURRENT "Current Filesystem\n"
IDS_FILESYSTEMS_FORMATTING "Filesystems available for formatting\n"
IDS_FILESYSTEMS_TYPE "Type : %s\n"
IDS_FILESYSTEMS_CLUSTERSIZE "Cluster size: \n"
END
STRINGTABLE
BEGIN
IDS_HELP_FORMAT_STRING "%-11.11s - %s"

View file

@ -70,6 +70,14 @@ BEGIN
IDS_LIST_VOLUME_FORMAT "%c Volume %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n"
END
STRINGTABLE
BEGIN
IDS_FILESYSTEMS_CURRENT "Current Filesystem\n"
IDS_FILESYSTEMS_FORMATTING "Filesystems available for formatting\n"
IDS_FILESYSTEMS_TYPE "Type : %s\n"
IDS_FILESYSTEMS_CLUSTERSIZE "Cluster size: \n"
END
STRINGTABLE
BEGIN
IDS_HELP_FORMAT_STRING "%-11.11s - %s"

View file

@ -70,6 +70,14 @@ BEGIN
IDS_LIST_VOLUME_FORMAT "%c Volume %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n"
END
STRINGTABLE
BEGIN
IDS_FILESYSTEMS_CURRENT "Current Filesystem\n"
IDS_FILESYSTEMS_FORMATTING "Filesystems available for formatting\n"
IDS_FILESYSTEMS_TYPE "Type : %s\n"
IDS_FILESYSTEMS_CLUSTERSIZE "Cluster size: \n"
END
STRINGTABLE
BEGIN
IDS_HELP_FORMAT_STRING "%-11.11s - %s"

View file

@ -70,6 +70,14 @@ BEGIN
IDS_LIST_VOLUME_FORMAT "%c Volume %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n"
END
STRINGTABLE
BEGIN
IDS_FILESYSTEMS_CURRENT "Current Filesystem\n"
IDS_FILESYSTEMS_FORMATTING "Filesystems available for formatting\n"
IDS_FILESYSTEMS_TYPE "Type : %s\n"
IDS_FILESYSTEMS_CLUSTERSIZE "Cluster size: \n"
END
STRINGTABLE
BEGIN
IDS_HELP_FORMAT_STRING "%-11.11s - %s"

View file

@ -72,6 +72,14 @@ BEGIN
IDS_LIST_VOLUME_FORMAT "%c Volume %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n"
END
STRINGTABLE
BEGIN
IDS_FILESYSTEMS_CURRENT "Current Filesystem\n"
IDS_FILESYSTEMS_FORMATTING "Filesystems available for formatting\n"
IDS_FILESYSTEMS_TYPE "Type : %s\n"
IDS_FILESYSTEMS_CLUSTERSIZE "Cluster size: \n"
END
STRINGTABLE
BEGIN
IDS_HELP_FORMAT_STRING "%-11.11s - %s"

View file

@ -70,6 +70,14 @@ BEGIN
IDS_LIST_VOLUME_FORMAT "%c Volume %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n"
END
STRINGTABLE
BEGIN
IDS_FILESYSTEMS_CURRENT "Current Filesystem\n"
IDS_FILESYSTEMS_FORMATTING "Filesystems available for formatting\n"
IDS_FILESYSTEMS_TYPE "Type : %s\n"
IDS_FILESYSTEMS_CLUSTERSIZE "Cluster size: \n"
END
STRINGTABLE
BEGIN
IDS_HELP_FORMAT_STRING "%-11.11s - %s"

View file

@ -77,6 +77,14 @@ BEGIN
IDS_LIST_VOLUME_FORMAT "%c Volume %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n"
END
STRINGTABLE
BEGIN
IDS_FILESYSTEMS_CURRENT "Current Filesystem\n"
IDS_FILESYSTEMS_FORMATTING "Filesystems available for formatting\n"
IDS_FILESYSTEMS_TYPE "Type : %s\n"
IDS_FILESYSTEMS_CLUSTERSIZE "Cluster size: \n"
END
STRINGTABLE
BEGIN
IDS_HELP_FORMAT_STRING "%-11.11s - %s"

View file

@ -71,6 +71,14 @@ BEGIN
IDS_LIST_VOLUME_FORMAT "%c Volume %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n"
END
STRINGTABLE
BEGIN
IDS_FILESYSTEMS_CURRENT "Current Filesystem\n"
IDS_FILESYSTEMS_FORMATTING "Filesystems available for formatting\n"
IDS_FILESYSTEMS_TYPE "Type : %s\n"
IDS_FILESYSTEMS_CLUSTERSIZE "Cluster size: \n"
END
STRINGTABLE
BEGIN
IDS_HELP_FORMAT_STRING "%-11.11s - %s"

View file

@ -24,6 +24,12 @@
#define IDS_DELETE_PARTITION_FAIL 1070
#define IDS_DELETE_PARTITION_SUCCESS 1071
#define IDS_FILESYSTEMS_CURRENT 1090
#define IDS_FILESYSTEMS_FORMATTING 1091
#define IDS_FILESYSTEMS_TYPE 1092
#define IDS_FILESYSTEMS_CLUSTERSIZE 1093
#define IDS_DETAIL_INFO_DISK_ID 1107
#define IDS_DETAIL_INFO_TYPE 1108
#define IDS_DETAIL_INFO_STATUS 1109