X-Git-Url: https://code.delx.au/refind/blobdiff_plain/23bacafa3d234a028a8870a6cf8f1a2af61b1d97..899b647b89d57f623e69d3a890dbee84a7dfe451:/filesystems/fsw_efi.c diff --git a/filesystems/fsw_efi.c b/filesystems/fsw_efi.c index add1bd8..5313069 100644 --- a/filesystems/fsw_efi.c +++ b/filesystems/fsw_efi.c @@ -34,6 +34,9 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* + * Changes by Roderick Smith are licensed under the preceding terms. + */ #include "fsw_efi.h" #include "fsw_core.h" @@ -75,7 +78,7 @@ EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid = EFI_FILE_SYSTEM_VOLUME_LABEL_INFO /** Helper macro for stringification. */ #define FSW_EFI_STRINGIFY(x) #x /** Expands to the EFI driver name given the file system type name. */ -#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.8.2 " FSW_EFI_STRINGIFY(t) L" File System Driver" +#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.8.5 " FSW_EFI_STRINGIFY(t) L" File System Driver" // function prototypes @@ -1084,7 +1087,7 @@ EFI_STATUS fsw_efi_dnode_getinfo(IN FSW_FILE_DATA *File, * appropriate member of the EFI_FILE_INFO structure that we're filling. */ -static void fsw_efi_store_time_posix(struct fsw_dnode_stat *sb, int which, fsw_u32 posix_time) +void fsw_store_time_posix(struct fsw_dnode_stat *sb, int which, fsw_u32 posix_time) { EFI_FILE_INFO *FileInfo = (EFI_FILE_INFO *)sb->host_data; @@ -1102,7 +1105,7 @@ static void fsw_efi_store_time_posix(struct fsw_dnode_stat *sb, int which, fsw_u * adjustments to the EFI_FILE_INFO structure that we're filling. */ -static void fsw_efi_store_attr_posix(struct fsw_dnode_stat *sb, fsw_u16 posix_mode) +void fsw_store_attr_posix(struct fsw_dnode_stat *sb, fsw_u16 posix_mode) { EFI_FILE_INFO *FileInfo = (EFI_FILE_INFO *)sb->host_data; @@ -1110,6 +1113,13 @@ static void fsw_efi_store_attr_posix(struct fsw_dnode_stat *sb, fsw_u16 posix_mo FileInfo->Attribute |= EFI_FILE_READ_ONLY; } +void fsw_store_attr_efi(struct fsw_dnode_stat *sb, fsw_u16 attr) +{ + EFI_FILE_INFO *FileInfo = (EFI_FILE_INFO *)sb->host_data; + + FileInfo->Attribute |= attr; +} + /** * Common function to fill an EFI_FILE_INFO with information about a dnode. */ @@ -1155,8 +1165,6 @@ EFI_STATUS fsw_efi_dnode_fill_FileInfo(IN FSW_VOLUME_DATA *Volume, // get the missing info from the fs driver ZeroMem(&sb, sizeof(struct fsw_dnode_stat)); - sb.store_time_posix = fsw_efi_store_time_posix; - sb.store_attr_posix = fsw_efi_store_attr_posix; sb.host_data = FileInfo; Status = fsw_efi_map_status(fsw_dnode_stat(dno, &sb), Volume); if (EFI_ERROR(Status))