@@ -64,7 +64,7 @@ let starting_lba = mbr.find_optimal_place(sectors)
6464 . expect (" could not find a place to put the partition" );
6565
6666mbr [free_partition_number ] = mbrman :: MBRPartitionEntry {
67- boot : false , // boot flag
67+ boot : mbrman :: BOOT_INACTIVE , // boot flag
6868 first_chs : mbrman :: CHS :: empty (), // first CHS address (only useful for old computers)
6969 sys : 0x83 , // Linux filesystem
7070 last_chs : mbrman :: CHS :: empty (), // last CHS address (only useful for old computers)
@@ -102,7 +102,7 @@ let mut mbr = mbrman::MBR::new_from(&mut cur, ss as u32, [0xff; 4])
102102 . expect (" could not create partition table" );
103103
104104mbr [1 ] = mbrman :: MBRPartitionEntry {
105- boot : false , // boot flag
105+ boot : mbrman :: BOOT_INACTIVE , // boot flag
106106 first_chs : mbrman :: CHS :: empty (), // first CHS address (only useful for old computers)
107107 sys : 0x0f , // extended partition with LBA
108108 last_chs : mbrman :: CHS :: empty (), // last CHS address (only useful for old computers)
@@ -132,7 +132,7 @@ let mut mbr = mbrman::MBR::new_from(&mut cur, ss as u32, [0xff; 4])
132132 . expect (" could not create partition table" );
133133
134134mbr [1 ] = mbrman :: MBRPartitionEntry {
135- boot : false , // boot flag
135+ boot : mbrman :: BOOT_INACTIVE , // boot flag
136136 first_chs : mbrman :: CHS :: empty (), // first CHS address (only useful for old computers)
137137 sys : 0x0f , // extended partition with LBA
138138 last_chs : mbrman :: CHS :: empty (), // last CHS address (only useful for old computers)
@@ -145,7 +145,7 @@ mbr.logical_partitions.push(
145145 mbrman :: LogicalPartition {
146146 // this is the actual partition entry for the logical volume
147147 partition : mbrman :: MBRPartitionEntry {
148- boot : false ,
148+ boot : mbrman :: BOOT_INACTIVE ,
149149 first_chs : mbrman :: CHS :: empty (),
150150 sys : 0x83 ,
151151 last_chs : mbrman :: CHS :: empty (),
@@ -156,8 +156,8 @@ mbr.logical_partitions.push(
156156 absolute_ebr_lba : 1 ,
157157 // the number of sectors in the first EBR is never known
158158 ebr_sectors : None ,
159- // this helper generates an empty boot sector in the EBR
160- bootstrap_code : mbrman :: BootstrapCode446 :: new () ,
159+ // empty boot sector in the EBR
160+ bootstrap_code : [ 0 ; 446 ] ,
161161 // this is the absolute CHS address of the EBR (only used by old computers)
162162 ebr_first_chs : mbrman :: CHS :: empty (), // only for old computers
163163 // this is the absolute CHS address of the last EBR (only used by old computers)
0 commit comments