// Set file system information.\r
//\r
if (CompareGuid (InformationType, &gEfiFileSystemInfoGuid)) {\r
- if (BufferSize < SIZE_OF_EFI_FILE_SYSTEM_INFO + StrSize (PrivateRoot->VolumeLabel)) {\r
+ NewFileSystemInfo = (EFI_FILE_SYSTEM_INFO *) Buffer;\r
+ if (BufferSize < SIZE_OF_EFI_FILE_SYSTEM_INFO + StrSize (NewFileSystemInfo->VolumeLabel)) {\r
Status = EFI_BAD_BUFFER_SIZE;\r
goto Done;\r
}\r
\r
- NewFileSystemInfo = (EFI_FILE_SYSTEM_INFO *) Buffer;\r
\r
FreePool (PrivateRoot->VolumeLabel);\r
PrivateRoot->VolumeLabel = AllocatePool (StrSize (NewFileSystemInfo->VolumeLabel));\r
FreePool (TempFileName);\r
}\r
} else {\r
+ Status = EFI_ACCESS_DENIED;\r
Reopen: ;\r
- Status = EFI_DEVICE_ERROR;\r
\r
NtStatus = PrivateFile->WinNtThunk->SetFileAttributes (OldFileName, OldAttr);\r
\r
NtStatus = PrivateFile->WinNtThunk->SetFileAttributes (NewFileName, NewAttr);\r
\r
if (!NtStatus) {\r
+ Status = EFI_DEVICE_ERROR;\r
goto Reopen;\r
}\r
\r