Skip to content
  • Alexander Graf's avatar
    efi_loader: Fix partition offsets · c034b7fd
    Alexander Graf authored
    Commit 884bcf6f (efi_loader: use proper device-paths for partitions) tried
    to introduce the el torito scheme to all partition table types: Spawn
    individual disk objects for each partition on a disk.
    
    Unfortunately, that code ended up creating partitions with offset=0 which meant
    that anyone accessing these objects gets data from the raw block device instead
    of the partition.
    
    Furthermore, all the el torito logic to spawn devices for partitions was
    duplicated. So let's merge the two code paths and give partition disk objects
    good offsets to work from, so that payloads can actually make use of them.
    
    Fixes: 884bcf6f
    
     (efi_loader: use proper device-paths for partitions)
    Reported-by: default avatarYousaf Kaukab <yousaf.kaukab@suse.com>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    c034b7fd