Project

General

Profile

Actions

Bug #7641

closed

loader: disk/part api needs to use uint64_t offsets

Added by Toomas Soome over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
2016-12-04
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Copy from https://reviews.freebsd.org/D8710

The disk_* and part_* api is using 64bit values for media size and offsets. However, the current api is using off_t type, which is signed 64-bit int.

In this context the signed media size does not make any sense, and the offsets are used to mark absolute, not relative locations.

Also, the data from GPT partition table and some other sources is already using uint64_t data type, so using signed off_t can cause sign issues.

Actions #1

Updated by Electric Monk over 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 79bea51b346d62b423bd44f00d99b3deb4d10d0b

commit  79bea51b346d62b423bd44f00d99b3deb4d10d0b
Author: Toomas Soome <tsoome@me.com>
Date:   2016-12-12T19:43:34.000Z

    7641 loader: disk/part api needs to use uint64_t offsets
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Juraj Lutter <juraj@lutter.sk>
    Approved by: Dan McDonald <danmcd@omniti.com>

Actions

Also available in: Atom PDF