summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKamil Aronowski <kamil.aronowski@yahoo.com>2023-04-12 18:50:12 +0200
committerPeter Jones <pjones@redhat.com>2023-06-21 14:19:51 -0400
commit549d34691d68518e55c2edd6e759b19de7f8ddef (patch)
tree84bfec1f3e6d73869daad14c7a4c01e1a8980848 /lib
parentf7a4338f1b5ef03dca83ce44075e9d6e5897e037 (diff)
downloadefi-boot-shim-549d34691d68518e55c2edd6e759b19de7f8ddef.tar.gz
efi-boot-shim-549d34691d68518e55c2edd6e759b19de7f8ddef.zip
Rename 'msecs' to 'usecs' to avoid potential confusion
The function msleep uses gBS->Stall which waits for a specified number of microseconds. Reference: https://edk2-docs.gitbook.io/edk-ii-uefi-driver-writer-s-guide/5_uefi_services/51_services_that_uefi_drivers_commonly_use/517_stall This reference even mentions an example sleeping for 10 microseconds: // Wait 10 uS. Notice the letter 'u'. Therefore it's a good idea to call the function 'usleep' rather than 'msleep', so no one confuses it with milliseconds, and to change the argument name to match as well. Signed-off-by: Kamil Aronowski <kamil.aronowski@yahoo.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/console.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/console.c b/lib/console.c
index c7ca3bc2..a751f79d 100644
--- a/lib/console.c
+++ b/lib/console.c
@@ -745,9 +745,9 @@ setup_verbosity(VOID)
#ifndef SHIM_UNIT_TEST
VOID
-msleep(unsigned long msecs)
+usleep(unsigned long usecs)
{
- BS->Stall(msecs);
+ BS->Stall(usecs);
}
#endif