#[repr(C)]pub struct File { /* private fields */ }
Expand description
A file loaded by the bootloader. Returned from
ExecutableFileRequest
and
ModuleRequest
.
Implementations§
Source§impl File
impl File
Sourcepub fn addr(&self) -> *mut u8
pub fn addr(&self) -> *mut u8
The base address of the file. Note that this is not necessarily a pointer to executable code. It simply points to the raw file.
Sourcepub fn path(&self) -> &CStr
pub fn path(&self) -> &CStr
The path of the file. This is the path that was passed to the bootloader
in either the configuration file or the internal_modules
field of the
ModuleRequest
.
Sourcepub fn string(&self) -> &CStr
pub fn string(&self) -> &CStr
The string associated with this file. This is the command line that was passed
to the bootloader in either the configuration file or the
internal_modules
field of the
ModuleRequest
.
It is returned as a raw byte slice, and the encoding is unspecified.
Sourcepub fn cmdline(&self) -> &[u8]
👎Deprecated since 0.4.0: please use File::string
instead
pub fn cmdline(&self) -> &[u8]
File::string
insteadThe command line of the file. This is the command line that was passed
to the bootloader in either the configuration file or the
internal_modules
field of the
ModuleRequest
.
It is returned as a raw byte slice, and the encoding is unspecified.
Sourcepub fn media_type(&self) -> MediaType
pub fn media_type(&self) -> MediaType
The media type of the file. See MediaType
for more information.
Sourcepub fn tftp_ip(&self) -> Option<NonZeroU32>
pub fn tftp_ip(&self) -> Option<NonZeroU32>
The IP address of the TFTP server, if the file was loaded from a TFTP.
Sourcepub fn tftp_port(&self) -> Option<NonZeroU32>
pub fn tftp_port(&self) -> Option<NonZeroU32>
The port of the TFTP server, if the file was loaded from a TFTP.
Sourcepub fn partition_idx(&self) -> Option<NonZeroU32>
pub fn partition_idx(&self) -> Option<NonZeroU32>
The partition index of the file, if the file was loaded from a partition.
Sourcepub fn mbr_disk_id(&self) -> Option<NonZeroU32>
pub fn mbr_disk_id(&self) -> Option<NonZeroU32>
The MBR disk ID of the file, if the file was loaded from an MBR disk.
Sourcepub fn gpt_disk_id(&self) -> Option<Uuid>
pub fn gpt_disk_id(&self) -> Option<Uuid>
The GPT disk UUID of the file, if the file was loaded from a GPT disk.
Sourcepub fn gpt_partition_id(&self) -> Option<Uuid>
pub fn gpt_partition_id(&self) -> Option<Uuid>
The GPT partition UUID of the file, if the file was loaded from a GPT partition.
Sourcepub fn partition_uuid(&self) -> Option<Uuid>
pub fn partition_uuid(&self) -> Option<Uuid>
The partition UUID of the file, if the file was loaded from a partition with a UUID.