Skip to content

Commit 1a70af2

Browse files
committed
squashfs: set file inode's frag index when no fragment data
Due to spec, frag index of file inode https://dr-emann.github.io/squashfs/squashfs.html#_file_inodes ``` An index into the Fragment Table which describes the fragment block that the tail end of this file is stored in. If not used, this is set to 0xFFFFFFFF. ``` Signed-off-by: Xynnn007 <[email protected]>
1 parent 6c00917 commit 1a70af2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

filesystem/squashfs/finalize.go

+2
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,8 @@ func createInodes(fileList []*finalizeFileInfo, idtable map[uint32]uint16, optio
11281128
if e.fragment != nil {
11291129
bf.fragmentBlockIndex = e.fragment.block
11301130
bf.fragmentOffset = e.fragment.offset
1131+
} else {
1132+
bf.fragmentBlockIndex = 0xffffffff
11311133
}
11321134
in = bf
11331135
inodeT = inodeBasicFile

0 commit comments

Comments
 (0)