@@ -129,7 +129,7 @@ pub fn build(b: *std.Build) void {
129
129
130
130
const mkfs_fat = b .addExecutable (.{
131
131
.name = "mkfs.fat" ,
132
- .target = b .host ,
132
+ .target = b .resolveTargetQuery (.{}) ,
133
133
.optimize = .ReleaseSafe ,
134
134
.root_source_file = b .path ("src/mkfs.fat.zig" ),
135
135
});
@@ -416,7 +416,7 @@ pub const InitializeDiskStep = struct {
416
416
var buffer : [64 ]u8 = undefined ;
417
417
context .appendSliceAssumeCapacity (std .fmt .bufPrint (& buffer , "[{}]" , .{part_id }) catch unreachable );
418
418
419
- try writeDiskImage (b , asking , disk , base + auto_offset , part .size , part .data , context );
419
+ try writeDiskImage (b , asking , disk , part . offset orelse base + auto_offset , part .size , part .data , context );
420
420
421
421
auto_offset += part .size ;
422
422
}
@@ -459,16 +459,16 @@ pub const InitializeDiskStep = struct {
459
459
for (fs .items ) | item | {
460
460
switch (item ) {
461
461
.empty_dir = > | dir | {
462
- try argv .append (b .fmt ("mkdir: {s}" , .{dir }));
462
+ try argv .append (b .fmt ("mkdir; {s}" , .{dir }));
463
463
},
464
464
.copy_dir = > | src_dst | {
465
- try argv .append (b .fmt ("dir: {s}: {s}" , .{
465
+ try argv .append (b .fmt ("dir; {s}; {s}" , .{
466
466
src_dst .source .getPath2 (b , asking ),
467
467
src_dst .destination ,
468
468
}));
469
469
},
470
470
.copy_file = > | src_dst | {
471
- try argv .append (b .fmt ("file: {s}: {s}" , .{
471
+ try argv .append (b .fmt ("file; {s}; {s}" , .{
472
472
src_dst .source .getPath2 (b , asking ),
473
473
src_dst .destination ,
474
474
}));
@@ -524,9 +524,8 @@ pub const InitializeDiskStep = struct {
524
524
}
525
525
}
526
526
527
- fn make (step : * std.Build.Step , progress : std.Progress.Node ) ! void {
527
+ fn make (step : * std.Build.Step , _ : std.Build.Step.MakeOptions ) ! void {
528
528
const b = step .owner ;
529
- _ = progress ;
530
529
531
530
const ids : * InitializeDiskStep = @fieldParentPtr ("step" , step );
532
531
@@ -629,11 +628,10 @@ pub const Content = union(enum) {
629
628
dir .* = try allocator .dupe (u8 , dir .* );
630
629
},
631
630
.copy_dir , .copy_file = > | * cp | {
632
- const cp_new = .{
631
+ cp .* = .{
633
632
.destination = try allocator .dupe (u8 , cp .destination ),
634
633
.source = cp .source .dupe (b ),
635
634
};
636
- cp .* = cp_new ;
637
635
},
638
636
}
639
637
}
@@ -734,6 +732,8 @@ pub const mbr = struct {
734
732
empty = 0x00 ,
735
733
736
734
fat12 = 0x01 ,
735
+ fat16_small = 0x04 ,
736
+ fat16 = 0x06 ,
737
737
ntfs = 0x07 ,
738
738
739
739
fat32_chs = 0x0B ,
0 commit comments