MdeModulePkg/UdfDxe: Update GetInfo() for FS VolumeLabel info request

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1175

This commit will update the UdfGetInfo() function with the support of
EFI_FILE_SYSTEM_VOLUME_LABEL data information request.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Paulo Alcantara <palcantara@suse.de>
Acked-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Hao Wu
2018-10-12 14:49:41 +08:00
parent 6a926aaed7
commit 32698a8f01
4 changed files with 146 additions and 63 deletions

View File

@@ -900,6 +900,33 @@ SetFileInfo (
OUT VOID *Buffer
);
/**
Get volume label of an UDF volume.
@attention This is boundary function that may receive untrusted input.
@attention The input is from FileSystem.
The File Set Descriptor is external input, so this routine will do basic
validation for File Set Descriptor and report status.
@param[in] Volume Volume information pointer.
@param[in] CharMax The maximum number of Unicode char in String,
including terminating null char.
@param[out] String String buffer pointer to store the volume label.
@retval EFI_SUCCESS Volume label is returned.
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
@retval EFI_BUFFER_TOO_SMALL The string buffer String cannot hold the
volume label.
**/
EFI_STATUS
GetVolumeLabel (
IN UDF_VOLUME_INFO *Volume,
IN UINTN CharMax,
OUT CHAR16 *String
);
/**
Get volume and free space size information of an UDF volume.