Skip to content

Commit d8d9086

Browse files
committed
Replace mbrman with fork to avoid yanked funty version
1 parent c15405c commit d8d9086

File tree

3 files changed

+29
-15
lines changed

3 files changed

+29
-15
lines changed

Diff for: Cargo.lock

+22-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ bootloader-x86_64-bios-common = { version = "0.11.0-beta.2", path = "bios/common
4040
anyhow = "1.0.32"
4141
fatfs = "0.3.4"
4242
gpt = "3.0.0"
43-
mbrman = "0.4.2"
43+
# replace with `mbrman` crate once
44+
# https://github.com/rust-disk-partition-management/mbrman/pull/25
45+
# is merged
46+
mbrman = { version = "0.0.1", package = "mbrman---bitvec-1-0" }
4447
tempfile = "3.3.0"
4548

4649
[dev-dependencies]

Diff for: src/mbr.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use anyhow::Context;
2+
use mbrman::BOOT_ACTIVE;
23
use std::{
34
fs::{self, File},
45
io::{self, Seek, SeekFrom},
@@ -33,7 +34,7 @@ pub fn create_mbr_disk(
3334
.try_into()
3435
.context("size of second stage is larger than u32::MAX")?;
3536
mbr[1] = mbrman::MBRPartitionEntry {
36-
boot: true,
37+
boot: BOOT_ACTIVE,
3738
starting_lba: second_stage_start_sector,
3839
sectors: second_stage_sectors,
3940
// see BOOTLOADER_SECOND_STAGE_PARTITION_TYPE in `boot_sector` crate
@@ -51,7 +52,7 @@ pub fn create_mbr_disk(
5152
.context("failed to read file metadata of FAT boot partition")?
5253
.len();
5354
mbr[2] = mbrman::MBRPartitionEntry {
54-
boot: false,
55+
boot: BOOT_ACTIVE,
5556
starting_lba: boot_partition_start_sector,
5657
sectors: ((boot_partition_size - 1) / u64::from(SECTOR_SIZE) + 1)
5758
.try_into()

0 commit comments

Comments
 (0)