Allow mounting with an offset

When mounting squashfs images embedded in apptainer image,
using offset means we don't need to use a temporary copy.
This commit is contained in:
Anders F Björklund
2025-03-15 17:26:46 +01:00
parent 3a48a0bcdc
commit 8b475b6cc4
+2 -1
View File
@@ -11,6 +11,7 @@ import (
func main() {
verbose := flag.Bool("v", false, "Verbose")
offset := flag.Int64("o", 0, "Offset")
ignore := flag.Bool("ip", false, "Ignore Permissions and extract all files/folders with 0755")
flag.Parse()
if len(flag.Args()) < 2 {
@@ -21,7 +22,7 @@ func main() {
if err != nil {
panic(err)
}
r, err := squashfs.NewReader(f)
r, err := squashfs.NewReaderAtOffset(f, *offset)
if err != nil {
panic(err)
}