diff options
author | Ronald Cron <Ronald.Cron@arm.com> | 2014-12-12 19:06:10 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@Edk2> | 2014-12-12 19:06:10 +0000 |
commit | 95204533ad8ef83e0f5128ce03831eb5bcbac6cf (patch) | |
tree | bb621751a1724a0d9788f2367bd6de5c17e98650 /ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsInternal.h | |
parent | fb08c45511edba2bc8f129135d1916eab02ee2fc (diff) | |
download | edk2-platforms-95204533ad8ef83e0f5128ce03831eb5bcbac6cf.tar.xz |
ArmPlatformPkg/BootMonFs: Fix the setting of information about a file
Rework the setting of information about a file, in particular
file resizing, file renaming and the returned error codes in case
of error. This rework has implied a rework of the read, write, close
and flush functions.
To strickly separate what has been actually written to the media (flushed)
from what has not been written when a file is open, an "Info" field has
been added to the description of a file.
The field is used to store the modifications done to the file by the
means of SetInfo() like the change of the name or of the size. Such
changes are written to the media only when a flush occurs.
When a file is open, the information pointed to by the "Info" field is
always up-to-date. This is not the case of the information stored in
the "HwDescription" of the file description which from now is just a
mirror of what is written on the media.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron <Ronald.Cron@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16511 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsInternal.h')
-rw-r--r-- | ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsInternal.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsInternal.h b/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsInternal.h index 57343618ab..c0c6599cb7 100644 --- a/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsInternal.h +++ b/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsInternal.h @@ -54,8 +54,14 @@ typedef struct { EFI_FILE_PROTOCOL File;
+ //
+ // The following fields are relevant only if the file is open.
+ //
+
+ EFI_FILE_INFO *Info;
UINT64 Position;
- // If the file needs to be flushed then this list contain the memory buffer that creates this file
+ // If the file needs to be flushed then this list contain the memory
+ // buffer that creates this file
LIST_ENTRY RegionToFlushLink;
UINT64 OpenMode;
} BOOTMON_FS_FILE;
|