From da0bff2a50ed0ed3bf624abbbc974481eba456dd Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Tue, 7 Jun 2022 19:42:09 +0200 Subject: [PATCH] [DISKPART] Implement the UNIQUEID command --- base/system/diskpart/uniqueid.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/base/system/diskpart/uniqueid.c b/base/system/diskpart/uniqueid.c index 0637112cdb9..712ca56a96f 100644 --- a/base/system/diskpart/uniqueid.c +++ b/base/system/diskpart/uniqueid.c @@ -48,7 +48,7 @@ UniqueIdDisk( } if ((pszSuffix == NULL) || - (wcslen(pszSuffix) > 8) || + (wcslen(pszSuffix) != 8) || (IsHexString(pszSuffix) == FALSE)) { ConResPuts(StdErr, IDS_ERROR_INVALID_ARGS); @@ -62,12 +62,11 @@ UniqueIdDisk( return TRUE; } - ConPrintf(StdOut, L"Setting the disk signature is not implemented yet!\n"); -#if 0 - DPRINT1("New Signature: %lx\n", ulValue); + DPRINT("New Signature: 0x%08lx\n", ulValue); CurrentDisk->LayoutBuffer->Signature = ulValue; -// SetDiskLayout(CurrentDisk); -#endif + CurrentDisk->Dirty = TRUE; + UpdateDiskLayout(CurrentDisk); + WritePartitions(CurrentDisk); return TRUE; }