2019-07-29 05:51:51 +08:00
const high_bit = 1 < < @typeInfo ( usize ) . Int . bits - 1 ;
2019-10-17 01:42:44 +08:00
/// The operation completed successfully.
2019-07-29 05:51:51 +08:00
pub const success : usize = 0 ;
2019-10-17 01:42:44 +08:00
/// The image failed to load.
2019-07-29 05:51:51 +08:00
pub const load_error : usize = high_bit | 1 ;
2019-10-17 01:42:44 +08:00
/// A parameter was incorrect.
2019-07-29 05:51:51 +08:00
pub const invalid_parameter : usize = high_bit | 2 ;
2019-10-17 01:42:44 +08:00
/// The operation is not supported.
2019-07-29 05:51:51 +08:00
pub const unsupported : usize = high_bit | 3 ;
2019-10-17 01:42:44 +08:00
/// The buffer was not the proper size for the request.
2019-07-29 05:51:51 +08:00
pub const bad_buffer_size : usize = high_bit | 4 ;
2019-10-17 01:42:44 +08:00
/// The buffer is not large enough to hold the requested data. The required buffer size is returned in the appropriate parameter when this error occurs.
2019-07-29 05:51:51 +08:00
pub const buffer_too_small : usize = high_bit | 5 ;
2019-10-17 01:42:44 +08:00
/// There is no data pending upon return.
2019-07-29 05:51:51 +08:00
pub const not_ready : usize = high_bit | 6 ;
2019-10-17 01:42:44 +08:00
/// The physical device reported an error while attempting the operation.
2019-07-29 05:51:51 +08:00
pub const device_error : usize = high_bit | 7 ;
2019-10-17 01:42:44 +08:00
/// The device cannot be written to.
2019-07-29 05:51:51 +08:00
pub const write_protected : usize = high_bit | 8 ;
2019-10-17 01:42:44 +08:00
/// A resource has run out.
2019-07-29 05:51:51 +08:00
pub const out_of_resources : usize = high_bit | 9 ;
2019-10-17 01:42:44 +08:00
/// An inconstancy was detected on the file system causing the operating to fail.
2019-07-29 05:51:51 +08:00
pub const volume_corrupted : usize = high_bit | 10 ;
2019-10-17 01:42:44 +08:00
/// There is no more space on the file system.
2019-07-29 05:51:51 +08:00
pub const volume_full : usize = high_bit | 11 ;
2019-10-17 01:42:44 +08:00
/// The device does not contain any medium to perform the operation.
2019-07-29 05:51:51 +08:00
pub const no_media : usize = high_bit | 12 ;
2019-10-17 01:42:44 +08:00
/// The medium in the device has changed since the last access.
2019-07-29 05:51:51 +08:00
pub const media_changed : usize = high_bit | 13 ;
2019-10-17 01:42:44 +08:00
/// The item was not found.
2019-07-29 05:51:51 +08:00
pub const not_found : usize = high_bit | 14 ;
2019-10-17 01:42:44 +08:00
/// Access was denied.
2019-07-29 05:51:51 +08:00
pub const access_denied : usize = high_bit | 15 ;
2019-10-17 01:42:44 +08:00
/// The server was not found or did not respond to the request.
2019-07-29 05:51:51 +08:00
pub const no_response : usize = high_bit | 16 ;
2019-10-17 01:42:44 +08:00
/// A mapping to a device does not exist.
2019-07-29 05:51:51 +08:00
pub const no_mapping : usize = high_bit | 17 ;
2019-10-17 01:42:44 +08:00
/// The timeout time expired.
2019-07-29 05:51:51 +08:00
pub const timeout : usize = high_bit | 18 ;
2019-10-17 01:42:44 +08:00
/// The protocol has not been started.
2019-07-29 05:51:51 +08:00
pub const not_started : usize = high_bit | 19 ;
2019-10-17 01:42:44 +08:00
/// The protocol has already been started.
2019-07-29 05:51:51 +08:00
pub const already_started : usize = high_bit | 20 ;
2019-10-17 01:42:44 +08:00
/// The operation was aborted.
2019-07-29 05:51:51 +08:00
pub const aborted : usize = high_bit | 21 ;
2019-10-17 01:42:44 +08:00
/// An ICMP error occurred during the network operation.
2019-07-29 05:51:51 +08:00
pub const icmp_error : usize = high_bit | 22 ;
2019-10-17 01:42:44 +08:00
/// A TFTP error occurred during the network operation.
2019-07-29 05:51:51 +08:00
pub const tftp_error : usize = high_bit | 23 ;
2019-10-17 01:42:44 +08:00
/// A protocol error occurred during the network operation.
2019-07-29 05:51:51 +08:00
pub const protocol_error : usize = high_bit | 24 ;
2019-10-17 01:42:44 +08:00
/// The function encountered an internal version that was incompatible with a version requested by the caller.
2019-07-29 05:51:51 +08:00
pub const incompatible_version : usize = high_bit | 25 ;
2019-10-17 01:42:44 +08:00
/// The function was not performed due to a security violation.
2019-07-29 05:51:51 +08:00
pub const security_violation : usize = high_bit | 26 ;
2019-10-17 01:42:44 +08:00
/// A CRC error was detected.
2019-07-29 05:51:51 +08:00
pub const crc_error : usize = high_bit | 27 ;
2019-10-17 01:42:44 +08:00
/// Beginning or end of media was reached
2019-07-29 05:51:51 +08:00
pub const end_of_media : usize = high_bit | 28 ;
2019-10-17 01:42:44 +08:00
/// The end of the file was reached.
2019-07-29 05:51:51 +08:00
pub const end_of_file : usize = high_bit | 31 ;
2019-10-17 01:42:44 +08:00
/// The language specified was invalid.
2019-07-29 05:51:51 +08:00
pub const invalid_language : usize = high_bit | 32 ;
2019-10-17 01:42:44 +08:00
/// The security status of the data is unknown or compromised and the data must be updated or replaced to restore a valid security status.
2019-07-29 05:51:51 +08:00
pub const compromised_data : usize = high_bit | 33 ;
2019-10-17 01:42:44 +08:00
/// There is an address conflict address allocation
2019-07-29 05:51:51 +08:00
pub const ip_address_conflict : usize = high_bit | 34 ;
2019-10-17 01:42:44 +08:00
/// A HTTP error occurred during the network operation.
2019-07-29 05:51:51 +08:00
pub const http_error : usize = high_bit | 35 ;
2019-10-17 01:42:44 +08:00
/// The string contained one or more characters that the device could not render and were skipped.
2019-07-29 05:51:51 +08:00
pub const warn_unknown_glyph : usize = 1 ;
2019-10-17 01:42:44 +08:00
/// The handle was closed, but the file was not deleted.
2019-07-29 05:51:51 +08:00
pub const warn_delete_failure : usize = 2 ;
2019-10-17 01:42:44 +08:00
/// The handle was closed, but the data to the file was not flushed properly.
2019-07-29 05:51:51 +08:00
pub const warn_write_failure : usize = 3 ;
2019-10-17 01:42:44 +08:00
/// The resulting buffer was too small, and the data was truncated to the buffer size.
2019-07-29 05:51:51 +08:00
pub const warn_buffer_too_small : usize = 4 ;
2019-10-17 01:42:44 +08:00
/// The data has not been updated within the timeframe set by localpolicy for this type of data.
2019-07-29 05:51:51 +08:00
pub const warn_stale_data : usize = 5 ;
2019-10-17 01:42:44 +08:00
/// The resulting buffer contains UEFI-compliant file system.
2019-07-29 05:51:51 +08:00
pub const warn_file_system : usize = 6 ;
2019-10-17 01:42:44 +08:00
/// The operation will be processed across a system reset.
2019-07-29 05:51:51 +08:00
pub const warn_reset_required : usize = 7 ;