Skip to content

Commit 5c972c7

Browse files
raccognicholasbishop
authored andcommitted
Shortened error documentation for all methods in BootServices
I feel like the documentation for returned errors was too verbose and included many unnecessary words and sentences. This commit shortens them, while still including the most important information.
1 parent 1ee3f38 commit 5c972c7

File tree

1 file changed

+27
-46
lines changed

1 file changed

+27
-46
lines changed

uefi/src/table/boot.rs

Lines changed: 27 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,8 @@ impl BootServices {
344344
/// This function returns errors directly from the UEFI function
345345
/// `EFI_BOOT_SERVICES.AllocatePages()`.
346346
///
347-
/// Some errors have multiple different causes. See the function definition
348-
/// in the UEFI Specification, Chapter 7.2 for more information on possible
349-
/// causes for each error type.
347+
/// See the UEFI Specification, Chapter 7.2 for more information on each
348+
/// error type.
350349
///
351350
/// * [`uefi::Status::OUT_OF_RESOURCES`]
352351
/// * [`uefi::Status::INVALID_PARAMETER`]
@@ -372,8 +371,7 @@ impl BootServices {
372371
/// This function returns errors directly from the UEFI function
373372
/// `EFI_BOOT_SERVICES.FreePages()`.
374373
///
375-
/// See the function definition in the UEFI Specification, Chapter 7.2 for
376-
/// more information on each error type.
374+
/// See the UEFI Specification, Chapter 7.2 for more information on each error type.
377375
///
378376
/// * [`uefi::Status::NOT_FOUND`]
379377
/// * [`uefi::Status::INVALID_PARAMETER`]
@@ -429,9 +427,8 @@ impl BootServices {
429427
/// This function returns errors directly from the UEFI function
430428
/// `EFI_BOOT_SERVICES.GetMemoryMap()`.
431429
///
432-
/// Some errors have multiple different causes. See the function definition
433-
/// in the UEFI Specification, Chapter 7.2 for more information on possible
434-
/// causes for each error type.
430+
/// See the UEFI Specification, Chapter 7.2 for more information on each error
431+
/// type.
435432
///
436433
/// * [`uefi::Status::BUFFER_TOO_SMALL`]
437434
/// * [`uefi::Status::INVALID_PARAMETER`]
@@ -483,9 +480,7 @@ impl BootServices {
483480
/// This function returns errors directly from the UEFI function
484481
/// `EFI_BOOT_SERVICES.AllocatePool()`.
485482
///
486-
/// Some errors have multiple different causes. See the function definition
487-
/// in the UEFI Specification, Chapter 7.2 for more information on possible
488-
/// causes for each error type.
483+
/// See the UEFI Specification, Chapter 7.2 for more information on each error type.
489484
///
490485
/// * [`uefi::Status::OUT_OF_RESOURCES`]
491486
/// * [`uefi::Status::INVALID_PARAMETER`]
@@ -501,8 +496,7 @@ impl BootServices {
501496
/// This function returns errors directly from the UEFI function
502497
/// `EFI_BOOT_SERVICES.FreePool()`.
503498
///
504-
/// See the function definition in the UEFI Specification, Chapter 7.2 for
505-
/// more information on this error type.
499+
/// See the UEFI Specification, Chapter 7.2 for more details.
506500
///
507501
/// * [`uefi::Status::INVALID_PARAMETER`]
508502
pub fn free_pool(&self, addr: *mut u8) -> Result {
@@ -530,9 +524,8 @@ impl BootServices {
530524
/// This function returns errors directly from the UEFI function
531525
/// `EFI_BOOT_SERVICES.CreateEvent()`.
532526
///
533-
/// Some errors have multiple different causes. See the function definition
534-
/// in the UEFI Specification, Chapter 7.1 for more information on possible
535-
/// causes for each error type.
527+
/// See the UEFI Specification, Chapter 7.1 for more information on each
528+
/// error type.
536529
///
537530
/// * [`uefi::Status::INVALID_PARAMETER`]
538531
/// * [`uefi::Status::OUT_OF_RESOURCES`]
@@ -595,9 +588,7 @@ impl BootServices {
595588
/// This function returns errors directly from the UEFI function
596589
/// `EFI_BOOT_SERVICES.CreateEventEx()`.
597590
///
598-
/// Some errors have multiple different causes. See the function definition
599-
/// in the UEFI Specification, Chapter 7.1 for more information on possible
600-
/// causes for each error type.
591+
/// See the UEFI Specification, Chapter 7.1 for more information on each error type.
601592
///
602593
/// * [`uefi::Status::INVALID_PARAMETER`]
603594
/// * [`uefi::Status::OUT_OF_RESOURCES`]
@@ -633,8 +624,7 @@ impl BootServices {
633624
/// This function returns errors directly from the UEFI function
634625
/// `EFI_BOOT_SERVICES.SetTimer()`.
635626
///
636-
/// See the function definition in the UEFI Specification, Chapter 7.1 for more
637-
/// information on this error type.
627+
/// See the UEFI Specification, Chapter 7.1 for more details.
638628
///
639629
/// * [`uefi::Status::INVALID_PARAMETER`]
640630
pub fn set_timer(&self, event: &Event, trigger_time: TimerTrigger) -> Result {
@@ -679,9 +669,8 @@ impl BootServices {
679669
/// This function returns errors directly from the UEFI function
680670
/// `EFI_BOOT_SERVICES.WaitForEvent()`.
681671
///
682-
/// Some errors have multiple different causes. See the function definition
683-
/// in the UEFI Specification, Chapter 7.1 for more information on possible
684-
/// causes for each error type.
672+
/// See the UEFI Specification, Chapter 7.1 for more information on each
673+
/// error type.
685674
///
686675
/// * [`uefi::Status::INVALID_PARAMETER`]
687676
/// * [`uefi::Status::UNSUPPORTED`]
@@ -718,7 +707,7 @@ impl BootServices {
718707
/// This function directly calls the UEFI function `EFI_BOOT_SERVICES.SignalEvent()`.
719708
///
720709
/// Currently, (as of UEFI Spec v2.9) this only returns `EFI_SUCCESS`.
721-
/// See the function definition in the UEFI Specification, Chapter 7.1 for more details.
710+
/// See the UEFI Specification, Chapter 7.1 for more details.
722711
pub fn signal_event(&self, event: &Event) -> Result {
723712
// Safety: cloning this event should be safe, as we're directly passing it to firmware
724713
// and not keeping the clone around.
@@ -737,7 +726,7 @@ impl BootServices {
737726
/// at least for application based on EDK2 (such as OVMF), it may also return `EFI_INVALID_PARAMETER`.
738727
/// To be safe, ensure that error codes are handled properly.
739728
///
740-
/// See the function definition in the UEFI Specification, Chapter 7.1 for more details.
729+
/// See the UEFI Specification, Chapter 7.1 for more details.
741730
///
742731
/// * [`uefi::Status::INVALID_PARAMETER`]
743732
pub fn close_event(&self, event: Event) -> Result {
@@ -756,7 +745,7 @@ impl BootServices {
756745
/// Note: Instead of returning the `EFI_NOT_READY` error from `EFI_BOOT_SERVICES.CheckEvent()`,
757746
/// as listed in the UEFI Specification, this function will return `false`.
758747
///
759-
/// See the function definition in the UEFI Specification, Chapter 7.1 for more details.
748+
/// See the UEFI Specification, Chapter 7.1 for more details.
760749
///
761750
/// * [`uefi::Status::INVALID_PARAMETER`]
762751
pub fn check_event(&self, event: Event) -> Result<bool> {
@@ -950,8 +939,7 @@ impl BootServices {
950939
/// This function returns errors directly from the UEFI function
951940
/// `EFI_BOOT_SERVICES.LocateDevicePath()`.
952941
///
953-
/// Some errors have multiple different causes. See the function definition in the UEFI
954-
/// Specification, Chapter 7.3 for more information on possible causes for each error type.
942+
/// See the UEFI Specification, Chapter 7.3 for more information on each error type.
955943
///
956944
/// * [`uefi::Status::NOT_FOUND`]
957945
/// * [`uefi::Status::INVALID_PARAMETER`]
@@ -1252,9 +1240,8 @@ impl BootServices {
12521240
/// This function returns errors directly from the UEFI function
12531241
/// `EFI_BOOT_SERVICES.OpenProtocol()`.
12541242
///
1255-
/// Some errors have multiple different causes. See the function definition
1256-
/// in the UEFI Specification, Chapter 7.3 for more information on possible
1257-
/// causes for each error type.
1243+
/// See the UEFI Specification, Chapter 7.3 for more information on
1244+
/// each error type.
12581245
///
12591246
/// * [`uefi::Status::INVALID_PARAMETER`]
12601247
/// * [`uefi::Status::UNSUPPORTED`]
@@ -1298,9 +1285,8 @@ impl BootServices {
12981285
/// This function returns errors from the UEFI function
12991286
/// `EFI_BOOT_SERVICES.OpenProtocol()`.
13001287
///
1301-
/// Some errors have multiple different causes. See the function definition
1302-
/// in the UEFI Specification, Chapter 7.3 for more information on possible
1303-
/// causes for each error type.
1288+
/// See the UEFI Specification, Chapter 7.3 for more
1289+
/// information on each error type.
13041290
///
13051291
/// * [`uefi::Status::INVALID_PARAMETER`]
13061292
/// * [`uefi::Status::UNSUPPORTED`]
@@ -1332,9 +1318,8 @@ impl BootServices {
13321318
/// This function returns errors directly from the UEFI function
13331319
/// `EFI_BOOT_SERVICES.OpenProtocol()`.
13341320
///
1335-
/// Some errors have multiple different causes. See the function definition
1336-
/// in the UEFI Specification, Chapter 7.3 for more information on possible
1337-
/// causes for each error type.
1321+
/// See the UEFI Specification, Chapter 7.3 for more information
1322+
/// on each error type.
13381323
///
13391324
/// * [`uefi::Status::INVALID_PARAMETER`]
13401325
/// * [`uefi::Status::UNSUPPORTED`]
@@ -1362,9 +1347,8 @@ impl BootServices {
13621347
/// This function returns errors directly from the UEFI function
13631348
/// `EFI_BOOT_SERVICES.ProtocolsPerHandle()`.
13641349
///
1365-
/// Some errors have multiple different causes. See the function definition
1366-
/// in the UEFI Specification, Chapter 7.3 for more information on possible
1367-
/// causes for each error type.
1350+
/// See the UEFI Specification, Chapter 7.3 for more information on each
1351+
/// error type.
13681352
///
13691353
/// * [`uefi::Status::INVALID_PARAMETER`]
13701354
/// * [`uefi::Status::OUT_OF_RESOURCES`]
@@ -1402,9 +1386,7 @@ impl BootServices {
14021386
/// This function returns errors directly from the UEFI function
14031387
/// `EFI_BOOT_SERVICES.LocateHandleBuffer()`.
14041388
///
1405-
/// Some errors have multiple different causes. See the function definition
1406-
/// in the UEFI Specification, Chapter 7.3 for more information on possible
1407-
/// causes for each error type.
1389+
/// See the UEFI Specification, Chapter 7.3 for more information on each error type.
14081390
///
14091391
/// * [`uefi::Status::INVALID_PARAMETER`]
14101392
/// * [`uefi::Status::NOT_FOUND`]
@@ -1512,8 +1494,7 @@ impl BootServices {
15121494
/// This function returns errors from the UEFI functions `EFI_BOOT_SERVICES.OpenProtocol()`
15131495
/// and `EFI_BOOT_SERVICES.LocateDevicePath()`.
15141496
///
1515-
/// Some errors have multiple different causes. See the function definitions in the UEFI
1516-
/// Specification, Chapter 7.3 for more information on possible causes for each error type.
1497+
/// See the UEFI Specification, Chapter 7.3 for more information on each error type.
15171498
///
15181499
/// * [`uefi::Status::INVALID_PARAMETER`]
15191500
/// * [`uefi::Status::UNSUPPORTED`]

0 commit comments

Comments
 (0)