+BOOL
+i386DiskNormalizeSystemPath(char *SystemPath, unsigned Size)
+{
+ CHAR BootPath[256];
+ ULONG PartitionNumber;
+ ULONG DriveNumber;
+ PARTITION_TABLE_ENTRY PartEntry;
+ char *p;
+
+ if (!DissectArcPath(SystemPath, BootPath, &DriveNumber, &PartitionNumber))
+ {
+ return FALSE;
+ }
+
+ if (0 != PartitionNumber)
+ {
+ return TRUE;
+ }
+
+ if (! DiskGetActivePartitionEntry(DriveNumber,
+ &PartEntry,
+ &PartitionNumber) ||
+ PartitionNumber < 1 || 9 < PartitionNumber)
+ {
+ return FALSE;
+ }
+
+ p = SystemPath;
+ while ('\0' != *p && 0 != strnicmp(p, "partition(", 10)) {
+ p++;
+ }
+ p = strchr(p, ')');
+ if (NULL == p || '0' != *(p - 1)) {
+ return FALSE;
+ }
+ *(p - 1) = '0' + PartitionNumber;
+
+ return TRUE;
+}
+