Skip to content

Conversation

@tri-adam
Copy link
Member

@tri-adam tri-adam commented Apr 28, 2023

Re-factor SetPrimPart, extracting the partition of the new (and old, if applicable) system partition and updating only the Parttype field.

In addition to the unit tests, the fix can be exercised like so:

$ go run ./cmd/siftool/ list test/images/one-group.sif ------------------------------------------------------------------------------ ID |GROUP |LINK |SIF POSITION (start-end) |TYPE ------------------------------------------------------------------------------ 1 |1 |NONE |32768-32772 |FS (Raw/System/386) 2 |1 |NONE |36864-40960 |FS (Squashfs/*System/386) $ go run ./cmd/siftool/ setprim 1 test/images/one-group.sif $ go run ./cmd/siftool/ list test/images/one-group.sif ------------------------------------------------------------------------------ ID |GROUP |LINK |SIF POSITION (start-end) |TYPE ------------------------------------------------------------------------------ 1 |1 |NONE |32768-32772 |FS (Raw/*System/386) 2 |1 |NONE |36864-40960 |FS (Squashfs/System/386) 

Closes #285

@tri-adam tri-adam self-assigned this Apr 28, 2023
@tri-adam tri-adam marked this pull request as ready for review April 28, 2023 18:34
Copy link
Member

@dtrudg dtrudg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tri-adam tri-adam merged commit 8250df8 into sylabs:main May 2, 2023
@tri-adam tri-adam deleted the issue-285 branch May 2, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants