https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6c797bf86a00e554ca231…
commit 6c797bf86a00e554ca231b235ceed0c5e0e8fcaf
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sat Jun 4 20:27:11 2022 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sat Jun 4 20:27:11 2022 +0200
[DISKPART] Report success or failure for CREATE PARTITION commands
---
base/system/diskpart/create.c | 42 +++++-
base/system/diskpart/diskpart_msg.mc | 261 +++++++++++++++++++++++++++++++++--
base/system/diskpart/lang/de-DE.rc | 6 +
base/system/diskpart/lang/en-US.rc | 6 +
base/system/diskpart/lang/pl-PL.rc | 6 +
base/system/diskpart/lang/pt-PT.rc | 6 +
base/system/diskpart/lang/ro-RO.rc | 6 +
base/system/diskpart/lang/ru-RU.rc | 6 +
base/system/diskpart/lang/sq-AL.rc | 6 +
base/system/diskpart/lang/tr-TR.rc | 6 +
base/system/diskpart/lang/zh-CN.rc | 6 +
base/system/diskpart/lang/zh-TW.rc | 6 +
base/system/diskpart/resource.h | 4 +
13 files changed, 353 insertions(+), 14 deletions(-)
diff --git a/base/system/diskpart/create.c b/base/system/diskpart/create.c
index 9617b7c4e60..52526573d85 100644
--- a/base/system/diskpart/create.c
+++ b/base/system/diskpart/create.c
@@ -27,6 +27,7 @@ CreateExtendedPartition(
#endif
INT i;
PWSTR pszSuffix = NULL;
+ NTSTATUS Status;
if (CurrentDisk == NULL)
{
@@ -128,6 +129,7 @@ CreateExtendedPartition(
PartEntry->FormatState = Unformatted;
PartEntry->FileSystemName[0] = L'\0';
+ CurrentPartition = PartEntry;
CurrentDisk->Dirty = TRUE;
}
else
@@ -140,6 +142,7 @@ CreateExtendedPartition(
PartEntry->FormatState = Unformatted;
PartEntry->FileSystemName[0] = L'\0';
+ CurrentPartition = PartEntry;
CurrentDisk->Dirty = TRUE;
}
else if (PartEntry->SectorCount.QuadPart > ullSectorCount)
@@ -168,12 +171,21 @@ CreateExtendedPartition(
InsertTailList(ListEntry, &NewPartEntry->ListEntry);
+ CurrentPartition = NewPartEntry;
CurrentDisk->Dirty = TRUE;
}
}
UpdateDiskLayout(CurrentDisk);
- WritePartitions(CurrentDisk);
+ Status = WritePartitions(CurrentDisk);
+ if (!NT_SUCCESS(Status))
+ {
+ ConResPuts(StdOut, IDS_CREATE_PARTITION_FAIL);
+ CurrentPartition = NULL;
+ return TRUE;
+ }
+
+ ConResPuts(StdOut, IDS_CREATE_PARTITION_SUCCESS);
return TRUE;
}
@@ -195,6 +207,7 @@ CreateLogicalPartition(
UCHAR PartitionType = 6;
INT i, length;
PWSTR pszSuffix = NULL;
+ NTSTATUS Status;
if (CurrentDisk == NULL)
{
@@ -312,6 +325,7 @@ CreateLogicalPartition(
PartEntry->FormatState = Unformatted;
PartEntry->FileSystemName[0] = L'\0';
+ CurrentPartition = PartEntry;
CurrentDisk->Dirty = TRUE;
break;
}
@@ -325,6 +339,7 @@ CreateLogicalPartition(
PartEntry->FormatState = Unformatted;
PartEntry->FileSystemName[0] = L'\0';
+ CurrentPartition = PartEntry;
CurrentDisk->Dirty = TRUE;
break;
}
@@ -354,6 +369,7 @@ CreateLogicalPartition(
InsertTailList(ListEntry, &NewPartEntry->ListEntry);
+ CurrentPartition = NewPartEntry;
CurrentDisk->Dirty = TRUE;
break;
}
@@ -361,7 +377,15 @@ CreateLogicalPartition(
}
UpdateDiskLayout(CurrentDisk);
- WritePartitions(CurrentDisk);
+ Status = WritePartitions(CurrentDisk);
+ if (!NT_SUCCESS(Status))
+ {
+ ConResPuts(StdOut, IDS_CREATE_PARTITION_FAIL);
+ CurrentPartition = NULL;
+ return TRUE;
+ }
+
+ ConResPuts(StdOut, IDS_CREATE_PARTITION_SUCCESS);
return TRUE;
}
@@ -383,6 +407,7 @@ CreatePrimaryPartition(
UCHAR PartitionType = 6;
INT i, length;
PWSTR pszSuffix = NULL;
+ NTSTATUS Status;
if (CurrentDisk == NULL)
{
@@ -506,6 +531,7 @@ CreatePrimaryPartition(
PartEntry->FormatState = Unformatted;
PartEntry->FileSystemName[0] = L'\0';
+ CurrentPartition = PartEntry;
CurrentDisk->Dirty = TRUE;
break;
}
@@ -519,6 +545,7 @@ CreatePrimaryPartition(
PartEntry->FormatState = Unformatted;
PartEntry->FileSystemName[0] = L'\0';
+ CurrentPartition = PartEntry;
CurrentDisk->Dirty = TRUE;
break;
}
@@ -548,6 +575,7 @@ CreatePrimaryPartition(
InsertTailList(ListEntry, &NewPartEntry->ListEntry);
+ CurrentPartition = NewPartEntry;
CurrentDisk->Dirty = TRUE;
break;
}
@@ -555,7 +583,15 @@ CreatePrimaryPartition(
}
UpdateDiskLayout(CurrentDisk);
- WritePartitions(CurrentDisk);
+ Status = WritePartitions(CurrentDisk);
+ if (!NT_SUCCESS(Status))
+ {
+ ConResPuts(StdOut, IDS_CREATE_PARTITION_FAIL);
+ CurrentPartition = NULL;
+ return TRUE;
+ }
+
+ ConResPuts(StdOut, IDS_CREATE_PARTITION_SUCCESS);
return TRUE;
}
diff --git a/base/system/diskpart/diskpart_msg.mc b/base/system/diskpart/diskpart_msg.mc
index ea90f9d9a6a..248238e30ef 100644
--- a/base/system/diskpart/diskpart_msg.mc
+++ b/base/system/diskpart/diskpart_msg.mc
@@ -492,34 +492,216 @@ SymbolicName=MSG_COMMAND_CLEAN
Severity=Informational
Facility=System
Language=English
-<Add CLEAN command help text here>
+ Removes any and all partition or volume formatting from the disk with
+ focus.
+
+Syntax: CLEAN [ALL]
+
+ ALL Specifies that each and every byte\sector on the disk is set to
+ zero, which completely deletes all data contained on the disk.
+
+ On master boot record (MBR) disks, only the MBR partitioning information
+ and hidden sector information are overwritten. On GUID partition table
+ (GPT) disks, the GPT partitioning information, including the Protective
+ MBR, is overwritten. If the ALL parameter is not used, the first 1MB
+ and the last 1MB of the disk are zeroed. This erases any disk formatting
+ that had been previously applied to the disk. The disk's state after
+ cleaning the disk is 'UNINITIALIZED'.
+
+Example:
+
+ CLEAN
.
Language=German
-<Add CLEAN command help text here>
+ Entfernt alle Partitions- oder Volumeformatierungen von dem Datenträger
+ mit dem Fokus.
+
+Syntax: CLEAN [ALL]
+
+ ALL Gibt an, dass jedes Byte\jeder Sektor auf dem Datenträger
+ auf Null gesetzt wird. Damit werden alle auf dem Datenträger
+ enthaltenen Daten vollständig gelöscht.
+
+ Auf MBR-Datenträgern (Master Boot Record) werden nur MBR-
+ Partitionierungsinformationen und Informationen zu ausgeblendeten
+ Sektoren überschrieben. Auf GUID-Partitionstabellen-Datenträgern
+ (GPT) werden die GPT-Partitionierungsinformationen (einschließlich
+ Schutz-MBR) überschrieben. If the ALL parameter is not used, the first 1MB
+ and the last 1MB of the disk are zeroed. This erases any disk formatting
+ that had been previously applied to the disk. The disk's state after
+ cleaning the disk is 'UNINITIALIZED'.
+
+Example:
+
+ CLEAN
.
Language=Polish
-<Add CLEAN command help text here>
+ Removes any and all partition or volume formatting from the disk with
+ focus.
+
+Syntax: CLEAN [ALL]
+
+ ALL Specifies that each and every byte\sector on the disk is set to
+ zero, which completely deletes all data contained on the disk.
+
+ On master boot record (MBR) disks, only the MBR partitioning information
+ and hidden sector information are overwritten. On GUID partition table
+ (GPT) disks, the GPT partitioning information, including the Protective
+ MBR, is overwritten. If the ALL parameter is not used, the first 1MB
+ and the last 1MB of the disk are zeroed. This erases any disk formatting
+ that had been previously applied to the disk. The disk's state after
+ cleaning the disk is 'UNINITIALIZED'.
+
+Example:
+
+ CLEAN
.
Language=Portugese
-<Add CLEAN command help text here>
+ Removes any and all partition or volume formatting from the disk with
+ focus.
+
+Syntax: CLEAN [ALL]
+
+ ALL Specifies that each and every byte\sector on the disk is set to
+ zero, which completely deletes all data contained on the disk.
+
+ On master boot record (MBR) disks, only the MBR partitioning information
+ and hidden sector information are overwritten. On GUID partition table
+ (GPT) disks, the GPT partitioning information, including the Protective
+ MBR, is overwritten. If the ALL parameter is not used, the first 1MB
+ and the last 1MB of the disk are zeroed. This erases any disk formatting
+ that had been previously applied to the disk. The disk's state after
+ cleaning the disk is 'UNINITIALIZED'.
+
+Example:
+
+ CLEAN
.
Language=Romanian
-<Add CLEAN command help text here>
+ Removes any and all partition or volume formatting from the disk with
+ focus.
+
+Syntax: CLEAN [ALL]
+
+ ALL Specifies that each and every byte\sector on the disk is set to
+ zero, which completely deletes all data contained on the disk.
+
+ On master boot record (MBR) disks, only the MBR partitioning information
+ and hidden sector information are overwritten. On GUID partition table
+ (GPT) disks, the GPT partitioning information, including the Protective
+ MBR, is overwritten. If the ALL parameter is not used, the first 1MB
+ and the last 1MB of the disk are zeroed. This erases any disk formatting
+ that had been previously applied to the disk. The disk's state after
+ cleaning the disk is 'UNINITIALIZED'.
+
+Example:
+
+ CLEAN
.
Language=Russian
-<Add CLEAN command help text here>
+ Removes any and all partition or volume formatting from the disk with
+ focus.
+
+Syntax: CLEAN [ALL]
+
+ ALL Specifies that each and every byte\sector on the disk is set to
+ zero, which completely deletes all data contained on the disk.
+
+ On master boot record (MBR) disks, only the MBR partitioning information
+ and hidden sector information are overwritten. On GUID partition table
+ (GPT) disks, the GPT partitioning information, including the Protective
+ MBR, is overwritten. If the ALL parameter is not used, the first 1MB
+ and the last 1MB of the disk are zeroed. This erases any disk formatting
+ that had been previously applied to the disk. The disk's state after
+ cleaning the disk is 'UNINITIALIZED'.
+
+Example:
+
+ CLEAN
.
Language=Albanian
-<Add CLEAN command help text here>
+ Removes any and all partition or volume formatting from the disk with
+ focus.
+
+Syntax: CLEAN [ALL]
+
+ ALL Specifies that each and every byte\sector on the disk is set to
+ zero, which completely deletes all data contained on the disk.
+
+ On master boot record (MBR) disks, only the MBR partitioning information
+ and hidden sector information are overwritten. On GUID partition table
+ (GPT) disks, the GPT partitioning information, including the Protective
+ MBR, is overwritten. If the ALL parameter is not used, the first 1MB
+ and the last 1MB of the disk are zeroed. This erases any disk formatting
+ that had been previously applied to the disk. The disk's state after
+ cleaning the disk is 'UNINITIALIZED'.
+
+Example:
+
+ CLEAN
.
Language=Turkish
-<Add CLEAN command help text here>
+ Removes any and all partition or volume formatting from the disk with
+ focus.
+
+Syntax: CLEAN [ALL]
+
+ ALL Specifies that each and every byte\sector on the disk is set to
+ zero, which completely deletes all data contained on the disk.
+
+ On master boot record (MBR) disks, only the MBR partitioning information
+ and hidden sector information are overwritten. On GUID partition table
+ (GPT) disks, the GPT partitioning information, including the Protective
+ MBR, is overwritten. If the ALL parameter is not used, the first 1MB
+ and the last 1MB of the disk are zeroed. This erases any disk formatting
+ that had been previously applied to the disk. The disk's state after
+ cleaning the disk is 'UNINITIALIZED'.
+
+Example:
+
+ CLEAN
.
Language=Chinese
-<Add CLEAN command help text here>
+ Removes any and all partition or volume formatting from the disk with
+ focus.
+
+Syntax: CLEAN [ALL]
+
+ ALL Specifies that each and every byte\sector on the disk is set to
+ zero, which completely deletes all data contained on the disk.
+
+ On master boot record (MBR) disks, only the MBR partitioning information
+ and hidden sector information are overwritten. On GUID partition table
+ (GPT) disks, the GPT partitioning information, including the Protective
+ MBR, is overwritten. If the ALL parameter is not used, the first 1MB
+ and the last 1MB of the disk are zeroed. This erases any disk formatting
+ that had been previously applied to the disk. The disk's state after
+ cleaning the disk is 'UNINITIALIZED'.
+
+Example:
+
+ CLEAN
.
Language=Taiwanese
-<Add CLEAN command help text here>
+ Removes any and all partition or volume formatting from the disk with
+ focus.
+
+Syntax: CLEAN [ALL]
+
+ ALL Specifies that each and every byte\sector on the disk is set to
+ zero, which completely deletes all data contained on the disk.
+
+ On master boot record (MBR) disks, only the MBR partitioning information
+ and hidden sector information are overwritten. On GUID partition table
+ (GPT) disks, the GPT partitioning information, including the Protective
+ MBR, is overwritten. If the ALL parameter is not used, the first 1MB
+ and the last 1MB of the disk are zeroed. This erases any disk formatting
+ that had been previously applied to the disk. The disk's state after
+ cleaning the disk is 'UNINITIALIZED'.
+
+Example:
+
+ CLEAN
.
@@ -2325,7 +2507,64 @@ SymbolicName=MSG_COMMAND_SETID
Severity=Informational
Facility=System
Language=English
-<Add SETID command help text here>
+ Changes the partition type field for the partition with focus.
+
+Syntax: SET ID={<BYTE> | <GUID>} [OVERRIDE] [NOERR]
+
+ ID={<BYTE> | <GUID>}
+
+ Specifies the new partition type.
+ For master boot record (MBR) disks, you can specify a partition
+ type byte, in hexadecimal form, for the partition. Any
+ partition type byte can be specified with this parameter except
+ for type 0x42 (LDM partition). Note that the leading '0x' is
+ omitted when specifying the hexadecimal partition type.
+
+ For GUID partition table (GPT) disks you can specify a
+ partition type GUID for the partition. Recognized GUIDs
+ include:
+
+ EFI System partition:
+ c12a7328-f81f-11d2-ba4b-00a0c93ec93b
+
+ Basic data partition:
+ ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
+
+ Any partition type GUID can be specified with this parameter
+ except for the following:
+
+ Microsoft Reserved partition:
+ e3c9e316-0b5c-4db8-817d-f92df00215a
+
+ LDM Metadata partition on a dynamic disk:
+ 5808c8aa-7e8f-42e0-85d2-e1e90434cfb3
+
+ LDM Data partition on a dynamic disk:
+ af9b60a0-1431-4f62-bc68-3311714a69ad
+
+ Cluster Metadata partition:
+ db97dba9-0840-4bae-97f0-ffb9a327c7e1
+
+
+ Other than the limitations mentioned, DiskPart otherwise does
+ not check the partition type for validity except to ensure that
+ it is a byte in hexadecimal form or a GUID.
+
+ OVERRIDE Enables DiskPart to force the file system on the volume to
+ dismount before changing the partition type. When changing
+ the partition type, DiskPart will attempt to lock and dismount
+ the file system on the volume. If this parameter is not specified,
+ and the call to lock the file system fails, (because some other
+ application has an open handle to the volume), the entire
+ operation will fail. When this parameter is specified, the
+ dismount is forced even if the call to lock the file system
+ fails. When a file system is dismounted, all opened handles to
+ the volume will become invalid.
+
+ 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.\r\n\r\n Intended for Original Equipment
Manufacturer (OEM) use only.\r\n\r\n A partition must be selected for this operation to
succeed.\r\n\r\n Caution:\r\n\r\n Changing partition type fields with this
parameter might cause your\r\n computer to fail or be unable to start up. Unless
you are an OEM or an\r\n IT professional experienced with GPT disks, do not change
partition\r\n type fields on GPT disks using this pa [...]
.
Language=German
<Add SETID command help text here>
diff --git a/base/system/diskpart/lang/de-DE.rc b/base/system/diskpart/lang/de-DE.rc
index 85a656dd066..4b7b5a2836d 100644
--- a/base/system/diskpart/lang/de-DE.rc
+++ b/base/system/diskpart/lang/de-DE.rc
@@ -15,6 +15,12 @@ Usage: DISKPART [/S filename] [/T timeout] [/?]\n\n\
IDS_APP_PROMPT "DISKPART> "
END
+STRINGTABLE
+BEGIN
+ IDS_CREATE_PARTITION_FAIL "\nDie angegebene Partition konnte nicht erstellt
werden.\n"
+ IDS_CREATE_PARTITION_SUCCESS "\nDie angegebene Partition wurde erfolgreich
erstellt.\n"
+END
+
/* Disk Information Labels */
STRINGTABLE
BEGIN
diff --git a/base/system/diskpart/lang/en-US.rc b/base/system/diskpart/lang/en-US.rc
index 1554d37cee8..07f4c0a5fe7 100644
--- a/base/system/diskpart/lang/en-US.rc
+++ b/base/system/diskpart/lang/en-US.rc
@@ -15,6 +15,12 @@ Usage: DISKPART [/S filename] [/T timeout] [/?]\n\n\
IDS_APP_PROMPT "DISKPART> "
END
+STRINGTABLE
+BEGIN
+ IDS_CREATE_PARTITION_FAIL "\nDiskPart was unable to create the specified
partition.\n"
+ IDS_CREATE_PARTITION_SUCCESS "\nDiskPart succeeded in creating the specified
partition.\n"
+END
+
/* Disk Information Labels */
STRINGTABLE
BEGIN
diff --git a/base/system/diskpart/lang/pl-PL.rc b/base/system/diskpart/lang/pl-PL.rc
index f392db0f256..662761d248c 100644
--- a/base/system/diskpart/lang/pl-PL.rc
+++ b/base/system/diskpart/lang/pl-PL.rc
@@ -15,6 +15,12 @@ Sposób użycia: DISKPART [/S nazwa_pliku] [/T limit_czasu] [/?]\n\n\
IDS_APP_PROMPT "DISKPART> "
END
+STRINGTABLE
+BEGIN
+ IDS_CREATE_PARTITION_FAIL "\nDiskPart was unable to create the specified
partition.\n"
+ IDS_CREATE_PARTITION_SUCCESS "\nDiskPart succeeded in creating the specified
partition.\n"
+END
+
/* Disk Information Labels */
STRINGTABLE
BEGIN
diff --git a/base/system/diskpart/lang/pt-PT.rc b/base/system/diskpart/lang/pt-PT.rc
index b39f2027624..176a551d0e6 100644
--- a/base/system/diskpart/lang/pt-PT.rc
+++ b/base/system/diskpart/lang/pt-PT.rc
@@ -17,6 +17,12 @@ Usage: DISKPART [/S filename] [/T timeout] [/?]\n\n\
IDS_APP_PROMPT "DISKPART> "
END
+STRINGTABLE
+BEGIN
+ IDS_CREATE_PARTITION_FAIL "\nDiskPart was unable to create the specified
partition.\n"
+ IDS_CREATE_PARTITION_SUCCESS "\nDiskPart succeeded in creating the specified
partition.\n"
+END
+
/* Disk Information Labels */
STRINGTABLE
BEGIN
diff --git a/base/system/diskpart/lang/ro-RO.rc b/base/system/diskpart/lang/ro-RO.rc
index 337dc506afb..b867bd0befe 100644
--- a/base/system/diskpart/lang/ro-RO.rc
+++ b/base/system/diskpart/lang/ro-RO.rc
@@ -17,6 +17,12 @@ Utilizare: DISKPART [/S numefișier] [/T timplimită] [/?]\n\n\
IDS_APP_PROMPT "DISKPART> "
END
+STRINGTABLE
+BEGIN
+ IDS_CREATE_PARTITION_FAIL "\nDiskPart was unable to create the specified
partition.\n"
+ IDS_CREATE_PARTITION_SUCCESS "\nDiskPart succeeded in creating the specified
partition.\n"
+END
+
/* Disk Information Labels */
STRINGTABLE
BEGIN
diff --git a/base/system/diskpart/lang/ru-RU.rc b/base/system/diskpart/lang/ru-RU.rc
index 320aaa12620..9867d475e57 100644
--- a/base/system/diskpart/lang/ru-RU.rc
+++ b/base/system/diskpart/lang/ru-RU.rc
@@ -17,6 +17,12 @@ BEGIN
IDS_APP_PROMPT "DISKPART> "
END
+STRINGTABLE
+BEGIN
+ IDS_CREATE_PARTITION_FAIL "\nDiskPart was unable to create the specified
partition.\n"
+ IDS_CREATE_PARTITION_SUCCESS "\nDiskPart succeeded in creating the specified
partition.\n"
+END
+
/* Disk Information Labels */
STRINGTABLE
BEGIN
diff --git a/base/system/diskpart/lang/sq-AL.rc b/base/system/diskpart/lang/sq-AL.rc
index d03ea2b3522..9e6948e20a8 100644
--- a/base/system/diskpart/lang/sq-AL.rc
+++ b/base/system/diskpart/lang/sq-AL.rc
@@ -19,6 +19,12 @@ Usage: DISKPART [/S filename] [/T timeout] [/?]\n\n\
IDS_APP_PROMPT, "DISKPART> "
END
+STRINGTABLE
+BEGIN
+ IDS_CREATE_PARTITION_FAIL "\nDiskPart was unable to create the specified
partition.\n"
+ IDS_CREATE_PARTITION_SUCCESS "\nDiskPart succeeded in creating the specified
partition.\n"
+END
+
/* Disk Information Labels */
STRINGTABLE
BEGIN
diff --git a/base/system/diskpart/lang/tr-TR.rc b/base/system/diskpart/lang/tr-TR.rc
index 61099db6c2e..45a8e740645 100644
--- a/base/system/diskpart/lang/tr-TR.rc
+++ b/base/system/diskpart/lang/tr-TR.rc
@@ -17,6 +17,12 @@ Kullanım: DISKPART [/S dosya adı] [/T zaman aşımı] [/?]\n\n\
IDS_APP_PROMPT "DISKPART> "
END
+STRINGTABLE
+BEGIN
+ IDS_CREATE_PARTITION_FAIL "\nDiskPart was unable to create the specified
partition.\n"
+ IDS_CREATE_PARTITION_SUCCESS "\nDiskPart succeeded in creating the specified
partition.\n"
+END
+
/* Disk Information Labels */
STRINGTABLE
BEGIN
diff --git a/base/system/diskpart/lang/zh-CN.rc b/base/system/diskpart/lang/zh-CN.rc
index ab86d06dc8e..810919c5b40 100644
--- a/base/system/diskpart/lang/zh-CN.rc
+++ b/base/system/diskpart/lang/zh-CN.rc
@@ -24,6 +24,12 @@ Usage: DISKPART [/S filename] [/T timeout] [/?]\n\n\
IDS_APP_PROMPT "DISKPART> "
END
+STRINGTABLE
+BEGIN
+ IDS_CREATE_PARTITION_FAIL "\nDiskPart was unable to create the specified
partition.\n"
+ IDS_CREATE_PARTITION_SUCCESS "\nDiskPart succeeded in creating the specified
partition.\n"
+END
+
/* Disk Information Labels */
STRINGTABLE
BEGIN
diff --git a/base/system/diskpart/lang/zh-TW.rc b/base/system/diskpart/lang/zh-TW.rc
index fbdbf64992e..bfc4599ee8d 100644
--- a/base/system/diskpart/lang/zh-TW.rc
+++ b/base/system/diskpart/lang/zh-TW.rc
@@ -18,6 +18,12 @@ Usage: DISKPART [/S 檔名] [/T 逾時] [/?]\n\n\
IDS_APP_PROMPT "DISKPART> "
END
+STRINGTABLE
+BEGIN
+ IDS_CREATE_PARTITION_FAIL "\nDiskPart was unable to create the specified
partition.\n"
+ IDS_CREATE_PARTITION_SUCCESS "\nDiskPart succeeded in creating the specified
partition.\n"
+END
+
/* Disk Information Labels */
STRINGTABLE
BEGIN
diff --git a/base/system/diskpart/resource.h b/base/system/diskpart/resource.h
index 51a3946af55..3081fc4ef87 100644
--- a/base/system/diskpart/resource.h
+++ b/base/system/diskpart/resource.h
@@ -18,6 +18,10 @@
#define IDS_APP_LEAVING 4
#define IDS_APP_PROMPT 5
+#define IDS_CREATE_PARTITION_FAIL 1050
+#define IDS_CREATE_PARTITION_SUCCESS 1051
+
+
#define IDS_DETAIL_INFO_DISK_ID 1107
#define IDS_DETAIL_INFO_TYPE 1108
#define IDS_DETAIL_INFO_STATUS 1109