summaryrefslogtreecommitdiffstats
path: root/FatPkg/EnhancedFatDxe/Init.c
diff options
context:
space:
mode:
authorQing Huang <qing.huang@intel.com>2010-03-18 01:56:21 +0000
committerJordan Justen <jordan.l.justen@intel.com>2016-04-06 23:22:43 -0700
commit25ce9b1f060d27a4f893d3b494007ae74dd425bf (patch)
treedf825012b19c4580bb39e5a073150cda4e13d267 /FatPkg/EnhancedFatDxe/Init.c
parente8e7878f0d381afa9f19a574b56a794543d9a203 (diff)
downloadedk2-25ce9b1f060d27a4f893d3b494007ae74dd425bf.tar.gz
edk2-25ce9b1f060d27a4f893d3b494007ae74dd425bf.tar.bz2
edk2-25ce9b1f060d27a4f893d3b494007ae74dd425bf.zip
Fix a migration bug in Fat driver as the value of lock has been changed from EDK library to EDKII library
(based on FatPkg commit c243d2ce08e76bfaefc0a3e9256603993a3b5ebe) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'FatPkg/EnhancedFatDxe/Init.c')
-rw-r--r--FatPkg/EnhancedFatDxe/Init.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/FatPkg/EnhancedFatDxe/Init.c b/FatPkg/EnhancedFatDxe/Init.c
index b0e34d18cd..e18ff54474 100644
--- a/FatPkg/EnhancedFatDxe/Init.c
+++ b/FatPkg/EnhancedFatDxe/Init.c
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2005 - 2007, Intel Corporation
+Copyright (c) 2005 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
distribution. The full text of the license may be found at
@@ -64,8 +64,8 @@ Returns:
// Acquire the lock.
// If caller has already acquired the lock, cannot lock it again.
//
- if (!FatIsLocked ()) {
- FatAcquireLock ();
+ Status = FatAcquireLockOrFail ();
+ if (!EFI_ERROR (Status)) {
LockedByMe = TRUE;
}
//
@@ -180,9 +180,9 @@ Returns:
// means we are in the process of some Fat operation),
// we can not acquire again.
//
- if (!FatIsLocked ()) {
+ Status = FatAcquireLockOrFail ();
+ if (!EFI_ERROR (Status)) {
LockedByMe = TRUE;
- FatAcquireLock ();
}
//
// The volume is still being used. Hence, set error flag for all OFiles still in