iPXE
FileSystemInfo.h
Go to the documentation of this file.
00001 /** @file
00002   Provides a GUID and a data structure that can be used with EFI_FILE_PROTOCOL.GetInfo()
00003   or EFI_FILE_PROTOCOL.SetInfo() to get or set information about the system's volume.
00004   This GUID is defined in UEFI specification.
00005 
00006 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
00007 This program and the accompanying materials are licensed and made available under
00008 the terms and conditions of the BSD License that accompanies this distribution.
00009 The full text of the license may be found at
00010 http://opensource.org/licenses/bsd-license.php.
00011 
00012 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
00013 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
00014 
00015 **/
00016 
00017 #ifndef __FILE_SYSTEM_INFO_H__
00018 #define __FILE_SYSTEM_INFO_H__
00019 
00020 FILE_LICENCE ( BSD3 );
00021 
00022 #define EFI_FILE_SYSTEM_INFO_ID \
00023   { \
00024     0x9576e93, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
00025   }
00026 
00027 typedef struct {
00028   ///
00029   /// The size of the EFI_FILE_SYSTEM_INFO structure, including the Null-terminated VolumeLabel string.
00030   ///
00031   UINT64  Size;
00032   ///
00033   /// TRUE if the volume only supports read access.
00034   ///
00035   BOOLEAN ReadOnly;
00036   ///
00037   /// The number of bytes managed by the file system.
00038   ///
00039   UINT64  VolumeSize;
00040   ///
00041   /// The number of available bytes for use by the file system.
00042   ///
00043   UINT64  FreeSpace;
00044   ///
00045   /// The nominal block size by which files are typically grown.
00046   ///
00047   UINT32  BlockSize;
00048   ///
00049   /// The Null-terminated string that is the volume's label.
00050   ///
00051   CHAR16  VolumeLabel[1];
00052 } EFI_FILE_SYSTEM_INFO;
00053 
00054 ///
00055 /// The VolumeLabel field of the EFI_FILE_SYSTEM_INFO data structure is variable length.
00056 /// Whenever code needs to know the size of the EFI_FILE_SYSTEM_INFO data structure, it needs
00057 /// to be the size of the data structure without the VolumeLable field.  The following macro
00058 /// computes this size correctly no matter how big the VolumeLable array is declared.
00059 /// This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI compilant.
00060 ///
00061 #define SIZE_OF_EFI_FILE_SYSTEM_INFO  OFFSET_OF (EFI_FILE_SYSTEM_INFO, VolumeLabel)
00062 
00063 extern EFI_GUID gEfiFileSystemInfoGuid;
00064 
00065 #endif