mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-24 10:17:45 +02:00
FatPkg: Adds support for read-only mode
Implements gEfiFatPkgTokenSpaceGuid token space and adds token which disables write operations. By default driver still supports read-write mode Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
This commit is contained in:
parent
c8a9df31b3
commit
5b09f83e0c
@ -56,6 +56,7 @@
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
FatPkg/FatPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
UefiRuntimeServicesTableLib
|
||||
@ -82,6 +83,7 @@
|
||||
gEfiUnicodeCollation2ProtocolGuid ## TO_START
|
||||
|
||||
[Pcd]
|
||||
gEfiFatPkgTokenSpaceGuid.PcdFatReadOnlyMode ## CONSUMES
|
||||
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLang ## SOMETIMES_CONSUMES
|
||||
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang ## SOMETIMES_CONSUMES
|
||||
[UserExtensions.TianoCore."ExtraFiles"]
|
||||
|
@ -51,7 +51,7 @@ FatAllocateVolume (
|
||||
Volume->DiskIo2 = DiskIo2;
|
||||
Volume->BlockIo = BlockIo;
|
||||
Volume->MediaId = BlockIo->Media->MediaId;
|
||||
Volume->ReadOnly = BlockIo->Media->ReadOnly;
|
||||
Volume->ReadOnly = BlockIo->Media->ReadOnly || FeaturePcdGet (PcdFatReadOnlyMode);
|
||||
Volume->VolumeInterface.Revision = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION;
|
||||
Volume->VolumeInterface.OpenVolume = FatOpenVolume;
|
||||
InitializeListHead (&Volume->CheckRef);
|
||||
|
@ -17,3 +17,16 @@
|
||||
|
||||
[UserExtensions.TianoCore."ExtraFiles"]
|
||||
FatPkgExtra.uni
|
||||
|
||||
[Guids]
|
||||
#
|
||||
# GUID defined in package
|
||||
#
|
||||
gEfiFatPkgTokenSpaceGuid = { 0xbe1f59ff, 0x65f5, 0x4b28, {0xb2, 0x8d, 0x56, 0x85, 0x36, 0x4a, 0xb1, 0xd2 } }
|
||||
|
||||
[PcdsFeatureFlag.common]
|
||||
## Indicates if driver is in read-only mode.<BR><BR>
|
||||
# TRUE - Restricts write operations.<BR>
|
||||
# FALSE - Write operations allowed. Default behavior<BR>
|
||||
# @Prompt Disables write operations on fat filesystem.
|
||||
gEfiFatPkgTokenSpaceGuid.PcdFatReadOnlyMode |FALSE|BOOLEAN|0x00000001
|
||||
|
@ -82,3 +82,6 @@
|
||||
[Components]
|
||||
FatPkg/FatPei/FatPei.inf
|
||||
FatPkg/EnhancedFatDxe/Fat.inf
|
||||
|
||||
[PcdsFeatureFlag]
|
||||
gEfiFatPkgTokenSpaceGuid.PcdFatReadOnlyMode|FALSE
|
||||
|
Loading…
x
Reference in New Issue
Block a user