]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FatPkg/EnhancedFatDxe/Init.c
FatPkg: Refine casting expression result to bigger size
[mirror_edk2.git] / FatPkg / EnhancedFatDxe / Init.c
index d7cfa823c84ccd3a72c41383d2ba53105cbf2ba0..6febffcddd62f1a5186988d9497b83819ba2df3b 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Initialization routines.\r
 \r
 Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available\r
@@ -9,19 +10,25 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
+**/\r
 \r
-Module Name:\r
-\r
-  Init.c\r
+#include "Fat.h"\r
 \r
-Abstract:\r
+/**\r
 \r
-  Initialization routines\r
+  Allocates volume structure, detects FAT file system, installs protocol,\r
+  and initialize cache.\r
 \r
---*/\r
+  @param  Handle                - The handle of parent device.\r
+  @param  DiskIo                - The DiskIo of parent device.\r
+  @param  DiskIo2               - The DiskIo2 of parent device.\r
+  @param  BlockIo               - The BlockIo of parent devicel\r
 \r
-#include "Fat.h"\r
+  @retval EFI_SUCCESS           - Allocate a new volume successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  - Can not allocate the memory.\r
+  @return Others                - Allocating a new volume failed.\r
 \r
+**/\r
 EFI_STATUS\r
 FatAllocateVolume (\r
   IN  EFI_HANDLE                Handle,\r
@@ -29,26 +36,6 @@ FatAllocateVolume (
   IN  EFI_DISK_IO2_PROTOCOL     *DiskIo2,\r
   IN  EFI_BLOCK_IO_PROTOCOL     *BlockIo\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocates volume structure, detects FAT file system, installs protocol,\r
-  and initialize cache.\r
-\r
-Arguments:\r
-\r
-  Handle                - The handle of parent device.\r
-  DiskIo                - The DiskIo of parent device.\r
-  BlockIo               - The BlockIo of parent devicel\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Allocate a new volume successfully.\r
-  EFI_OUT_OF_RESOURCES  - Can not allocate the memory.\r
-  Others                - Allocating a new volume failed.\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
   FAT_VOLUME  *Volume;\r
@@ -120,26 +107,20 @@ Done:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-FatAbandonVolume (\r
-  IN FAT_VOLUME *Volume\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Called by FatDriverBindingStop(), Abandon the volume.\r
 \r
-Arguments:\r
-\r
-  Volume                - The volume to be abandoned.\r
-\r
-Returns:\r
+  @param  Volume                - The volume to be abandoned.\r
 \r
-  EFI_SUCCESS           - Abandoned the volume successfully.\r
-  Others                - Can not uninstall the protocol interfaces.\r
+  @retval EFI_SUCCESS           - Abandoned the volume successfully.\r
+  @return Others                - Can not uninstall the protocol interfaces.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+FatAbandonVolume (\r
+  IN FAT_VOLUME *Volume\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   BOOLEAN     LockedByMe;\r
@@ -202,27 +183,21 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-FatOpenDevice (\r
-  IN OUT FAT_VOLUME           *Volume\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Detects FAT file system on Disk and set relevant fields of Volume\r
-\r
-Arguments:\r
+/**\r
 \r
-  Volume                - The volume structure.\r
+  Detects FAT file system on Disk and set relevant fields of Volume.\r
 \r
-Returns:\r
+  @param Volume                - The volume structure.\r
 \r
-  EFI_SUCCESS           - The Fat File System is detected successfully\r
-  EFI_UNSUPPORTED       - The volume is not FAT file system.\r
-  EFI_VOLUME_CORRUPTED  - The volume is corrupted.\r
+  @retval EFI_SUCCESS           - The Fat File System is detected successfully\r
+  @retval EFI_UNSUPPORTED       - The volume is not FAT file system.\r
+  @retval EFI_VOLUME_CORRUPTED  - The volume is corrupted.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+FatOpenDevice (\r
+  IN OUT FAT_VOLUME           *Volume\r
+  )\r
 {\r
   EFI_STATUS            Status;\r
   UINT32                BlockSize;\r