-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/files/0024-printf.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
From cae210b50372c63a03ff221f7d00c0e3139f4cf4 Mon Sep 17 00:00:00 2001 | ||
From: Kai Lueke <[email protected]> | ||
Date: Tue, 21 Nov 2023 17:39:23 +0100 | ||
Subject: [PATCH] printf | ||
|
||
--- | ||
internal/exec/stages/disks/partitions.go | 6 ++++++ | ||
1 file changed, 6 insertions(+) | ||
|
||
diff --git a/internal/exec/stages/disks/partitions.go b/internal/exec/stages/disks/partitions.go | ||
index 97591c2f..3d5ee8f3 100644 | ||
--- a/internal/exec/stages/disks/partitions.go | ||
+++ b/internal/exec/stages/disks/partitions.go | ||
@@ -433,6 +433,7 @@ func (s stage) partitionDisk(dev types.Disk, devAlias string) error { | ||
if inUse && len(activeParts) == 0 { | ||
return fmt.Errorf("refusing to operate on directly active disk %q", devAlias) | ||
} | ||
+ fmt.Printf("PRINT: inUse: %v activeParts: %v", inUse, activeParts) | ||
if cutil.IsTrue(dev.WipeTable) { | ||
op := sgdisk.Begin(s.Logger, devAlias) | ||
s.Logger.Info("wiping partition table requested on %q", devAlias) | ||
@@ -459,6 +460,7 @@ func (s stage) partitionDisk(dev types.Disk, devAlias string) error { | ||
if err != nil { | ||
return fmt.Errorf("failed to resolve %q: %v", devAlias, err) | ||
} | ||
+ fmt.Printf("PRINT: blockDevResolved: %v", blockDevResolved) | ||
|
||
// get a list of parititions that have size and start 0 replaced with the real sizes | ||
// that would be used if all specified partitions were to be created anew. | ||
@@ -527,6 +529,7 @@ func (s stage) partitionDisk(dev types.Disk, devAlias string) error { | ||
if partInUse && modification { | ||
return fmt.Errorf("refusing to modfiy active partition %d on %q", part.Number, devAlias) | ||
} | ||
+ fmt.Printf("PRINT: partInUse %v, modification %v", partInUse, modification) | ||
} | ||
|
||
if err := op.Commit(); err != nil { | ||
@@ -538,10 +541,13 @@ func (s stage) partitionDisk(dev types.Disk, devAlias string) error { | ||
// kernel partition table with BLKPG but only uses BLKRRPART which fails | ||
// as soon as one partition of the disk is mounted | ||
cmd := exec.Command(distro.PartxCmd(), "-u", "-", blockDevResolved) | ||
+ fmt.Printf("PRINT: cmd: %v", cmd) | ||
if _, err := s.Logger.LogCmd(cmd, "triggering partition table reread on %q", devAlias); err != nil { | ||
return fmt.Errorf("re-reading partitions failed: %v", err) | ||
} | ||
+ fmt.Printf("PRINT: partx ran") | ||
} | ||
+ fmt.Printf("PRINT: wait for udev") | ||
|
||
// It's best to wait here for the /dev/ABC entries to be | ||
// (re)created, not only for other parts of the initramfs but | ||
-- | ||
2.42.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters