extern structstd.os.uefi.device_path.DevicePath.Media.FilePathDevicePath[src]

Fields

type: DevicePath.Type
subtype: Subtype
length: u16 align(1)

Functions

FunctiongetPath[src]

pub fn getPath(self: *const FilePathDevicePath) [*:0]align(1) const u16

Parameters

self: *const FilePathDevicePath

Source Code

Source code
pub fn getPath(self: *const FilePathDevicePath) [*:0]align(1) const u16 {
    return @as([*:0]align(1) const u16, @ptrCast(@as([*]const u8, @ptrCast(self)) + @sizeOf(FilePathDevicePath)));
}

Source Code

Source code
pub const FilePathDevicePath = extern struct {
    type: DevicePath.Type,
    subtype: Subtype,
    length: u16 align(1),

    pub fn getPath(self: *const FilePathDevicePath) [*:0]align(1) const u16 {
        return @as([*:0]align(1) const u16, @ptrCast(@as([*]const u8, @ptrCast(self)) + @sizeOf(FilePathDevicePath)));
    }
}